by vnktrrd » Thu Mar 31, 2011 8:48 pm
Hi,
I have seen the following JCL in the sort tricks.
//GENJCL1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DATA,DLM=$$
//CPYFILES JOB (XXX,005),'PRGMR',CLASS=A,MSGCLASS=H,
// MSGLEVEL=(1,1),TIME=(,15)
//S1 EXEC PGM=ICEGENER
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD DSN=&OUT,DISP=(,PASS),SPACE=(CYL,(5,5)),UNIT=SYSDA
//SYSIN DD DUMMY
$$
//SORTOUT DD DSN=&T1,UNIT=SYSDA,SPACE=(CYL,(1,1)),DISP=(,PASS)
//SYSIN DD *
* Copy JOB, EXEC, SYSPRINT, SYSUT2 and SYSIN statements.
OPTION COPY
/*
//GENJCL2 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DSN=... list of file names
//TEMP DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),
//** USE MOD FOR T1
// DISP=(MOD,PASS)
//SYSIN DD *
OPTION COPY
* Add sequence numbers to file list so we can identify the
* first file in the list and use '//SYSUT1 DD' for it.
* We'll use '// DD' for the second and subsequent files
* in the list.
OUTREC BUILD=(1,44, file name from list
81:SEQNUM,3,ZD) sequence number
* Generate //SYSUT1 DD DISP=SHR,DSN=name1
* // DD DISP=SHR,DSN=name2
* ...
OUTFIL FNAMES=TEMP,
IFOUTLEN=80,
IFTHEN=(WHEN=INIT,
BUILD=(1:C'//',10:C'DD DISP=SHR,DSN=',1,44,81:81,3)),
IFTHEN=(WHEN=(81,3,ZD,EQ,+1),OVERLAY=(3:C'SYSUT1'))
/*
//SUBJCL EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&T1,DISP=(OLD,PASS)
//SORTOUT DD SYSOUT=(A,INTRDR) internal reader
//SYSIN DD *
* Submit the JCL to the internal reader
OPTION COPY
/*
here in this JCL i cannot understand two things.
//SORTIN DD DSN=... list of file names
what are the "list of file names" I should give here?
OUTREC BUILD=(1,44, file name from list
81:SEQNUM,3,ZD) sequence number
what are the "file names from list" and "sequence number" I should give here?
please help.