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

DFSORT sum fields having duplicate sort keys


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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 Developer


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

PostPosted: Thu Mar 10, 2005 9:44 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top