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 read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
What do you understand by jcl?
Is their any limit for data sets?
What is concatenating?
Is their any set of rules for dd? Explain.
Name a few IBM utility programs, and explain its function.
Explain how can the attributes of one sms dataset be copied to another dataset?
How dummy is used in jcl?
When output dataset space is required, what quantity categories are used?
What is one line to pass PARM from JCL to COBOL?
Is it possible to code instream data in a PROC?
How can values be passed from the job stream to an executable program?
in ways data can be passed to a COBOL program from JCL?
Why block size is multiple of lrecl in jcl?
Explain how can the disposition of sysout datasets be set for an entire jobstream?