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
 

 

Problem with 'SUM FIELDS' in dfsort.

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

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Mon Oct 12, 2009 5:05 pm    Post subject: Problem with 'SUM FIELDS' in dfsort.
Reply with quote

I am trying to do a 'SUM FIELD' sort shown below: -

//STEP01 EXEC PGM=SORT
//STEPLIB DD DSN=SYS1.SORTLIB,DISP=SHR
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=IHC$017.CBF.EXTRACT.FIL,
// DISP=SHR
//SORTOUT DD DSN=IHC$017.CBF.EXTRACT.FIL99,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(125,(12,1),RLSE),
// DCB=(LRECL=133,DSORG=PS,RECFM=FM)
//SYSIN DD *
SORT FIELDS=(9,3,ZD,A)
SUM FIELDS=(79,10,ZD)
/*
//

However for two records which has to be summed based on this, the field values are 0000000057 and 0000000057.

However the summed value in the output file is '000000010D' instead of '0000000104'. However once i do hex on, the hex values are showing 104.

Can anyone tell what is the problem and how to eliminate this problem.
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: Mon Oct 12, 2009 8:57 pm    Post subject:
Reply with quote

Add the following to SYSIN:

Code:

    OPTION ZDPRINT


That will give you an F sign for the summed ZD values rather than a C sign (note that both are valid for ZD values).
Back to top
View user's profile Send private message
bijoybabu83

New User


Joined: 15 Jan 2007
Posts: 36
Location: Kerala

PostPosted: Tue Oct 13, 2009 4:25 pm    Post subject: Reply to: Problem with 'SUM FIELDS' in dfsort.
Reply with quote

Thank you so much frank...It worked now.

Can you please tell what is 'F' sign and 'C' sign in DFSORT. Kindly Bear with me for bugging you...
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: Tue Oct 13, 2009 9:20 pm    Post subject:
Reply with quote

A 3-byte ZD value looks like this in hex:

zdzdsd

where z is the zone (usually F), d is a digit (0-9) and s is the sign.

Normally, for ZD fields, the sign is C or F for positive and D for negative. Both C and F are valid signs for positive ZD values. If the F sign is used for positive values, then the value is "displayable" - for example, +123 would be X'F1F2F3' = '123'. If the C sign is used for positive values, then value is not displayable - for example, +123 would be X'F1F2C3' = '12C'.
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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm


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