View previous topic :: View next topic
|
Author |
Message |
rupa.srini
New User
Joined: 25 Nov 2008 Posts: 5 Location: Chennai
|
|
|
|
Hi,
I am using the below sort
SORT FIELDS=(1,1,CH,A)
SUM FIELDS=(2,3,ZD)
But I am not getting the output in Zoned decimal format,please find the output as below
1105
I expect my output as 110E ?
Please help out.
Thanks,
Rupa.S |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
1105 and 110E are both positive.
Please post your sort control statements (if other than those already posted), a few data records, and the sum from them. |
|
Back to top |
|
|
rupa.srini
New User
Joined: 25 Nov 2008 Posts: 5 Location: Chennai
|
|
|
|
Code: |
//GNC26708 EXEC PGM=SORT
//*****************************
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD *
1 50
1 55
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
INREC FIELDS=(1,1,C'0',3,2)
SORT FIELDS=(1,1,CH,A)
SUM FIELDS=(2,3,ZD)
/*
|
Though both are positive I want the output in ZD format i.e., 1505E.. but I am not getting it? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
1105 is a valid ZD number as is 110E. One has an F sign, the other has a C sign. Both are valid signs for positive ZD numbers. However, if you want a C sign instead of an F sign, you can add the following to SYSIN:
NZDPRINT (C sign) will override your site's default of ZDPRINT (F sign). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I am obviously missing something. . .
How do these:
total this:
Quote: |
Though both are positive I want the output in ZD format i.e., 1505E.. |
1505E equals 15,055. . .
50 + 55 would be 105 (or 10E), wouldn't it? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
For the given example, the result would be 1105 (with ZDPRINT) or 110E (with NZDPRINT).
Since he's summing on 2,3, the '1' in the first position would be kept and the sum for 2,3 would be 105 or 10E.
I ignored the statement about the result being 1505E and just showed how to get the desired sign. |
|
Back to top |
|
|
|