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


Please Help Members By Posting Answers For Below Questions

What are some jcl statements that are not allowed in procedures?

721


what is SOC4 error?

732


How do you submit a job for execution?

634


what is DD statement is used in JCL?

675


What are the 4 fields in dd statement?

737






Mention the types of job control statements?

678


What is notcat 2 - gs?

929


how do you code a null statement?

768


how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?

790


whats the diff bw the evaluate also and and?

1846


Where & How Do You Code Identifier In Jcl?

691


When space is allocated for an output dataset, what units can be used?

738


by using cond parameter maximum 8 cond can be coded in single cond means ?explain

969


What parameters can be used to limit the number of records written to a sysout dataset?

740


what is the use of JCL?

658