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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How can return codes be tested before execution of a job step?

929


What is Cataloged Procedures?

715


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

1811


What are hierarchy levels in jcl?

960


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

1011






What is the function of a dd statement?

709


what is the use of IEBGENER utility?

662


What is jcl in mainframe, and how many types of jcl statements are there for a job?

633


What statement can be used to send data to another mvs jes3 node?

831


what is use of space parameter in dd statement?

758


what operation is performed by job statement?

663


how JCL works?

802


What are steplib and joblib?

725


What is the purpose of dd?

728


Explain dd statement in jcl?

646