I had Records in file Like this
Company Code
IBM 2
IBM 1
IBM 4
WIPRO 3
WIPRO 2
WIPRO 9
TCS 4
TCS 6
TCS 3
i want the record of every company with highest code How can
i do that?
Answer Posted / sathish
//STEP1 EXEC PGM=SORT
//SORTIN DD *
IBM 2
IBM 1
IBM 4
WIPRO 3
WIPRO 2
WIPRO 9
TCS 4
TCS 6
TCS 3
//SORTOUT DD DSN=D362967.TEST.PS1,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,12,CH,D)
/*
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=D362967.TEST.PS1,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=NONE
/*
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is the function of the dd avgrec keyword in sms datasets?
Explain about ISPF/TSO Commands
What is the significance of addrspc parameter in the exec statement?
How do you overcome this limitation ?
What is catelog procedure and how many catelog procedure to use in one job?
How can a jobs execution priority be modified?
Explain about LMFREE�free data set from its association with data ID
Explain dfsort utility?
What are the 4 fields in dd statement?
What is the function of the steplib dd statement?
What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?
which parameter is use to declare the name of dataset in dd statement?
What is the function of the dd dcb keyword?
what is the purpose of coding class parameter in job statement?
What is the significance of addrspc parameter in exec statement?