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
how JCL works?
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
I need exexution process for JCL programs
List the different jcl statements that are not permitted in the procedures?
Is condition checking possible in jcl?
List the various advantages of using jcl language?
A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?
What is the format of comment statement?
What is the use of disp parameter?
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?
what happens in execution stage in job processing?
Explain the function of the steplib dd statement?
What are s0c1, s0c4, s0c5, s0c7 and socb?
In job processing, what happens in execution stage?
How is a type of file defined in the jcl that executes the cobol program?