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 you can direct the data to spool using SYSOUT option?
Define concatenating?
What is the function of dd name parameter with a 2 part structure; audit.report?
hello friends ,i have exam in Hsbc,pls any on send me placement papers and technical questions on mainframes,thank u
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 ?
what is use of space parameter in dd statement?
How can a jobs execution priority be modified?
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 statement can be used to send data to another mvs jes3 node?
Where can program checkpoints be stored for use in a restart?
what happens when COND is coded in JOB statement and when COND is coded inside EXEC statement?
List the different jcl statements that are not permitted in the procedures?
what is use of disp parameter in dd statement?
Give the syntax of job specifying jcl statement.
When output dataset space is required, what quantity categories are used?