copy already sorted data

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

copy already sorted data

Postby jnkarthik » Sun Nov 21, 2010 5:29 pm

I have two input files as below
In1 Dataset name 'MY.DATA1'
Var1 DATA1
----- --------
XYZ 20000
abc 25000
123 30000

in2 Dataset name 'MY.DATA2'
------ ------- ------- ------- --------
XYZ 05000 a b c
abc 17000 a
123 10000 X

My Output should be as below
XYZ 20000 a b c
abc 25000 a
123 30000 X

My DATA1 in input file is update data which i need to update in INPUT2 rest of input2 should be same.
Can it be achieved in DFSORT?
Can it be updated in 'MY.DATA2' dataset means it will be my input and output dataset as well, can this be done?
Posts: 14
Joined: Wed Oct 20, 2010 3:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copy already sorted data

Postby dick scherrer » Sun Nov 21, 2010 10:34 pm


Do not overwrite input data during a process (sort or otherwise). If there is a problem, the input data is corrupted/destroyed. Well managed environments will not allow this.

Process the 2 input files and write a new output file.

Yes, this can be done using DFSORT. Suggest you review topics that JOIN 2 files. There are examples in the forum.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: copy already sorted data

Postby Frank Yaeger » Tue Nov 23, 2010 12:48 am


What is the RECFM and LRECL of each file?

What is the starting position, length and format of each relevant field?
Frank Yaeger - DFSORT Development Team (IBM) -
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at
User avatar
Frank Yaeger
Global moderator
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times



  • Related topics
    Last post