Sorting On Jobname In Batch

Document ID : KB000050886
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

SYSVIEW Batch Job lists all Started Tasks, but I need them sorted by JOBNAME.
How to get them sorted by JOBNAME?

Solution:

//yourjob JOB ,MSGCLASS=X,CLASS=B,NOTIFY=youruser   
//* ============================================================   
//SYSVBAT EXEC PGM=GSVXBAT,PARM='LINECNT=99,SHOWINP=NO,MENUOFF'   
//SYSPRINT DD SYSOUT=*   
//SYSIN DD *   
PRINTOFF   
COMMAND=(PREFIX *)   
COMMAND=(ACTIVITY)   
PRINTON   
COMMAND=(SORT JOBNAME)   
SCROLL   
COMMAND=(END)   
/*   
// 

would give you the expected list.

in SYSVIEW ADMIN Guide, Chapter 9: Using the Batch Interface on page 111
we found, that you need to define the activity first, then the command:
COMMAND=(SORT JOBNAME)
using MENUOFF and PRINTOFF can make your Output even more readable.