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
 

 

Zoned Decimal DFSORT - interpretation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Musab Razeen Ahmed

New User


Joined: 24 Feb 2011
Posts: 15
Location: India

PostPosted: Thu Dec 08, 2011 12:42 pm    Post subject: Zoned Decimal DFSORT - interpretation
Reply with quote

Hi All,

I have a doubt as how DFSORT interprets the character SPACE when we sum a field specified as ZD when it contains a space along with numbers.

eg input files is as follows


01|MUSAB||10
01|MUSAB|02|
01|AHMED||30

| indicates SPACE
and the sort card is as below.

SORT FIELDS=(1,2,ZD,A)
SUM FIELDS=(10,3,ZD)

the result shows as 01|MUSAB|060.

Will DFSORT always interpret the Space as zero(0)? If yes, then does it mean that it does not make any difference if there is a space or zero(0) when summing up fields specified as ZD?

Could anyone please help me over this?

icon_biggrin.gif icon_biggrin.gif icon_biggrin.gif
_____________
Musab Ahmed
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Thu Dec 08, 2011 1:18 pm    Post subject: Re: Zoned Decimal DFSORT - interpretation
Reply with quote

Appendix C of the "DFSORT Application Programming Guide" should give you the answers you want. Let us know if anything is not clear.
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 Dec 08, 2011 10:42 pm    Post subject:
Reply with quote

DFSORT sees a space as X'40'. In the last byte, this is interpreted as a plus sign and a decimal 0 digit. In the other bytes, this is interpreted as a zone (ignored) and a decimal 0 digit. So a space will, in fact, be treated as a 0.
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 How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm


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