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 run cobol program using jcl?
Suppose I have a program in cobol name ”careerride” and want to execute the program by jcl. Specify the process?
How can a jobs execution priority be modified?
What is Cataloged Procedures?
How can the disposition of sysout datasets be set for an entire jobstream?
Is acct parameter mandatory?
When space is allocated for an output dataset, what units can be used?
Describe the various parameters utilized in the creation of a gdg?
Explain the hierarchy levels in jcl?
what are the statements that are not valid to be included in an include statement?
How is a type of file defined in the jcl that executes the cobol program?
How can the attributes of one sms dataset be copied to another dataset?
Can we use DISP=SHR in output file in JCL
What is jcl in mainframe?
//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*