vivekanand Warnings : 1 New User
Joined: 23 Feb 2006 Posts: 2 Location: Bangalore
|
|
|
|
Hi ,
I am trying to extract a maximum value from a list of value in a sequential file thru Syncsort .
Codition is as follows,
Input file records
Report-1 101
Report-1 200
Report-1 205
Report-1 500
Report-1 400
Required Output File
Report-1 500
pls share your ideas on this requirement |
|
Ayyappan
New User
Joined: 05 Jul 2005 Posts: 31 Location: India
|
|
|
|
Hi,
Please execute the following steps.
Code: |
//STEP01 EXEC PGM=SORT
//SORTIN DD DSN=&HLQ..INPUT.FILE, *input file
// DISP=SHR
//SORTOUT DD DSN=&&TEMP,
// DISP=(NEW,PASS),
// UNIT=SYSDA,SPACE=(CYL,(800,200),RLSE),
// DCB=(*.SORTIN)
//SYSIN DD *
SORT FIELDS=(10,3,CH,D)
SUM FIELDS=NONE
/*
//STEP02 EXEC PGM=SORT
//SORTIN DD DSN=&&TEMP,
// DISP=(OLD,PASS)
//SORTOUT DD DSN=A021680.OUTPUT.FILE, *Output file
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(CYL,(800,200),RLSE),
// DCB=(*.SORTIN)
//SYSIN DD *
SORT FIELDS=COPY,STOPAFT=1
/*
|
Thanks.
Ayyappan |
|