Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
I have a requirement like this
I will be getting a file from some external sources. The file will contain names of some GDG's. The generation number may not be consecutive. My requirement is: I have to get the GDG names from the file and in the next step i want to concatenate the contents of GDG using a sort
Example
my input file contains
XX.PRESENT.DATA.GDG.G0001V00
XX.PRESENT.DATA.GDG.G0003V00
XX.PRESENT.DATA.GDG.G0009V00
In the next step I want to read the input file naems and then merge the contents of
XX.PRESENT.DATA.GDG.G0001V00,XX.PRESENT.DATA.GDG.G0003V00,XX.PRESENT.DATA.GDG.G0009V00 into a another file |
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
This is how I would approach this:
Code: |
//JOB#1 JOB (),'....',CLASS=T,....
//*
//STEP1 EXEC PGM=ICEMAN
//SORTIN DD *
XX.PRESENT.DATA.GDG.G0001V00
XX.PRESENT.DATA.GDG.G0003V00
XX.PRESENT.DATA.GDG.G0009V00
/*
//SORTOF1 DD DSN=&&T1,DISP=(,PASS),UNIT=VIO
//SORTOF2 DD DSN=&&T2,DISP=(,PASS),UNIT=VIO
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL FILES=1,ENDREC=1,
OUTREC=(1:C'//SORTIN DD DISP=SHR,DSN=',1,44,80:X)
OUTFIL FILES=2,STARTREC=2,
OUTREC=(1:C'// DD DISP=SHR,DSN=',1,44,80:X)
/*
//*
//STEP2 EXEC PGM=ICEMAN
//SORTIN DD DATA,DLM=@@
//JOB#2 JOB (),'....',CLASS=T,....
//*
//STEP1 EXEC PGM=ICEMAN
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
/*
@@
// DD DSN=&&T1,DISP=(OLD,PASS)
// DD DSN=&&T2,DISP=(OLD,PASS)
//SORTOUT DD SYSOUT=(*,INTRDR)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
/*
//*
|
where JOB#1 STEP1 would create DD statements for each of the GDG datasets in the input file, JOB#1 STEP2 would copy the JCL for JOB#2 to the internal reader while providing the concatenated dataset list for the SORT input. |
|