I have 3 duplicate records in a file .
I want to eliminate 1st, 2nd and copy 3rd one only . HOW ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can a jobs execution priority be modified?

745


Explain dd statement in jcl?

646


How does the jcl specify the job to os?

698


When output dataset space is required, what quantity categories are used?

834


What are the utility programs in jcl?

652






What are the rules employed while naming the steps in a job?

664


define cond parameter in jcl?

779


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY

862


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 ?

9222


how you can access an uncataloged dataset in a JCL?

656


Can I share my data with other jobs? How?

672


Brief description of inline procedure of jcl.

687


how can the same proc be re-used and called by many jobs?

915


The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?

949


How can a jobs execution priority be modified?

801