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 / nitika
Use SORTXSUM utility in JCL to get the output.
//JOB1 JOB ,, CLASS = A
//STEP1 EXEC PGM=SORT
//SORTIN DD DSN=TEST.PS.INPUT
//SORTOUT DD DSN=TEST.PS.OUTPUT
//SORTXSUM DD DSN=TEST.PS.OUTPUT
//SYSIN DD *
SORT FIELDS = (1,1,CH,A)
SUM FIELDS = (NONE,XSUM)
/*
Now SUM FIELDS = NONE means no duplicates in the output file
(TEST.PS.OUTPUT)and XSUM means duplicates, in the two files
being matched, should be sent to the file mentioned in
SORTXSUM ddname.
So, output file will have 1,4.
Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
What is the difference between run mode and addressing mode?
Why block size is multiple of lrecl in jcl?
Does jcl support automatic restart?
Explain the jcl exec statement?
What do you know about jcl?
What dd statement is used to supply the name of a dataset?
In sms datasets, what is the function of the dd mgmtclas keyword?
What do you understand by the terms: joblib and steplib?
What is the purpose of dd * statement in jcl?
Is it possible to left uncode disp?
what is use of dcb parameter in dd statement?
What do you understand by the term “keyword” with respect to jcl and what is the opposite of the term?
Which dd parameters are required?
How can an in-stream dataset be terminated?
what is DSN in JCL and what are the parameters to declare the DSN?