I have two input files
i/p1
name id-key flag date
i/p 2
name id-key date
if id-key matches in the both the files then it should
write the output file from i/p1 with flag 'Y'. It should be
done thru JCL sort card ,Please provide the info on this.
---Note : output file should have all records from i/p1
with proper Flag.
Answer Posted / vivek chandrasekaran
Give the two input files to be compared as
//SORTIN DD DSN=INPUT1,DISP=SHR
// DD DSN=INPUT2,DISP=SHR
//SORTOUT DD DSN=OUTPUT,DISP=...
//SORTXSUM DD DSN=MATCH,DISP=(NEW,CATLG,DELETE),..
//SYSIN DD *
SORT FIELDS=(11,5,CH,A),EQUALS
SUM FIELDS=NONE,XSUM
Considering name length 10 and key length 5 starting from
11 pos. XSUM will capture the duplicates. EQUALS will keep
the first duplicate record. To put 'Y' flag use OUTREC
FIELDS=(1:1,15,16:C'Y',17:17,8) considering date length 8
starting from 17 pos.
SUM FIELDS=NONE
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what sort card you will use to copy the data from one dataset to another dataset?
What is the use of disp parameter?
What are the parameter we cannot use in procedure?
What is the function of dd name parameter with a 2 part structure; audit.report?
Give the syntax of job specifying jcl statement.
in a jcl, a large volume dataset is loaded to a table using bmcload in step1 and an image copy of the loaded table is taken using bmccopy in step2. Step2 abends because the image copy dataset cannot hold the volume of the table. How can this be rectified?
How do you submit a job for execution?
How to override loadlib?
what are JCLLIB and STEPLIB in JCL?
Is automatic restart possible in jcl?
Name the statement which can be used to send data to another mvs jes3 node?
Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?
Is automatic restart possible in jcl? If yes, how?
Is it possible to left uncode disp? If yes, how?
Is their any limit for data sets?