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?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sk
Sort the file in decrement order , the key of sort is
Company name and company code, and also use SUM FIELDS =
NONE , then it will remove the duplicates also
Is This Answer Correct ? | 0 Yes | 0 No |
How many types of parameters are used in JCL and what are mandatory parameters of JOB statement.
what is full form of AIX
What is the improvement to COND= in the latest version of MVS?
How to use COND Parameter in jcl
whats the difference between empty and noempty of GDG?
How much space OS allocates when you create a PS or PDS?
What is the difference between the JOBLIB and the STEPLIB statements?
i have a jcl containing header body and trailer .in header i have viswa body 2 6 1 9 7 trailer reddy .now i need to sort only body in either asecending or descending order how can i do it
How do You skip a Step In JCL?
what is the general use of PARM? Give an explanation about the system defined parameters that could be passed through this PARM like XREF,LIST,LET,APOST,RENT etc..
what is DSN in JCL and what are the parameters to declare the DSN?
In job processing, what happens in conversion stage?