We have two PS files,want to compare those files and put
the duplicate records in one file.
Input file 1 contains(1,2,4,9,10)
Input file 2 contains (1,4,5,11,12,14,16).

Help me with jcl.

Answer Posted / abhusha

Use join keys
//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTJNF1 DD DSN=INPUT.FILE.ONE,DISP=SHR
//SORTJNF2 DD DSN=INPUT.FILE.TWO,DISP=SHR
//SORTOUT DD DSN=OUTPUT.FILE,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(100,200),RLSE),
// DCB=(RECFM=FB,BLKSIZE=0,LRECL=80)
//SYSIN DD *
SORT FIELDS=COPY
JOINKEYS FILES=F1,FIELDS=(1,10,A)
JOINKEYS FILES=F2,FIELDS=(1,10,A)
REFORMAT FIELDS=(F1:1,71,F2:1,9)
/*

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is concatenating?

635


List in order the hierarchical levels of jcl?

666


IIN APITUDE THEY GAVE ONLY 10 QUESTIONS.. THEY ARE SIMPLE ONE FROM NUMBER SERIES,BOATS,TIME & DISTANCE,PROFIT &LOSS,FIND OUT THE NUMBER ? 9 25 4 36 81 64 49 AND surveillance SPELLINGS E.T.C

1625


what is DSN parameter and DISP parameter is used for?

674


What is the function of dd disp parameter?

654






Are there any set of rules for the names of the steps used in a job?

635


Are there any set of rules for the names of the steps used in a job? What are they?

612


List the different components of jcl statement?

691


How to do automated restart when a job abend?

791


Name a few IBM utility programs, and explain its function.

4438


what is use of disp parameter in dd statement?

661


Explain the function of the steplib dd statement?

644


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

821


What happens if both JOBLIB & STEPLIB is specified ?

606


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?

1807