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

Which statement is used to identify the private libraries in job?

674


how to run batch program without jcl?

10072


How can a fb file convert to vb file using sort program?

804


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

747


A dd statement consists of 4 fields. Name them?

928






When output dataset space is required, what quantity categories are used?

826


Explain how can a jobs execution priority be modified?

736


Explain how can the disposition of sysout datasets be set for an entire jobstream?

634


What is the function of the dd avgrec keyword in sms datasets?

837


What is the purpose of dd?

728


Explain the function of the steplib dd statement?

644


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

973


What happens if both JOBLIB & STEPLIB is specified ?

606


What methodology can be adapted to transfer data to a program that is coded using the exec statement?

604


What is jcl in mainframe?

688