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 / shriram supalwar, dharmabad
//jobcard
//step1 exec pgm=iebgener
//sysprint dd sysout=*
//sysut1 dd dsn=proj.test.file1,disp=shr
// dd dsn=proj.test.file2,disp=shr
//sysut2 dd dsn=proj.output,disp=shr
//sysin dd dummy
//if (step1.rc eq 0) then
//step2 exec pgm=sort
//sysprint dd sysout=*
//sortin dd dsn=proj.output,disp=shr
//sortout dd dsn=proj.sortout,disp=shr
//sortxsum dd dsn=proj.duplicate,disp=shr
//sysin dd *
sort fields=(1,5,ch,a)
sum fields=none,xsum
/*
Now, all these records are copied to proj.output
and out of those records the duplicate records are copied to
proj.duplicate
Correct me if i am wrong
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Which statement is used to identify the private libraries in job?
how to run batch program without jcl?
How can a fb file convert to vb file using sort program?
When space is allocated for an output dataset, what units can be used?
A dd statement consists of 4 fields. Name them?
When output dataset space is required, what quantity categories are used?
Explain how can a jobs execution priority be modified?
Explain how can the disposition of sysout datasets be set for an entire jobstream?
What is the function of the dd avgrec keyword in sms datasets?
What is the purpose of dd?
Explain the function of the steplib dd statement?
by using cond parameter maximum 8 cond can be coded in single cond means ?explain
What happens if both JOBLIB & STEPLIB is specified ?
What methodology can be adapted to transfer data to a program that is coded using the exec statement?
What is jcl in mainframe?