I don't know if it will work for you, but in different products
I've worked on, we had a test of JSCBAuth(doing this from memory)
to see if it showed we were in an authorized state. If not, we
put out a WTO and shutdown with CC > 8. In your case, you could
put out a WTO and pass back to the caller with an RC= whatever
you want to show you can't do this.
This way you don't do the MODSET and get terminated.
This is why you might want to see verify that you are authorized
before you do anything that requires authorization.
Just my 2 cents.
Steve Thompson
On 11/18/2024 12:02 PM, Richard Zierdt wrote:
I wrote an authorized program that displays the contents of control registers
using the STCTG instruction. Linked AC(1) and stored in an APF library.
Substantive instructions are:
MODESET MODE=SUP For STCTG instruction
STCTG 0,15,CRREGS Store (copy) Control Registers
MODESET MODE=PROB
When called using LINK from an unauthorized program (linked AC(0) to the same
APF authorized library), an S047 abend occurs at the first MODESET macro (which
generates an SVC 107).
When the unauthorized program is linked authorized (AC(1)), the call (LINK)
works.
I thought unauthorized programs can call (LINK) authorized programs, but
authorized programs cannot call unauthorized programs, or, if they do, they
lose authorization.
Yes, the program with MODESET MODE=SUP could be made into a PC, but it would be
easier to avoid that method.
Any elucidation appreciated — Thanks
Richard Zierdt
Confidentiality Warning/Avertissement de confidentialité:
This message is intended only for the named recipients. This message may
contain information that is privileged or confidential. If you are not the
named recipient, its employee or its agent, please notify us immediately and
permanently destroy this message and any copies you may have. Ce message est
destiné uniquement aux destinataires dûment nommés. Il peut contenir de
l'information privilégiée ou confidentielle. Si vous n'êtes pas le destinataire
dûment nommé, son employé ou son mandataire, veuillez nous aviser sans tarder
et supprimer ce message ainsi que toute copie qui peut en avoir été faite.
----------------------------------------------------------------------
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