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 |
Is automatic restart possible in jcl? If yes, how?
What is the difference between a PDS member and a GDG Generation ? Is it only this, that with a generation we can use +1, 0, -1 etc while with PDS member we can not ?
common jcl abends??
In my JCL 10 Steps Will Be there Now i want to execute step05 And step06. How to Give the Cond?
A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?
What are the causes for S0C1, S0C4, S0C5, S0C7, S0CB abends ?
A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?
delete rules in db2
Can we use COND=EVEN on a job card, when jobs are scheduled through scheduler?
Can a PROC CALL another PROC ? (in both Instream and Cataloged cases) ?
What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?
How to execute step2,step5,step7 of a proc of 10 steps? You are not allowed to change in JCL.