Suppose a proc step has a DD statement like
//ABC DD DSN=TEST.FILE1,DISP=SHR
DSN=TEST.FILE2,DISP=SHR
and the above DD name is overridden from the JCL as given
below
//procstepname.ABC DD DSN=TEST.FILE3 - Will the DD
statement now have just TEST.FILE3 or it will be TEST.FILE3
and TEST.FILE2?
Suppose if it is overridden twice like
//procstepname.ABC DD DSN=TEST.FILE3
//procstepname.ABC DD DSN=TEST.FILE4
Will this give a JCL error? If not, what will be final
output?

Answers were Sorted based on User's Feedback



Suppose a proc step has a DD statement like //ABC DD DSN=TEST.FILE1,DISP=SHR DSN=TEST.FIL..

Answer / satheesh

Q1:
If you CODE below ovverride in JCL
//PROCSTEPNAME.ABC DD DSN=TEST.FILE3
it will ignore File1 & file2.
To use all three files, please give below override in JCL
//PROCSTEPNAME.ABC DD
// DD
// DD DSN=TEST.FILE3

Q2:Giving two ovverrides for same DD, will it give JCL
error.
No, Job will end with RC=0 and use second override ingonred
first one.

Is This Answer Correct ?    10 Yes 0 No

Suppose a proc step has a DD statement like //ABC DD DSN=TEST.FILE1,DISP=SHR DSN=TEST.FIL..

Answer / pmacmo

Question 1:
TEST.FILE3 and TEST.FILE2
Note:
If you just want TEST.FILE3 you must nullify the TEST.FILE1
and TEST.FILE2 concatenation as in:
//procstepname.ABC DD DSN=TEST.FILE3.DISP=SHR
// DD DSN=NULLFILE

Question 2:
TEST.FILE3 and TEST.FILE2, the second override will be
ignored

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More JCL Interview Questions

Is there any command to check wether the ps file is in sorted order?

4 Answers  


Can I send output of job to my remote device careerride123?

0 Answers  


when does a dataset go uncataloged?

0 Answers   IBM,


how many max steps can we use in a job? pls answer to my question

9 Answers   TCS,


A maximum of 100 chars can be passed to Cobol through Parm in JCL, If we want to pass more than 100 Chars how we can do it ?

3 Answers   IBM,






Can we DELETE all the Generations of a GDG at once, WITHOUT deleting the GDG itself ?

7 Answers   IBM,


How many steps we can overide in the proc's?

2 Answers   CS,


What is STEPLIB, JOBLIB? What is it used for?

2 Answers  


what is symbolic parameters in jcl, what is a temparary data set ? where do u use ?

2 Answers   Verizon,


How to execute a set of JCL statements from a COBOL program ?

6 Answers  


Explain about LMCOPY -

1 Answers  


What is SORT ? How do we eliminate duplicate records ? How do I select some records using SORT ?

9 Answers   GE, Xansa,


Categories