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
How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?
How can unused space allocation be returned to the system when a dataset is closed?
How do you access an uncatalogued dataset in a jcl?
Explain the function of dd name parameter with a 2 part structure; audit.report?
Explain the function of a dd statement?
How jcl is used for testing batch programs?
how you can access an uncataloged dataset in a JCL?
List the different jcl statements that are not permitted in the procedures?
what are the types of abends that occur on job failure? And explain the possible causes of these
Are there any set of rules for the names of the steps used in a job?
What is the function of the dd dcb keyword?
Explain the purpose of dd * statement in jcl?
Is it possible to code instream data in a PROC?
What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?
How would you understand error(execution phase)?