How to exclude the duplicate records from two concateded
flat files (records from both files must be removed)?



How to exclude the duplicate records from two concateded flat files (records from both files must ..

Answer / mayank

We can use SORT to exclude the duplicate
SORT FIELDS=NONE remove the dup from fileC

//STEP1 PGM=SORT
//*** concatinated input files
//SORTIN DD DSN=FILEA,DISP=SHR
// DD DSN=FILEB,DISP=SHR
//** output file contains records except for duplicate
//SORTOUT DD DSN=FILEC,
// DISP=(NEW,CATLG,DELETE),
// VOL=SYSDA,
// SPACES=(CYL(1,1),RLSE),
// DCB=(LRECL=80,RECFMT=F,BLKSIZE=0)
//** give the sort parameter in below sysin
//SYSIN *
SORT FIELDS=(start postion of rec, length of
rec,attribute, A/D)
SUM FIELDS=NONE

Is This Answer Correct ?    7 Yes 2 No

Post New Answer

More JCL Interview Questions

diff bw vsam and normal flat file?

2 Answers   CGI,


wht happens if cond=true ? pls give me with an example ?

2 Answers   Syntel,


What will happen if we write two STOP RUN's in a COBOL program?

4 Answers   Satyam,


Write a jcl to execute a job by 7 a.m on Jan 20,1986 ?

5 Answers   Maples, Patni, TCS,


in my jcl have 20 steps step1,step2,.... step20.and i have to execute step1,step2,..and skip the step3 and remaing step4,step5 are execute? i want skip step3 only? what code u can write?

3 Answers   Patni,






Hi, Say I have 10 flat files and I want to copy all these 10 flat files to a GDG versions flat files (I have GDG base: FDWS01.TEST.RESTORE) in one shot. Can we do that in one shot using a JCL. May be by using IEBGENER. It's a bit urgent. So anyone's fast rely would be appreciated.. Thanks in advance.. 10 flat files ----------------------------------- FDWS01.SUB.RESTORE1 FDWS01.SUB.RESTORE2 FDWS01.SUB.RESTORE3 ; ; FDWS01.SUB.RESTORE10 TO GDG versions ----------------------- FDWS01.TEST.RESTORE.G0001V00 FDWS01.TEST.RESTORE.G0002V00 FDWS01.TEST.RESTORE.G0003V00 ; ; FDWS01.TEST.RESTORE.G0010V00

2 Answers  


what is the function of spool command?

4 Answers  


My requirement is : How to populate a empty PS/flat file with ONLY spaces in the first line. You should not use any input dataset to do this. I'm not sure whether you may use any utility for this purpose?

2 Answers   HCL,


What is the difference between catalogue procedure and In-Stream procedure?

2 Answers  


How is a dataset passed from one step to another?

2 Answers   DELL,


When should DISP=MOD is used?

6 Answers   TCS,


In sms datasets, what is the function of the dd mgmtclas keyword?

0 Answers  


Categories