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



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

Answer / vignesh1988i

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

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

Answer / abhaytronics

use 'sumfields'

Is This Answer Correct ?    13 Yes 4 No

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

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



Post New Answer



More JCL Interview Questions

How dummy is used in jcl?

0 Answers  


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?

2 Answers  


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

1 Answers  


Describe the various parameters utilized in the creation of a gdg?

0 Answers  


how to modify the copy book?explain with examples

2 Answers   TCS,






What parameters can be used to limit the number of records written to a sysout dataset?

0 Answers  


what sort card you will use to copy the data from one dataset to another dataset?

0 Answers   IBM,


what is force complete

2 Answers   IBM,


Can an individual step be restricted from using all the jobs allowed cpu time?

0 Answers  


can u explain gdg with example wht happens if we give limit,empty,noempty,scartch and no scartch

1 Answers   IBM,


Is it possible to define dd statements as you want?

0 Answers  


what's the significance of freespace(0 0) and freespace(100 100)

3 Answers  






Categories