View previous topic :: View next topic
|
Author |
Message |
raghavmcs
Active User
Joined: 14 Jul 2005 Posts: 105
|
|
|
|
I'm trying to sum all the value in a file and display in sysout. The field starts at position 964 and has a (COBOL) definition as S9(12)V9(6). I'm using following sort card for getting the totals in this column 964, sortout is coming out blank.
Code: |
OPTION COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=(964:TOT=(964,10,PD,TO=PD))
|
|
|
Back to top |
|
|
raghavmcs
Active User
Joined: 14 Jul 2005 Posts: 105
|
|
|
|
Just to add my input file is not empty and data type of field is comp-3.I missed that adding initially |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
raghavmcs,
Your output total is also a 16 byte PD field which you cannot see in normal mode. You need to type HEX ON and look at the contents of it in pos 964. |
|
Back to top |
|
|
raghavmcs
Active User
Joined: 14 Jul 2005 Posts: 105
|
|
|
|
Thanks,what change I should make in my jcl to get that normally...I think we have keywork,sorry not frequently use them wiht dfsort..!!!
and yes Inow see it on 964 in packed. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Your result would be a 16-byte PD field starting in position 964.
PD fields are NOT readable (e.g. a 10-byte PD value might be X'0000000000000000501C' which would not be displayed as anything you could read directly), so to see the actual output, you would have to display it in hex or convert it back to character.
Also, do you really want the output value at position 964 rather than at position 1? |
|
Back to top |
|
|
raghavmcs
Active User
Joined: 14 Jul 2005 Posts: 105
|
|
|
|
Thanks I changed TRAILER1=(964:TOT=(964,10,PD,TO=PD)) to
TRAILER1=(1:TOT=(964,10,PD,TO=PD)) and now I can see sum in position 1 with hex on |
|
Back to top |
|
|
|