Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


I have a File that has duplicate records. I need only those
records that occur more than thrice.

Answers were Sorted based on User's Feedback



I have a File that has duplicate records. I need only those records that occur more than thrice...

Answer / jammi

can use icetool utility to can select the records which has
more than thrice or more
//sysin dd *
select from(idd) to(outdd) on(stpos,leng,type)
nodups/alldups/lower(n)/higher(n)/equal(n)

set n=3 in higher rest are optional try this and let me know

Is This Answer Correct ?    5 Yes 1 No

I have a File that has duplicate records. I need only those records that occur more than thrice...

Answer / pradip anand

//USERIDR JOB (M,92950000,,9999),'N=TSO.ICETOOL',MSGCLASS=M,
// CLASS=M,NOTIFY=USERID
//*
//STEP001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
//SORTIN DD DSN=INPUT.FILE1,DISP=SHR
// DD DSN=INPUT.FILE2,DISP=SHR
//*
//EQDUPES DD DSN=OUTPUT.FILE.REC,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
// DCB=(LRECL=200,RECFM=FB,BLKSIZE=0,DSORG=PS),
// SPACE=(CYL,(30,30),RLSE)
//TOOLIN DD
*
SELECT FROM(SORTIN) TO(EQDUPES) -

ON(4,4,CH) EQUAL(N)
/*


Example:

Input File1:
000 1111 12356908
001 1212 54321234
002 1323 78654323
003 5656 98765456

Input File2:
000 1000 12356908
001 1212 99999999
002 1323 77777777
003 5656 88888888


Output File:
When EQUAL(1)
000 1000 12356908
000 1111 12356908

When EQUAL(2)
001 1212 54321234
001 1212 99999999
002 1323 78654323
002 1323 77777777
003 5656 98765456
003 5656 88888888

mail me if still have any doubt.

Is This Answer Correct ?    3 Yes 0 No

I have a File that has duplicate records. I need only those records that occur more than thrice...

Answer / brian

Sort the file in ascending order of your duplicated fields.
You can write a COBOL module to read the file sequentially.
Set up a dup-counter in Working Storage. Set up a group of
fields in Working Storage to hold duplicated fields. They
should be similar to what you are sorting on. Save each
records read fields after reading it. When you read the
current record compare it to the saved fields. If they
match add to your dup-counter. If they don't match zero
out your counter. After adding to your counter check the
value. If > 1 you have a 3rd duplicate. Write that record
to a duplicate output file. Hope I'm close to getting you
an answer.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More JCL Interview Questions

can any one plzzzzzz tell the jcl code for creating ps using idcams

2 Answers   Fiserv,


What does a disposition of (NEW,CATLG,KEEP) mean?

1 Answers   Cap Gemini,


How to print the Output to SPOOL using MSGCLASS and SYSOUT ?

4 Answers   IBM,


why do we use file-aid wht r the adv of using file-aid thn in ispf

7 Answers   HCL, Tech Mahindra,


HOW TO CONVERT VARIABLE BLOCK TO FIXED BLOCK ?

1 Answers   IBM,


How can values be passed from the job stream to an executable program?

0 Answers  


what is the function of spool command?

4 Answers  


i have 5 steps to execute in that i want to skip 3nd step and start execute from forth step how can u do this.

7 Answers   Syntel,


I have 60 steps in the JCL and want to Execute Only First from PROC by overriding in JCL ?

0 Answers  


If Region=0k means What Happen?

2 Answers   IBM,


What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?

0 Answers  


What is difference between Return Code, user completion code, Abend code and reason Code?

2 Answers   IBM, Satyam, Wipro,


Categories