Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us