Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
help:dfsort sum fields

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
priyabrata mohanty

New User


Joined: 04 Mar 2005
Posts: 9
Location: bangalore

PostPosted: Thu Mar 10, 2005 4:57 pm    Post subject: help:dfsort sum fields
Reply with quote

hi members,
i have an input ps which i want to sort and find the sum of records having
duplicate sort keys in the following format.

both input and output ps r in FB and each has arecord length of 80 bytes.

input ps
---------
KRISHNA 3000
PRIYABRATA5000
SATYA 3000
PHILIPS 5000
CHARLES 2000
PRIYABRATA2000

output ps should be in this format
--------------------------------------
CHARLES 2000
KRISHNA 3000
PHILIPS 5000
PRIYABRATA7000
SATYA 3000


my jcl is:
//SPST104A JOB (SPST104A), 'SORT PGM', .......other parameters....
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=SPST104.INDATA, DISP=SHR
//SORTOUT DD DSN=SPST104.OUTDATA,DISP=(,CATLG,DELETE),
..................other dd parameters specified here..................
..................(recfm is FB,recl is 80 bytes)..................
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=(11,4,ZD)
/*

i have created the input ps(spst104.indata) and inserted data using ispf edit option(3.4).

after i submitted the jcl i got maxcc=0. but when i opened the output ps(spst104.outdata), it was in the following state:

output ps
-----------
CHARLES 2000
KRISHNA 3000
PHILIPS 5000
PRIYABRATA700{ <-------------------- note this
SATYA 3000

can anybody tell me whats the problem here and how to solve it?
Back to top
View user's profile Send private message
References
muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 44
Location: chennai, india

PostPosted: Thu Mar 10, 2005 7:02 pm    Post subject:
Reply with quote

Hi,

Plz check ur input i think u gave -7000 as input specified in the note the sign is combined with the 0 to give {.
Back to top
View user's profile Send private message
priyabrata mohanty

New User


Joined: 04 Mar 2005
Posts: 9
Location: bangalore

PostPosted: Thu Mar 10, 2005 7:11 pm    Post subject: Re: help:dfsort sum fields
Reply with quote

no, i ve checked the input data and its what i ve specified.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Thu Mar 10, 2005 9:44 pm    Post subject:
Reply with quote

The '{' is C0. C is a valid positive sign for ZD values, but makes the last digit "unreadable". If you want the last digit to be readable, use:

Code:

   OPTION ZDPRINT


ZDPRINT tells DFSORT to use an F sign instead of a C sign for positive summed values. With the F sign, the last digit will be F0 = '0', so the value will be displayed as 7000 instead of 700{.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1