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 |
how can we pass external data to instream procedures
5 Answers IBM, Infosys, Ocwen,
How to get the last but one duplicate record of the file using Sort?
How to see the COMP3 value(packd decimal)
how to allocate a dynamic dataset in jcl ?
what are the various stages of job processing?
What is Uncatalog dataset? How can we access/use them?
How to execute step2,step1,step3 when step1,2&3 are in order
Describe the JOB statement, its meaning, syntax and significant keywords?
what is alternate index?
What is STEPLIB, JOBLIB? What is it used for?
Explain about LMCOPY -
What is 'S0C7' abend?