hsiva2003 New User Joined: 22 Feb 2005 Posts: 10 Location: Chennai
My requirement is to concatenate 7 different FB , PS files of different Record Lengths.
The Output is a NEW PS - FB File with the LRECL of the higher of the 7 files length.
The output should be sorted in the first 5 characters ascending order. I have used SORT / ICETOOL / IEBGENER then SORT.. Nothing is working out.
I am ok with 2 or more steps - in a precise JCL. Please help me out.
expat Global Moderator Joined: 14 Mar 2007 Posts: 8657 Location: Back in jolly old England
I believe that you will need to use SORT to set all of the record lengths to the same value and then sort the data.
There are numerous examples of doing this on the forum.
Frank Yaeger DFSORT Moderator Joined: 15 Feb 2005 Posts: 7130 Location: San Jose, CA
Here's an example of a DFSORT/ICETOOL job that will do what you want.
I assumed the largest input file has LRECL=100, but you can change the job appropriately. Do NOT use USING(CTL1) for the input file(s) with LRECL=100 (unless input position 100 has a blank). If you want more specific help, give more specific information about the RECFM and LRECL of each input file.
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file (FB/100)
//IN2 DD DSN=... input file (FB/50)
//IN3 DD DSN=... input file (FB/70)
//IN4 DD DSN=... input file (FB/100)
//IN5 DD DSN=... input file (FB/60)
//IN6 DD DSN=... input file (FB/20)
//IN7 DD DSN=... input file (FB/70)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/100)
//TOOLIN DD *
COPY FROM(IN1) TO(T1)
COPY FROM(IN2) TO(T1) USING(CTL1)
COPY FROM(IN3) TO(T1) USING(CTL1)
COPY FROM(IN4) TO(T1)
COPY FROM(IN5) TO(T1) USING(CTL1)
COPY FROM(IN6) TO(T1) USING(CTL1)
COPY FROM(IN7) TO(T1) USING(CTL1)
SORT FROM(T1) TO(OUT) USING(CTL2)
//CTL1CNTL DD *
//CTL2CNTL DD *
All times are GMT + 6 Hours