View previous topic :: View next topic
|
Author |
Message |
priyabrata mohanty
New User
Joined: 04 Mar 2005 Posts: 8 Location: bangalore
|
|
|
|
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 |
|
|
muthukumarapandian
New User
Joined: 08 Oct 2004 Posts: 42 Location: chennai, india
|
|
|
|
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 |
|
|
priyabrata mohanty
New User
Joined: 04 Mar 2005 Posts: 8 Location: bangalore
|
|
|
|
no, i ve checked the input data and its what i ve specified. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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:
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 |
|
|
|