Isn't CONTROL only valid in a CLIST script, not Rexx?  Or are you suggesting he 
wrap a call to his Rexx inside a CLIST with that CONTROL setting and report the 
security error from the CLIST?

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Seymour J Metz
Sent: Tuesday, January 17, 2023 3:03 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: REXX Question

Did you try CONTROL ERRORS RETURN?

________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Cameron Conacher <000003cfc59146bb-dmarc-requ...@listserv.ua.edu>
Sent: Tuesday, January 17, 2023 2:48 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: REXX Question

Hello folks,
I hope this is not a silly question.
I have some REXX statements that use LMCOPY to copy members from one library to 
another.
This is pretty straight forward stuff.
Recently, I ran into a situation where I was not authorized to access the 
output library.
And when the REXX ran, it ABENDed with a 913 error message.
My REXX checks the return code value from the LMCOPY, but apparently, the 
LMCOPY does not return. I can't seem to trap the not authorized error, and 
generate a polite message for the JOB.

After issuing the LMCOPY command, I check, and if the return code is not one of 
0, 8, or 12 I generate an error message.
On the other hand
if it is zero I generate a success message
if it is 8 I generate a success message
if it is 12 I generate a message indicating I did not replace the member in the 
target library because the member already existed and the REPLACE flag was not 
set.

The other return codes documented for LMCOPY are
16 = TRUNCATION Error
20 = Sever Error; unable to continue.

I was kind of expecting to see the LMCOPY return set as 20.
Is there something I can set to trap the 913 (Not Authorized error) ?
I can live with what I have. I was just looking to polish things up a little 
bit.

I wanted to send out a message that literally says "You do not have the 
authority to access Library ..... Please reach out to the Security team at... 
and have them authorize your RACF ID. Then restart this JOB at step.... If you 
have additional questions, please see ....."

Or know that it is just not possible/reasonable to attempt to trap the error.

Thanks


Cameron Conacher
Senior Engineer

American Express Canada Inc.
GCICS
2225 Sheppard Avenue East, Toronto, ON  M2J 5C2

cameron.conac...@aexp.com<mailto:cameron.conac...@aexp.com>
Office: 1-437-836-5265
Mobile: 1-416-409-5147
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to