Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DFSORT/ICETOOL :: RE: Add PD field from 2nd file to PD in 1st

$
0
0
Author: Sushant Garje
Subject: Reply to: Add PD field from 2nd file to PD in 1st
Posted: Fri Dec 02, 2016 1:50 pm (GMT 5.5)

Thank you Bill,

It worked even without the LENGTH= parameter.
Please find below the control card that worked for my requirement.
Code:

JOINKEYS FILE=F1,FIELDS=(1,8,A,28,3,A)                       
JOINKEYS FILE=F2,FIELDS=(1,8,A,28,3,A)                       
JOIN UNPAIRED F1,F2                                         
REFORMAT FIELDS=(F1:1,30,F2:1,30),FILL=C'$'                 
OPTION COPY                                                 
OUTFIL FNAMES=SORTOF01,INCLUDE=(1,1,CH,NE,C'$',AND,         
                               31,1,CH,NE,C'$'),             
                       BUILD=(1,16,                         
                             17,8,PD,ADD,47,8,PD,TO=PD,     
                             25,6)                           
OUTFIL FNAMES=SORTOF02,INCLUDE=(31,1,CH,EQ,C'$'),BUILD=(1,30)


In above, I used SORTOF01 to get my intended result for matched records with added amount fields.
But I had stated in my first post, I need the unmatched records from the File 1 (driver file) as well.
So, I am using SORTOF02 to get those unmatched records from File 1.
In the next step, I will merge the file from SORTOF01 and SORTOF02 to get the final required file.

I have multiple PD fields in my actual file, for which I will repeat the same logic for other fields in SORTOF01.

Thank You again!
_________________
Sushant G


Viewing all articles
Browse latest Browse all 8500

Trending Articles