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
Is their any limit for data sets?
Explain the function of dd name parameter with a 2 part structure; audit.report?
Is it possible to left uncode disp?
How to do automated restart when a job abend?
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?
What is the use of disp parameter?
What is NOTCAT ?
how to do automated restart when a job abends?
what is SOC4 error?
A chkpt is the parameter coded for multi-volume qsam datasets in a dd statement. When a chkpt is coded as chkpt=eov, a checkpoint is written to the dataset specified in the sysckeov statement at the end of each volume of the input/output multi-volume dataset. State whether true or false?
how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?
What is timing concept in mainframe?
what is JCL?
Explain the purpose of dd dummy statement?
What are some jcl statements that are not allowed in procedures?