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
how to compare two datasets without using superce because output is limited to 133 bytes
how to run batch program without jcl?
what is DSN in JCL and what are the parameters to declare the DSN?
What statement can be used to send data to another mvs jes3 node?
How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?
What do you understand by the term job time – out and how can you overcome that?
What does it mean by Restart and Checkpoint in JCL ? How are checkpoints being taken and what is their usage ? How to use Checkpoint macro on a JOBSTEP ?
if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?
What is the function of dd disp parameter?
what happens in execution stage in job processing?
What is NOTCAT ?
What do you understand by jcl?
In job processing, what happens in execution stage?
What is the purpose of the dd keylen parameter?
What is the syntax of JCL statement?