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 |
what is a cataloged procedure ?
I have 15 flat files. each record in the files have the monthly salary for 12 months with the employee number. Now I want to concatenate the 15 files such that for the employee numbers that are common the o/p file should have only one record and the salaries should be concatenated to that record. How can we do it with JCL?
Suppose I have seven jobs to do, but I want to hold one than how can I do this?
What is Uncatalog dataset? How can we access/use them?
How do you override a specific DDNAME/SYSIN in PROC from a JCL?
What are the utility programs in jcl?
How to print the Output to SPOOL using MSGCLASS and SYSOUT ?
Can we delete the data using IEFBR14 , IEBGENER??
How do you restart a PROC from a particular step?
How to test thru JCL if any file(PS or VSAM) is empty or not. I do not want to use any COBOL prog or Ezytrieve and want to do using utility.
i have five step in jcl.my forth step is gdg.gdg was abend.when will job complete,hoe to handle you
01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable