I have the below requirement and i believe we can implement using JOINKEYS with Build or Overlay function. Can anyone please help me to get the sample code for this requirement.
Input file1, Input file1 and output file are same format. LRECL=90, RECFM=VB.
Starting position and length is mentioned for all the 3 fields.
Field1:1,5 --> Key
I want to compare field1 and field2 if the key matches then
record should be copied from Input file1 and value of field 3 should be overlaid from field 2.
Sample data is mentioned below for the reference.
A0001 12345 99999
B0001 33333 99999
C0001 44444 99999
A0001 11111 99999
C0001 22222 99999
Expected output: from input file
A0001 12345 12345
C0001 44444 44444
Here field3 is copied from field2 of the input file1.
Many thanks in advance..