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
 

 

DFSORT sum fields having duplicate sort keys

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

New User


Joined: 04 Mar 2005
Posts: 8
Location: bangalore

PostPosted: Thu Mar 10, 2005 4:57 pm    Post subject: DFSORT sum fields having duplicate sort keys
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

muthukumarapandian

New User


Joined: 08 Oct 2004
Posts: 42
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: 8
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: 7130
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
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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm


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