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 are some jcl statements that are not allowed in procedures?
what is SOC4 error?
How do you submit a job for execution?
what is DD statement is used in JCL?
What are the 4 fields in dd statement?
Mention the types of job control statements?
What is notcat 2 - gs?
how do you code a null statement?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
whats the diff bw the evaluate also and and?
Where & How Do You Code Identifier In Jcl?
When space is allocated for an output dataset, what units can be used?
by using cond parameter maximum 8 cond can be coded in single cond means ?explain
What parameters can be used to limit the number of records written to a sysout dataset?
what is the use of JCL?