IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to get the Zoned Decimal format in Sum fields


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rupa.srini

New User


Joined: 25 Nov 2008
Posts: 5
Location: Chennai

PostPosted: Wed Feb 25, 2009 9:46 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Feb 25, 2009 10:49 am
Reply with quote

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
View user's profile Send private message
rupa.srini

New User


Joined: 25 Nov 2008
Posts: 5
Location: Chennai

PostPosted: Wed Feb 25, 2009 11:23 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 25, 2009 9:05 pm
Reply with quote

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:

Code:

   OPTION NZDPRINT


NZDPRINT (C sign) will override your site's default of ZDPRINT (F sign).
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Feb 26, 2009 12:40 am
Reply with quote

Hello,

I am obviously missing something. . . icon_confused.gif

How do these:
Code:
1 50                           
1 55                           
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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Feb 26, 2009 12:47 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts InfoSphere OPTIM CSV ouput vs DSNTIUA... IBM Tools 3
Search our Forums:

Back to Top