Tony, Here is the equivalent DFSORT/ICETOOL JCL that will combine your 2 steps into a single step
//STEP0100 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //SYMNAMES DD * KEY,1,5 OREC,1,25 //DFSPARM DD * DEBUG ABEND //SYMNOUT DD SYSOUT=* //IN1 DD * ABCD1 INPUT1 DATA........ ABCD2 INPUT1 DATA........ ABCD3 INPUT1 DATA........ //IN2 DD * ABCD1 INPUT2 DATA........ ABCD2 INPUT2 DATA........ ABCD3 INPUT2 DATA........ //IN3 DD * ABCD1 INPUT3 DATA........ ABCD2 INPUT3 DATA........ ABCD3 INPUT3 DATA........ //OUT1 DD DSN=MYHLQ.JOINED.ONE.PLUS.TWO, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(X,Y),RLSE) //* //OUT2 DD DSN=MYHLQ.JOINED.TWO.PLUS.THREE, // DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(X,Y),RLSE) //* //TOOLIN DD * COPY JKFROM TO(OUT1) USING(CTL1) COPY JKFROM TO(OUT2) USING(CTL2) //* //CTL1CNTL DD * JOINKEYS F1=IN1,FIELDS=(KEY,A) JOINKEYS F2=IN2,FIELDS=(KEY,A) REFORMAT FIELDS=(F1:OREC,F2:OREC) //* //CTL2CNTL DD * JOINKEYS F1=IN3,FIELDS=(KEY,A) JOINKEYS F2=OUT1,FIELDS=(KEY,A) REFORMAT FIELDS=(F1:OREC,F2:OREC) //* And if you want to pass constants to the files before join then you can use TASKID and pass the constants For example //TOOLIN DD * COPY JKFROM TO(OUT1) USING(CTL1) COPY JKFROM TO(OUT2) USING(CTL2) //* //CTL1CNTL DD * JOINKEYS F1=IN1,FIELDS=(KEY,A),TASKID=T1 JOINKEYS F2=IN2,FIELDS=(KEY,A),TASKID=T1 REFORMAT FIELDS=(F1:OREC,F2:OREC) //* //T1F1CNTL DD * INREC OVERLAY=(21:C'CON1') //* //T1F2CNTL DD * INREC OVERLAY=(21:C'CON2') //* //CTL2CNTL DD * JOINKEYS F1=IN3,FIELDS=(KEY,A) JOINKEYS F2=OUT1,FIELDS=(KEY,A) REFORMAT FIELDS=(F1:OREC,F2:OREC) //* In the above example for file1 we will use the INREC statement specified in T1F1CNTL and for file 2 we will use the INREC specified in T1F2CNTL. Check this example of using multiple COPY operators for JOINKEYS applications that preprocess different input files in different ways http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CA60/7.4.3? Further if you have any questions please let me know Thanks, Kolusu DFSORT Development IBM Corporation IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on 02/23/2015 09:28:24 AM: > From: "Tony's Outlook via Mozilla" <tbabo...@outlook.com> > To: IBM-MAIN@LISTSERV.UA.EDU > Date: 02/23/2015 09:38 AM > Subject: Re: DF/SORT JOINKEYS question. > Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> > > Sri, as usual thank you for your help. I'm still digesting the last > suggestion you sent me. I'll let you know my results. > > Meanwhile, to the current topic: > > //* here's what I have..... > > //STEP1 EXEC PGM=SORT,PARM='RC16=ABE' > //SYSOUT DD SYSOUT=* > //IN1 DD * > ABCD1 INPUT1 DATA........ > ABCD2 INPUT1 DATA........ > ABCD3 INPUT1 DATA........ > //IN2 DD * > ABCD1 INPUT2 DATA........ > ABCD2 INPUT2 DATA........ > ABCD3 INPUT2 DATA........ > //SORTOUT DD DISP=(NEW,CATLG,DELETE),DSN=MYHLQ.JOINED.ONE.PLUS.TWO > //SYMNAMES DD * > KEY,1,5 > OREC,1,25 > //SYSIN DD * > OPTION COPY > JOINKEYS F1=IN1,FIELDS=(KEY,A) > JOINKEYS F2=IN2,FIELDS=(KEY,A) > REFORMAT FIELDS=(F1:OREC,F2:OREC) > //*------------------------------------------------------------------- > //* 2ND JOIN STEP. > //STEP2 EXEC PGM=SORT,PARM='RC16=ABE' > //SYSOUT DD SYSOUT=* > //IN3 DD * > ABCD1 INPUT3 DATA........ > ABCD2 INPUT3 DATA........ > ABCD3 INPUT3 DATA........ > //IN2 DD DISP=SHR,DSN=MYHQL.JOINED.ONE.PLUS.TWO > //SORTOUT DD DISP=(NEW,CATLG,DELETE),DSN=MYHLQ.JOINED.TWO.PLUS.THREE > //SYMNAMES DD * > KEY,1,5 > OREC,1,25 > //SYSIN DD * > OPTION COPY > JOINKEYS F1=IN3,FIELDS=(KEY,A) > JOINKEYS F2=IN2,FIELDS=(KEY,A) > REFORMAT FIELDS=(F1:OREC,F2:OREC) > //*------------------------------------------------------------------- > > > > > > //* HERE'S WHAT I WANT.... > //STEP1 EXEC PGM=SORT,PARM='RC16=ABE' > //SYSOUT DD SYSOUT=* > //IN1 DD * > ABCD1 INPUT1 DATA........ > ABCD2 INPUT1 DATA........ > ABCD3 INPUT1 DATA........ > //IN2 DD * > ABCD1 INPUT2 DATA........ > ABCD2 INPUT2 DATA........ > ABCD3 INPUT2 DATA........ > //IN3 DD * > ABCD1 INPUT3 DATA........ > ABCD2 INPUT3 DATA........ > ABCD3 INPUT3 DATA........ > //SORTOUT DD DISP=(NEW,CATLG,DELETE),DSN=MYHLQ.JOINED.ONE.TWO.THREE > //SYMNAMES DD * > KEY,1,5 > OREC,1,25 > //SYSIN DD * > OPTION COPY > JOINKEYS F1=IN1,FIELDS=(KEY,A) > JOINKEYS F2=IN2,FIELDS=(KEY,A) > JOINKEYS F3=IN3,FIELDS=(KEY,A) > REFORMAT FIELDS=(F1:OREC,C'MORE DATA', > F2:OREC,C'MORE.DA O > F3:OREC,C'MORE.DATA') > > > > > > > On 2/20/2015 4:16 PM, Sri h Kolusu wrote: > >>>> 1. I would like to be able to JOIN more than 2 input files in a single > > job step. I'm currently doing this by using additional job steps. > > Tony, > > > > You can use ICETOOL to combine multiple Join operations into a single > > step. > > > > I would like to be able to write constants in the output file. The > > REFORMAT statement accepts the usual P,M as well as a fill byte value. I > > would like the ability to specify constants as the OUTREC statement > > allows. I currently am formatting blanks in the output file by finding > > > > You can use JNF1CNTL or JNF2CNTL to add constants you want to see in the > > final output. You can also use INREC statement on the main task that lets > > you add any constants you want. > > > > Show me your entire Joinkeys JCL and the control cards and I will show you > > a way to get the desired reuslts. > > > > Thanks, > > Sri Hari Kolusu > > DFSORT Development > > IBM Corporation > > > > IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on > > 02/20/2015 02:00:24 PM: > > > >> From: "Tony's Outlook via Mozilla" <tbabo...@outlook.com> > >> To: IBM-MAIN@LISTSERV.UA.EDU > >> Date: 02/20/2015 02:10 PM > >> Subject: DF/SORT JOINKEYS question. > >> Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> > >> > >> I have a job stream that contains several relatively simple JOINKEYS > >> steps. I need to expand the scope of this job by adding some input > >> files and writing some specific constants in the output data. > >> > >> Specifically: > >> > >> 1. I would like to be able to JOIN more than 2 input files in a single > >> job step. I'm currently doing this by using additional job steps. > >> > >> 2. I would like to be able to write constants in the output file. The > >> REFORMAT statement accepts the usual P,M as well as a fill byte value. > > > >> I would like the ability to specify constants as the OUTREC statement > >> allows. I currently am formatting blanks in the output file by finding > >> them in either the F1 or F2. Obviously this is not a reliable method. > >> > >> Opinions? > >> > >> ---------------------------------------------------------------------- > >> For IBM-MAIN subscribe / signoff / archive access instructions, > >> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > >> > > > > ---------------------------------------------------------------------- > > For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN