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
Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed
In job processing, what happens in execution stage?
What is the significance of addrspc parameter in exec statement?
What is the purpose of dd?
Is there any command to check wether the ps file is in sorted order?
what is use of disp parameter in dd statement?
How do you submit a job for execution?
Is it possible to left uncode disp?
write a jcl to execute a job by 7:00 am on jan 20,1986?
Is it possible to left uncode disp? If yes, how?
What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?
how do you access an uncataloged dataset in a jcl?
Where can program checkpoints be stored for use in a restart?
How can a jobs execution priority be modified?
what is use of space parameter in dd statement?