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
what operation is performed by job statement?
Explain how can an in-stream dataset be terminated?
Can we use DISP=SHR in output file in JCL
How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?
What parameter directs the output of the job log dataset?
What is the function of the steplib dd statement?
Explain in DD statement what is the use of DCB parameter?
Explain the purpose of dd * statement in jcl?
What is the function of a dd statement?
We can use PASS with permanent datasets also. THEN Which is the condition in which we may use PASS (instead of KEEP) with permanent data sets, while there is no need to specify UNIT and VOL for them like temporary data sets (in cas we use KEEP for permanent data sets) ?
What is the purpose of disp parameter?
Is their any set of rules for dd? Explain.
Explain how can the submitting users racf authority be overridden in a job stream?
What are the utility programs in jcl?
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ? The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ?