The question was about how to APF-authorize a program in a single JCL
jobstream.
The answer to that question is:
"//*-------------------------------------------------------------------* "
"//* APF-AUTHORISE OUR STEPLIB DATASET(S) * "
"//*-------------------------------------------------------------------* "
"//ADDAPF EXEC PGM=IEBGENER "
"//SYSPRINT DD SYSOUT=* "
"//SYSIN DD DUMMY "
"//SYSUT2 DD SYSOUT=(*,INTRDR) "
"//SYSUT1 DD *,DLM=@@ "
"/*$VS,'SETPROG APF,ADD,DSN=<your loadlib DSN>,SMS' "
"@@ "
"//* "
"//*-------------------------------------------------------------------* "
"//* RUN PROGRAM WHATEVER APF-AUTHORISED * "
"//*-------------------------------------------------------------------* "
"//WHATEVER EXEC PGM=WHATEVER "
"//STEPLIB DD DISP=SHR,DSN=<your loadlib DSN> "
"//DD1 DD DISP=SHR,DSN=<whatever #1> "
"//DD... DD DISP=SHR,DSN=<whatever #...> "
"//DDn DD DISP=SHR,DSN=<whatever #n> "
"//* "
"//*-------------------------------------------------------------------* "
"//* APF-UNAUTHORISE OUR STEPLIB DATASET(S) * "
"//*-------------------------------------------------------------------* "
"//DELAPF EXEC PGM=IEBGENER "
"//SYSPRINT DD SYSOUT=* "
"//SYSIN DD DUMMY "
"//SYSUT2 DD SYSOUT=(*,INTRDR) "
"//SYSUT1 DD *,DLM=@@ "
"/*$VS,'SETPROG APF,DELETE,DSN=<your loadlib DSN>,SMS' "
"@@ "
"//* "
"In ADDAPF and DELAPF above, replace ",SMS" with ",VOLUME=<volser of
your loadlib>" if the loadlib to be APF'd is not SMS-managed. "
"If the format of the APF list is static, add the following card before
the 1st "/*$VS,'SETPROG APF,ADD,DSN=<etc.>" card in step ADDAPF: "
"/*$VS,'SETPROG APF,FORMAT=DYNAMIC' "
Whether (or not) the user is authorized to issue MVS SETPROG commands is
not part of the question. Hence any 'discussion' that deviates from
answering the question at hand is just waffle.
(BTW It looks like all examples of JCL need to be enclosed in quotes ...
to avoid freaking-out the 'LISTSERV' <grin>.)
Cheers,
Chris Poncelet
IBM Systems Programming Consultant (retired)
Logic Integration Limited
Mark Zelden wrote:
On Mon, 11 Nov 2013 09:27:01 -0800, Jon Perryman <[email protected]> wrote:
Dynamic APF exists for sysprog test system and emergency situations.
<snip>
Valid, but I would argue that the *main* reason dynamic APF (and dynamic "anything"
related to parmlib type updates) exists is "IPL avoidance" / 24 x 7 operations. Many
shops still limit APF and LNKLST changes to (mostly) IPLs (including clients of
mine), but that is a throw back to days of old. The only disadvantage of doing
these changes dynamically all the time is that eventually you will IPL and
without
good change control, changes could get regressed or errors in syntax etc.
at IPL time may be found.
Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS
mailto:[email protected]
ITIL v3 Foundation Certified
Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html
Systems Programming expert at http://search390.techtarget.com/ateExperts/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN