View previous topic :: View next topic
|
Author |
Message |
sandip_mainframe Warnings : 2 New User
Joined: 20 Sep 2006 Posts: 63 Location: pune
|
|
|
|
Hi,
I want to do addition of field which is numeric(E-SALARY).
data in input file --
Code: |
E-ID E-NAME E-DEPT E-SALARY
21700 RAJESH CHEM 20000
22000 SANDIP CHEM 30000
21900 SHYAM COMP 30000
21500 MANISH IT 30000
21500 TUSHAR IT 30000
21400 SANDIP MECH 20000
21800 RAJESH MECH 30000
21600 TUSHAR MECH 30000 |
I want to addtion of E-SALARY field on the basis of E-DEPT field in sort. I tried following options but the job is getting abended.
Code: |
SORT FIELDS=(17,04,CH,A)
SUM FIELDS=(19,05,CH)
SORT FIELDS=(17,04,CH,A)
SUM FIELDS=(19,05,ZD)
SORT FIELDS=(17,04,CH,A)
SUM FIELDS=(19,05,PD)
SORT FIELDS=(17,04,CH,A)
SUM FIELDS=(19,05,BI)
|
Thanks,
Sandip Walsinge
Edited by Expat to use bb code tags |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Sandip Walsinge,
If you would use BBCode ,
we would know if E-Salary is always in the same relative location
or if it is variably placed based on variable lengths of E-NAME and E-DEPT.
also include, record format, record length, expected output. |
|
Back to top |
|
|
sandip_mainframe Warnings : 2 New User
Joined: 20 Sep 2006 Posts: 63 Location: pune
|
|
|
|
Hi Dick,
Thanks for instant reply. My job ran successfully. The error was with starting position of E-DEPT.
The sort card wordked is like this -
Code: |
SORT FIELDS=(14,04,CH,A)
SUM FIELDS=(19,05),FORMAT=ZD
|
Thnaks,
Sandip Walsinge |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
glad I was 'able to help' and you were able to find your solution. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|