I have a requirement to extract the file, I used Key file as a FB file of 20 LRECL and the data file as 4096 LRECL VB file. The actual data is only 4092 and 4 byte is RDW.
My keys are @ first 10 position in both the Key and the data file. I used SORT to match between these two files and extract the data. Below is the sort Card.
Code: Select all
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(5,10,A)
REFORMAT FIELDS=(F1:1,20,F2:1,4096),FILL=X'FF'
JOIN UNPAIRED
SORT FIELDS=COPY
OUTFIL FILES=01,
INCLUDE=(25,2,BI,NE,X'FF',AND,1,2,CH,NE,X'FF'),
OUTREC=(25,4096)
OUTFIL FILES=02,
INCLUDE=(1,2,BI,NE,X'FF')
OUTREC=(25,4096)
When I tried to execute this match, I got my matched / extracted record to O/P file, but the o/p file is filled with X'FF' till the rest of the record after 1000 position. Could you please advise me what I missed here.
Many thanks,
HK