View previous topic :: View next topic |
Author |
Message |
kalidasv Beginner
Joined: 05 Mar 2009 Posts: 13 Topics: 8
|
Posted: Fri Mar 06, 2009 1:34 am Post subject: Merging of files of different record lengths |
|
|
Using SORT utility can I merge two files of different LRECL. Say file 1 has LRECL of 300 and file 2 has LRECL of 200. I want the merged file to have LRECL of 300 and all records from file 1 and file 2.
If this is possible, please provide the parameters that need to be used in the SORT step. |
|
Back to top |
|
|
callanand Beginner
Joined: 12 Jun 2007 Posts: 23 Topics: 2
|
Posted: Fri Mar 06, 2009 4:57 am Post subject: |
|
|
Kalidsav.
In sorting concatenate as follows
//SORTIN DD DSN=300 FB FILE,DISP=SHR
DD DSN=200 FB FILE,DISP=SHR
//SORTOUT DD DSN=300 NEW FB OUTPUT FILE,DISP=OLD
//SYSIN DD *
SORT FIELDS=COPY
/* |
|
Back to top |
|
|
superk Advanced
Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Fri Mar 06, 2009 7:20 am Post subject: |
|
|
kalidasv, the files must be of the same format and LRECL in order to perform a MERGE. The shorter records need to be lengthend, or the longer records need to be shortened.
callanand, the operating system does not allow datasets with different attributes to be concatenated. The example you've provided can't possibly work. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|