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
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
Explain the purpose of dd * statement in jcl?
What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?
How does jcl act on a cobol code?
What is the function of //jcllib statement?
Explain about LMQUERY�give a dialog information about a data set
Give the syntax of job specifying jcl statement.
My Question is 1. How to cound no. of records in JCL. Please explain with an example. 2. How to execute only odd steps in JCL? I know EDIT TYPE = Inculde, Step Name = 1,3,5 and COND code for all even step. Anyone knows other than this.
How gdg are concatenated?
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?
What is timing concept in mainframe?
When output dataset space is required, what quantity categories are used?
I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.
Explain how can the attributes of one sms dataset be copied to another dataset?