skolusu wrote:A better approach would be
//SYSIN DD *
OPTION COPY,VLSCMP
INCLUDE COND=(14,8,CH,EQ,C'FILENAME')
OUTFIL VTOF,
PARSE=(%01=(ABSPOS=14,STARTAFT=C'FILENAME=',FIXLEN=44)),
BUILD=(%01,JFY=(SHIFT=LEFT,LEAD=C' LISTDS (''',TRAIL=C''')',
LENGTH=80))
//*
This is a perfect solution for me; I do had tried to convert to fixed-length LISTDS command file, but failed. Thank you very much.
I attached the final JCL job (The <data> should be changed on specific mainframe).
//TESTJCL JOB CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1),NOTIFY=&SYSUID
//*-------------------------------------------------------------*
//* DELETE COMMAND FILE
//*-------------------------------------------------------------*
//DEL EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
DELETE <data>.TEST.COLLCATA.DSCMD
SET MAXCC=0
/*
//*-------------------------------------------------------------*
//* GENERATE COMMAND FILE
//*-------------------------------------------------------------*
//GEN EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//OUTDD DD SPACE=(CYL,(40,5),RLSE),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),
// DSN=<data>.TEST.COLLCATA.DSCMD
//*-------------------------------------------------------------*
//* ADD CONTENT INTO COMMAND FILE
//*-------------------------------------------------------------*
//STEP02 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=<data>.TEST.COLLCATA.DSFILES,DISP=SHR
//SORTOUT DD DSN=<data>.TEST.COLLCATA.DSCMD,DISP=OLD
//SYSIN DD *
OPTION COPY,VLSCMP,STOPAFT=3
INCLUDE COND=(14,8,CH,EQ,C'FILENAME')
OUTFIL VTOF,
PARSE=(%01=(ABSPOS=14,STARTAFT=C'FILENAME=',FIXLEN=44)),
BUILD=(%01,JFY=(SHIFT=LEFT,LEAD=C' LISTDS (''',TRAIL=C''')',
LENGTH=80))
/*
//*-------------------------------------------------------------*
//* EXECUTE COMMAND FILE
//*-------------------------------------------------------------*
//COLLPS EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DSN=<data>.TEST.COLLCATA.DSCMD,DISP=OLD
//
Thanks.