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
what is DD statement is used in JCL?
how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?
What are the 4 fields in dd statement?
which utility is used to run a cobol-db2 program?
Can we call instream to catalog and catalog to instream?
What is the difference between the positional and keyword parameters? Give examples.
Is condition checking possible in jcl? If yes, how?
In job processing, what happens in conversion stage?
What is Cataloged Procedures?
How can the disposition of sysout datasets be set for an entire jobstream?
Explain the function of dd disp parameter?
List the different components of jcl statement?
write a jcl to execute a job by 7:00 am on jan 20,1986?
Explain dfsort utility?
How jcl is used for testing batch programs?