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.

Answers were Sorted based on User's Feedback



I have two input files i/p1 name id-key flag date i/p 2 name id-key date if id-key..

Answer / muttaiah

Please give us a sample of both the I/P files and the data
you expect in O/P files so that it will be useful for us to
answer

Is This Answer Correct ?    0 Yes 0 No

I have two input files i/p1 name id-key flag date i/p 2 name id-key date if id-key..

Answer / 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

More JCL Interview Questions

In jcl i have 255 steps. In 255 step i declared proc. In proc i have 20 steps this job is executable or not? why?

4 Answers  


What is the significance of addrspc parameter in exec statement?

0 Answers  


How can return codes be tested before execution of a job step?

0 Answers  


How to overide the symbol parameter in the jcl ?

3 Answers   UST,


what is the function of spool command?

4 Answers  






What are SD37, SB37, SE37 abends?

4 Answers  


How can an in-stream dataset be terminated?

0 Answers  


how can handle the s0c4 abend???

3 Answers  


what is the use of IEBGENER utility?

0 Answers  


How to identify where file is empty or not? How many ways are there to identifying?

3 Answers   CTS,


What parameter of the job statement is used to limit the cpu time consumed by the job?

0 Answers  


How many types of libraries are there in JCL ?

2 Answers   IBM,


Categories