I have 3 duplicate records in a file .
I want to eliminate 1st, 2nd and copy 3rd one only . HOW ?
Answers were Sorted based on User's Feedback
so , first sort the PS using JCL SORT utility and update the
PS file.
find the duplicates using XSUM . and write the duplicates
alone in a seperate PS.
take the seperate PS and give the control condition inside
SYSIN DD * as , sort fields with skiprec(3), since u need
only the 3rd one to copy
Is This Answer Correct ? | 16 Yes | 2 No |
Answer / vivek chandrasekaran
:
Use ICETOOL to solve the request in 1 step
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(p,l,t) LASTDUP
/*
Where p - position, l - length, t-type(CH,PD..)
Is This Answer Correct ? | 5 Yes | 0 No |
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
can we bowse or edit the GDG dataset if it is a tape entry?
How does -818 sql error occur? Why does it happen and what can be done to overcome this error code?
What do you feel makes a good program?
is there any utility for restarting a particular step in jcl reply soon ?
What is JOBLIB ?
What are three parameters you can specify on Job statement as well as on exec stmt ?
after submiting the jcl.how do you know that the job has been completed.
How do you override a parameter in Positional parameters?
As PARM can supply information to a program ? Can PARM be used to supply information to a cataloged or Inline Procedure also ?
HOW TO CONVERT VARIABLE BLOCK TO FIXED BLOCK ?
What is use of restart and how to use it?