I am trying to join the data from two datasets using Join Keys and in the output dataset, I need it with Header and am using the following sort card.
----+----1----+----2----+----3----+----4----+----5----+----6----+
JOINKEYS FILES=F1,FIELDS=(1,3,A)
JOINKEYS FILES=F2,FIELDS=(1,3,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F2:57,2,F1:1,14)
SORT FIELDS=COPY
OUTFIL REMOVECC,
HEADER1=(5:'TAR BATCH REPORT',2/,
5:'AS ON ',JP0,3/,
4/,
5:'ATP/RXXMISSION DETAILS',
6/,
1:'ATPO/RXNS',11:'COUNTRY',19:'TOP_DATE ',/,
1:'---------',11:'-------',19:'----------',/)
OUTREC FIELDS=(1:1,3,
11:4,3,
19:9,10)
JOINKEYS FILES=F1,FIELDS=(1,3,A)
JOINKEYS FILES=F2,FIELDS=(1,3,A)
JOIN UNPAIRED,F1
REFORMAT FIELDS=(F2:57,2,F1:1,14)
SORT FIELDS=COPY
OUTFIL REMOVECC,
HEADER1=(5:'TAR BATCH REPORT',2/,
5:'AS ON ',JP0,3/,
4/,
5:'ATP/RXXMISSION DETAILS',
6/,
1:'ATPO/RXNS',11:'COUNTRY',19:'TOP_DATE ',/,
1:'---------',11:'-------',19:'----------',/)
OUTREC FIELDS=(1:1,3,
11:4,3,
19:9,10)
The output as per reformat is
10XYZ 28.03.2017
9Y 28.03.2017
1ZX 28.03.2017
9Y 28.03.2017
1ZX 28.03.2017
I didnt mention the record length but am getting error as follow:
ICE027A 3 END OF FIELD BEYOND MAXIMUM RECORD LENGTH
Thanks in advance.