Help required in SORT

IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Help required in SORT

Postby tjegan » Wed Feb 25, 2015 8:54 pm

Hi All,

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.
Input file1
A0001 12345 99999
B0001 33333 99999
C0001 44444 99999

Input file2
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..
Posts: 33
Joined: Mon Mar 25, 2013 5:58 pm
Has thanked: 0 time
Been thanked: 0 time



  • Related topics
    Last post