Thanks to those who pointed out to me the obvious: MGCR requires both MODE=SUP *and* KEY=ZERO. As SD22-20 states. Duh.
I did not write this code, which goes back to around the turn of the century/millennium. It never occurred to me that the code could not work. I thought it must the execution environment. I added the KEY parm, and now it works. . . J.O.Skip Robinson Southern California Edison Company Electric Dragon Team Paddler SHARE MVS Program Co-Manager 323-715-0595 Mobile 626-543-6132 Office ⇐=== NEW [email protected] -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Binyamin Dissen Sent: Saturday, February 17, 2018 11:53 PM To: [email protected] Subject: (External):Re: APF problem On Sun, 18 Feb 2018 03:44:52 +0000 Jesse 1 Robinson <[email protected]> wrote: :>I've been doing this for so many years that I thought I could not be stumped by an APF problem. I get a SD22-20, which I had to look up: :>D22-20 :>The program is not authorized to issue the MGCR or MGCRE macro. The program must be in supervisor state and PSW key 0-7. :>Here's the relevant code: :>* :> MODESET MODE=SUP SET TO SUP FOR COMMAND :> SR R0,R0 CLEAR R0 FOR MGCR :> MGCR COMMAND ISSUE COMMAND TO HSM :> MODESET MODE=PROB SET BACK TO PROB :>* :>The program is APF authorized per StarTool: Or you would have got a S047 :>CMD NAME DATA/MSG ALIASOF LEN/LKED -- ATTRIBUTES - APF MODE MAIN :> TSAFDEL 1999/12/30 AC A24 :>The load library is in the APF list: :>... :>SYSA03 TSAF.LOAD :>... :>TSAF.LOAD :>--RECFM-LRECL-BLKSIZE-DSORG :> U ** 32760 PO :>--VOLUMES-- :> SYSA03 :>Execution JCL: :>//TSAFDEL EXEC PGM=TSAFDEL,REGION=128M,TIME=9 :>//STEPLIB DD DISP=SHR,DSN=TSAF.LOAD :>I totally don't understand how it could be failing. Do I need 'MODESET KEY=ZERO' also or instead of 'MODE=SUP'? The program must be in supervisor state ---- and --- PSW key 0-7. -- Binyamin Dissen <[email protected]> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
