shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
HI,
Could anyone provide me a solution..for this??
I have 2 inputs.
I need to sort then base on few fields.
If Duplicates are found, i need to add the fields and remove the duplicate record.
INPUT 1:
Code: |
----+----1----+----2
***************
AAABBB 100 1T
XXXYYY 150 11T
KKKVVV 1100101T
***************
|
Input 2:
Code: |
----+----1----+----2
********************
AAABBB 100 1T
XXXYYY 1150 19T
********************
|
I need to sort on the fields frm 1 to 3, then 7 to 13.
The output should have like:
Code: |
AAABBB 200 2T
XXXYYY 1300 30T
KKKVVV 1100101T
|
Thanks in advance
~Vamsi |
|
shreevamsi
Active User
Joined: 23 Feb 2006 Posts: 305 Location: Hyderabad,India
|
|
|
|
hi,
I got it..
This is how it can be acheived.
Code: |
//STEP01 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file1
// DD DSN=... input file2
//SORTOUT DD DSN=... output file
//SYSIN DD *
SORT FIELDS=(1,6,CH,A)
OPTION ZDPRINT
SUM FIELDS=(7,5,ZD,12,3,ZD)
/*
|
~Vamsi |
|