View previous topic :: :: View next topic
|
Author |
Message |
Amit V Kumar
New User
Joined: 04 Feb 2008 Posts: 2 Location: Pune
|
|
|
|
I have to sum on a field which is a comp like
00086P
00524K
003856
001969
002846
I am using dfsort (sum fields) but giving SOC7, can anybody help in resolving it......... |
|
Back to top |
|
 |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Chennai
|
|
|
|
These two data seems to be alpha numeric.This will result in SOC7 when you try to sum. |
|
Back to top |
|
 |
dick scherrer
Site Director
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
|
|
|
|
Hello,
Please post your jcl and control statements as well as the dcb info for the file.
The values posted are not comp - they look like zoned decimal. The first 2 values are negative (if these are actually zoned decimal). Coded properly, you will be able to sum these numbers with no 0c7. |
|
Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 7130 Location: San Jose, CA
|
|
|
|
As Dick said, these look like ZD values, not comp (BI) values. If I use a DFSORT job like this:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
00086P
00524K
003856
001969
002846
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION ZDPRINT
SORT FIELDS=(10,1,CH,A)
SUM FIELDS=(1,6,ZD)
/*
|
I get a RC=0 and SORTOUT has:
002562
So you need to give more details about what exactly you're doing that gives you the 0C7. |
|
Back to top |
|
 |
Amit V Kumar
New User
Joined: 04 Feb 2008 Posts: 2 Location: Pune
|
|
|
|
Hi Frank/Dick,
You are right that is ZD only and the option you gave it worked for me
Thanks a lot |
|
Back to top |
|
 |
|