Which of the following equations are correct? (2 answers)
-
DISP=(,PASS) is equivalent to DISP=(NEW,PASS,KEEP)
-
DISP=(,,KEEP) is equivalent to DISP=(NEW,DELETE,KEEP)
-
DISP=(,,CATLG) is equivalent to DISP=(OLD,CATLG,CATLG)
-
DISP=(OLD,,) is equivalent to DISP=(OLD,KEEP,KEEP)
The correct answers are B and D. DISP=(,,KEEP) defaults to DISP=(NEW,DELETE,KEEP) because missing first position defaults to NEW, second to DELETE. DISP=(OLD,,) defaults to DISP=(OLD,KEEP,KEEP) because missing second and third positions both default to KEEP. Option A is wrong - (,PASS) means (NEW,PASS,DELETE), not KEEP. Option C is wrong - (,,CATLG) means (NEW,DELETE,CATLG), not (OLD,CATLG,CATLG).
To answer this question, we need to understand the syntax and meaning of the DISP parameter in JCL (Job Control Language).
The DISP parameter is used to specify the disposition of a dataset. It determines what action should be taken with the dataset after the job step completes. The DISP parameter can have up to three subparameters, separated by commas:
- The first subparameter represents the primary allocation.
- The second subparameter represents the secondary allocation.
- The third subparameter represents the disposition of the dataset.
Let's go through each option to determine whether it is correct or incorrect:
Option A) DISP=(,PASS) is equivalent to DISP=(NEW,PASS,KEEP) This option is incorrect because DISP=(,PASS) does not have a primary allocation specified, whereas DISP=(NEW,PASS,KEEP) has a primary allocation specified as "NEW." Therefore, these two expressions are not equivalent.
Option B) DISP=(,,KEEP) is equivalent to DISP=(NEW,DELETE,KEEP) This option is correct because both DISP expressions have the same primary allocation ("NEW") and disposition ("KEEP"). The secondary allocation is not specified in either expression, so it is not a factor in determining equivalence.
Option C) DISP=(,,CATLG) is equivalent to DISP=(OLD,CATLG,CATLG) This option is incorrect because DISP=(,,CATLG) does not have a primary allocation specified, whereas DISP=(OLD,CATLG,CATLG) has a primary allocation specified as "OLD." Additionally, the disposition is different in the two expressions, with DISP=(,,CATLG) specifying "CATLG" as the disposition, whereas DISP=(OLD,CATLG,CATLG) specifies "OLD" as the disposition. Therefore, these two expressions are not equivalent.
Option D) DISP=(OLD,,) is equivalent to DISP=(OLD,KEEP,KEEP) This option is correct because both DISP expressions have the same primary allocation ("OLD") and the same secondary allocation ("KEEP"). The disposition is not specified in the first expression (DISP=(OLD,,)), so it is assumed to be "KEEP" by default. Therefore, these two expressions are equivalent.
The correct answers are B) DISP=(,,KEEP) is equivalent to DISP=(NEW,DELETE,KEEP) and D) DISP=(OLD,,) is equivalent to DISP=(OLD,KEEP,KEEP).