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

Reply via email to