Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
It's not clear what you want to do. If both files are in sorted order, you can MERGE them. If the first file has 100 records and the second file has 30 records, then the output file would have 130 records. Since you say you expect the output file to have 100 records, I can only guess that the 30 records in the second file have duplicates in the first file and you only want one record for each pair of duplicates. To do that, you can use this DFSORT job:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN01 DD DSN=... input file 1
//SORTIN02 DD DSN=... input file 2
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION EQUALS
MERGE FIELDS=(p,m,f,A)
SUM FIELDS=NONE
/*
|
p,m,f is the position, length and format of the field the records are sorted on (e.g. 11,5,CH). A means the records are sorted in ascending order. If they are actually sorted in descending order, use D instead of A.
If that's not what you want, then please explain more clearly what it is you want. Examples of the input records and expected output records would help. |
|