sri.sripathi
New User
Joined: 08 Oct 2006 Posts: 2
|
|
|
|
Hi,
could any one please let me know how to add two feilds, each one is from two differnt files using sort,
Input file1 has a record as shown, from col 1 to 16 ;
Total Empe 00005
Input file2 has a record as shown, from col 1 to 16 ;
Total Empe 00005
output file using sort should show as(i.e from 1 to 10 we ahve to remove duplicate and from 12 to 16 we have to add value;
Total Empe 000010
Thanks much in adavance. |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT job that will do what you asked for:
Code: |
//S1 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,10,CH,A)
OPTION ZDPRINT
SUM FIELDS=(12,5,ZD)
/*
|
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|