Which of the following equations are correct?
-
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)
For the DISP parameter in JCL, the default first parameter is NEW. If the third parameter is omitted, it defaults to the second parameter. Thus, DISP=(,,KEEP) defaults to DISP=(NEW,DELETE,KEEP) and DISP=(OLD,,) defaults to DISP=(OLD,KEEP,KEEP).
To determine which of the equations are correct, let's go through each option and evaluate them:
Option A) DISP=(,PASS) is equivalent to DISP=(NEW,PASS,KEEP) This option is incorrect because DISP=(,PASS) means that the dataset is not being allocated with a new name (NEW) and the existing dataset is not being deleted (DELETE). However, DISP=(NEW,PASS,KEEP) allocates the dataset with a new name (NEW) and keeps the existing dataset (KEEP), which is different from the first option.
Option B) DISP=(,,KEEP) is equivalent to DISP=(NEW,DELETE,KEEP) This option is correct because both sides of the equation allocate the dataset with a new name (NEW) and keep the existing dataset (KEEP). There is no deletion (DELETE) happening in either case, so the equation is equivalent.
Option C) DISP=(,,CATLG) is equivalent to DISP=(OLD,CATLG,CATLG) This option is incorrect because DISP=(,,CATLG) means that the dataset is not being allocated with a new name (NEW) and not being deleted (DELETE), but being cataloged (CATLG). On the other hand, DISP=(OLD,CATLG,CATLG) means that the dataset is already existing (OLD) and being cataloged twice (CATLG, CATLG), which is different from the first option.
Option D) DISP=(OLD,,) is equivalent to DISP=(OLD,KEEP,KEEP) This option is correct because both sides of the equation refer to an existing dataset (OLD) and do not allocate a new name (NEW). Additionally, both sides keep the existing dataset (KEEP). Therefore, the equation is equivalent.
In summary, the correct equations are B and D.