Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to get the Zoned Decimal format in Sum fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to get the Zoned Decimal format in Sum fields
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

Site Director


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

PostPosted: Wed Feb 25, 2009 10:49 am    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Feb 25, 2009 9:05 pm    Post subject:
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

Site Director


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

PostPosted: Thu Feb 26, 2009 12:40 am    Post subject:
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 Moderator


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

PostPosted: Thu Feb 26, 2009 12:47 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us