rohit4u
New User
Joined: 06 Oct 2006 Posts: 6
|
|
|
|
Hi, I hava requirement as follows.
I have two files
1. header file
2. Detail fiel.
Header file has last column 123 for 1 record
and also detail file has last columns 123 for 3 records. i mean these two files to be merged like
1 header record followed by 3 detail records (last column 123). Please let me know how to merge like this?
Thanks for the help in advance.
Regards,
Rohit |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you have a header file and a detail file, both with RECFM=FB and the same LRECL, and you want an output file with the header records followed by the detail records, you can use this DFSORT job:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... header file
// DD DSN=... detail file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
/*
|
Note that this is a copy, not a merge. A merge requires the use of a key for previously sorted files. |
|