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
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 / abhaytronics
|Is This Answer Correct ?||13 Yes||4 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 ?||4 Yes||0 No|
How dummy is used in jcl?
What are the keywords associated with DCB? How can you specify DCB information? What is the OS precedence for obtaining that DCB information, ie. where does the system look for it first?
How system will identify whether user wants to create PS or PDS? If answer is SPACE parameter then why we need to pass ps or po as dataset organisation while creation
Describe the various parameters utilized in the creation of a gdg?
how to modify the copy book?explain with examples
What parameters can be used to limit the number of records written to a sysout dataset?
what sort card you will use to copy the data from one dataset to another dataset?
what is force complete
Can an individual step be restricted from using all the jobs allowed cpu time?
can u explain gdg with example wht happens if we give limit,empty,noempty,scartch and no scartch
Is it possible to define dd statements as you want?
what's the significance of freespace(0 0) and freespace(100 100)