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

Zoned Decimal DFSORT - interpretation


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Musab Razeen Ahmed

New User


Joined: 24 Feb 2011
Posts: 16
Location: India

PostPosted: Thu Dec 08, 2011 12:42 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7310
Location: Inside the Matrix

PostPosted: Thu Dec 08, 2011 1:18 pm
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 Developer


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

PostPosted: Thu Dec 08, 2011 10:42 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DECIMAL HOST VARIABLE OR PARAMETER 14... DB2 7
No new posts DFSORT to add 6 hours to time(tdate-t... DFSORT/ICETOOL 16
No new posts Packed decimal to Alphanumeric COBOL Programming 2
No new posts SOC7 error with DFSORT DFSORT/ICETOOL 9
No new posts HOW TO OVERLAY A Packed decimal VALUE... DFSORT/ICETOOL 5
Search our Forums:

Back to Top