kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Tue Sep 28, 2004 5:06 pm Post subject: |
|
|
sateesh,
Do not post the same topic in more than 1 forum. I have deleted your duplicate post in tso forum. You have a weird way of creating the GDG versions. I am not going to ask you the reasons for creating a GDG version like that, but the following DFSORT JCl will give you the desired results.
A brief description of the job. we generate a dynamic jcl and submit it as a new job via intrdr.
We get the system date in ccyymmdd format using DATE1 on inrec parm. once we get the date we change the month to spell out the month using a change command on outrec. Now we use another outrec on outfil to generate a dynamic JCL.
Change your Sortout to the following , once you verified the job being created.
Code: |
//SORTOUT DD SYSOUT=(*,INTRDR)
|
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY RECORD
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC FIELDS=(DATE1)
OUTREC FIELDS=(1,4,5,2,CHANGE=(3,C'01',C'JAN',
C'02',C'FEB',
C'03',C'MAR',
C'04',C'APR',
C'05',C'MAY',
C'06',C'JUN',
C'07',C'JUL',
C'08',C'AUG',
C'09',C'SEP',
C'10',C'OCT',
C'11',C'NOV',
C'12',C'DEC'),
NOMATCH=(C'MON'))
OUTFIL OUTREC=(C'//USERIDZ JOB ',X'7D',C'CREATE DSN',X'7D',
C',CLASS=A,',/,
C'//',13X,C'MSGCLASS=Y,MSGLEVEL=(1,1),',/,
C'//',13X,C'NOTIFY=&SYSUID',/,
C'//*',/,
C'//STEP0100 EXEC PGM=IEFBR14',/,
C'//*',/,
C'//FILE1 DD DSN=HLQ.TEST.',
5,3,1,4,
C'.G00V100,',/,
C'// DISP=(NEW,CATLG,DELETE),',/,
C'// SPACE=(CYL,(X,Y),RLSE),',/,
C'// DCB=(LRECL=ZZZ,RECFM=FB,BLKSIZE=0)',/,
C'//*',/,
C'//FILE2 DD DSN=HLQ.TEST.',
5,3,1,4,
C'.G00V200,',/,
C'// DISP=(NEW,CATLG,DELETE),',/,
C'// SPACE=(CYL,(X,Y),RLSE),',/,
C'// DCB=(LRECL=ZZZ,RECFM=FB,BLKSIZE=0)',/,
C'//*',80:X)
/*
|
The output from this job is as follows:
Code: |
//USERIDZ JOB 'CREATE DSN',CLASS=A,
// MSGCLASS=Y,MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*
//STEP0100 EXEC PGM=IEFBR14
//*
//FILE1 DD DSN=HLQ.TEST.SEP2004.G00V100,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(X,Y),RLSE),
// DCB=(LRECL=ZZZ,RECFM=FB,BLKSIZE=0)
//*
//FILE2 DD DSN=HLQ.TEST.SEP2004.G00V200,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(X,Y),RLSE),
// DCB=(LRECL=ZZZ,RECFM=FB,BLKSIZE=0)
//*
|
change the space and lrecl parms to your requirements.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|