Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-02-02 Thread Jon Perryman
On Wed, 31 Jan 2024 13:36:56 -0600, Charles Mills  wrote:

> the ACEEUNAM seems to be a supported programming interface and should be safe.

All documented control blocks have a supported (or unsupported) programming 
interface section. ACEEUNAM is not excluded in the ACEE so the assumption is 
that it is supported.

https://www.ibm.com/docs/en/zos/2.4.0?topic=areas-acee-accessor-environment-element#d82132e41

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


Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-31 Thread Charles Mills
De nada.

The bottom line would appear to be that if you want the user name, then control 
block chasing to the ACEE and picking up the ACEEUNAM seems to be a supported 
programming interface and should be safe.

Be aware of all of the potential issues of multiple ACEEs, no ACEE, etc. But 
for @Cameron's sort of situation -- "I have a batch COBOL program that runs 
every night and it wants to know the name of the user that owns the job" then 
control block chasing to ACEEUNAM should be fine.

Charles

On Wed, 31 Jan 2024 13:06:06 +, Peter Relson  wrote:

>I had written
>
>At least in the past (I don't know if still true), there are cases where the 
>ACEE might be what, very loosely, is referred to as encrypted in which case it 
>would not be readable as-is. It's not truly encrypted such that you need some 
>cryptography to decrypt it, but the intent is that the security product know 
>what to do to provide you the "decrypted" info
>
>
>Charles M helped me realize that I was mis-thinking. It's the utoken that can 
>be "encrypted", not the ACEE.
>Thanks, Charles.
>
>Peter Relson
>z/OS Core Technology Design
>
>
>--
>For IBM-MAIN subscribe / signoff / archive access instructions,
>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

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


Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-31 Thread Peter Relson
I had written

At least in the past (I don't know if still true), there are cases where the 
ACEE might be what, very loosely, is referred to as encrypted in which case it 
would not be readable as-is. It's not truly encrypted such that you need some 
cryptography to decrypt it, but the intent is that the security product know 
what to do to provide you the "decrypted" info


Charles M helped me realize that I was mis-thinking. It's the utoken that can 
be "encrypted", not the ACEE.
Thanks, Charles.

Peter Relson
z/OS Core Technology Design


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


Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-30 Thread Steve Thompson

Great point.

CICS is a good example.

Connect:Direct is another.

On 1/30/2024 3:21 PM, Jon Perryman wrote:


You can get it from ACEEUNAM.


The intended interface is likely one of the RACROUTE variants (EXTRACT?).

Also keep in mind multi-user address spaces and that you are referencing the 
correct ACEE. MUSAS can occur in unexpected places. E.g. Just because your TSO 
address space is single user does not mean embedded TSO in my products address 
space is single user.

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


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


Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-30 Thread Jon Perryman
>
>You can get it from ACEEUNAM.
>
>
>The intended interface is likely one of the RACROUTE variants (EXTRACT?).

Also keep in mind multi-user address spaces and that you are referencing the 
correct ACEE. MUSAS can occur in unexpected places. E.g. Just because your TSO 
address space is single user does not mean embedded TSO in my products address 
space is single user.

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


Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-30 Thread Peter Relson

You can get it from ACEEUNAM.


The intended interface is likely one of the RACROUTE variants (EXTRACT?).

At least in the past (I don't know if still true), there are cases where the 
ACEE might be what, very loosely, is referred to as encrypted in which case it 
would not be readable as-is. It's not truly encrypted such that you need some 
cryptography to decrypt it, but the intent is that the security product know 
what to do to provide you the "decrypted" info

Peter Relson
z/OS Core Technology Design


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


Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-29 Thread David Spiegel

Hi Cameron,
Can you please send me the source of your working program?
My email address is da...@ddstar.com

Thanks and regards,
David

On 2024-01-29 16:49, Cameron Conacher wrote:

Thanks everyone,
This is just what I needed.

Appreciate the help.


Thanks

…….Cameron

From: IBM Mainframe Discussion List  On Behalf Of 
Lars Höglund
Sent: Monday, January 29, 2024 11:10 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Sv: How can I determine the User Name associated with the current 
Batch JOB RACF ID?

Something like this Code Extract: LINKAGE SECTION. 01 CB1. 05 PTR1 POINTER 
OCCURS 512. 01 CVT. 05 CVT1 POINTER OCCURS 512. 01 CB2. 05 PTR2 POINTER OCCURS 
256. . . . SET ADDRESS OF CB2 TO PTR1(4) MOVE CB2(1: 8) TO WS-BJOBNAMN SET 
ADDRESS OF CB2


Something like this



Code Extract:



LINKAGE SECTION.



01 CB1.

   05 PTR1 POINTER OCCURS 512.

01 CVT.

   05 CVT1 POINTER OCCURS 512.

01 CB2.

   05 PTR2 POINTER OCCURS 256.

.

.

.

SET ADDRESS OF CB2  TO PTR1(4)

MOVE CB2(1:8)TO WS-BJOBNAMN

SET ADDRESS OF CB2  TO PTR1(46)

MOVE CB2(361:8)  TO WS-BPGM

SET ADDRESS OF CB2  TO PTR2(80)

MOVE CB2(13:8) TO  BJOBNR

SET ADDRESS OF CB1  TO NULL

SET ADDRESS OF CB1  TO PTR1(138)

SET ADDRESS OF CB2  TO PTR1(28)

MOVE CB2(193:8) TO WS-BUSER







-Ursprungligt meddelande-

Från: IBM Mainframe Discussion List 
mailto:IBM-MAIN@LISTSERV.UA.EDU>> För Cameron Conacher

Skickat: den 29 januari 2024 14:37

Till: IBM-MAIN@LISTSERV.UA.EDU

Ämne: How can I determine the User Name associated with the current Batch JOB 
RACF ID?



[Du f?r inte e-post ofta fr?n 
03cfc59146bb-dmarc-requ...@listserv.ua.edu.
 L?s om varf?r det h?r ?r viktigt p? 
https://aka.ms/LearnAboutSenderIdentification
 ]



Good Morning,

I know I can do this in CICS, but I am digging around to see if this can be 
done in a batch COBOL program.

Basically, I just want to include Fred's Name in a report I generate, where 
Fred is the RACF ID associate with the currently executing Batch JOB. (a COBOL 
program).

I could write something to call out to CICS (EXCI maybe) to get a name.

But I wanted to know if there is anyway to do this by calling some routines 
from my Batch COBOL program.



I am assuming right now, it is not possible since I have come up empty so far.



Thanks





Cameron Conacher

Senior Engineer



American Express Canada Inc.

GCICS

2225 Sheppard Avenue East, Toronto, ON  M2J 5C2



cameron.conac...@aexp.com>

Office: 1-437-836-5265

Mobile: 1-416-409-5147



https://amex.webex.com/join/cameron.conacher









American Express made the following annotations  This e-mail 
was sent to you by a representative of Amex Bank of Canada, P.O. Box 3204, Station 
"F", Toronto, ON, M1W 3W7, 
http://www.americanexpress.ca/.
 If you no longer wish to receive these e-mails, please notify the sender by reply e-mail.



This e-mail is solely for the intended recipient and may contain confidential 
or privileged information. If you are not the intended recipient, any 
disclosure, copying, use, or distribution of the information included in this 
e-mail is prohibited. If you have received this e-mail in error, please notify 
the sender by reply e-mail and immediately and permanently delete this e-mail 
and any attachments. Thank you.



American Express a fait les remarques suivantes Ce courriel vous a ?t? envoy? par un 
repr?sentant de la Banque Amex du Canada, C.P. 3204, succursale F, Toronto (Ontario) 
M1W 3W7, 
http://www.americanexpress.ca/.
 Si, par la suite, vous ne souhaitez plus recevoir ces courriels, veuillez en aviser 
les exp?diteurs par courriel.



Ce courriel est r?serv? au seul destinataire indiqu? et peut renfermer des 
renseignements confidentiels et privil?gi?s. Si vous n'?tes pas le destinataire 
pr?vu, toute divulgation, duplication, utilisation ou distribution du courriel 
est interdite. Si vous avez re?u ce courriel par erreur, veuillez en aviser 
l'exp?diteur par courriel et d?truire imm?diatement le courriel et toute pi?ce 
jointe. Merci.



--

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



--

For IBM-MAIN subscribe / signoff / archive access instructions,

send

Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-29 Thread Cameron Conacher
Thanks very much.
I struggled at first, but finally got through.
This is perfect.!!

On Mon, Jan 29, 2024 at 9:31 AM Binyamin Dissen 
wrote:

> On Mon, 29 Jan 2024 13:36:51 + Cameron Conacher
> <03cfc59146bb-dmarc-requ...@listserv.ua.edu> wrote:
>
> :>Good Morning,
> :>I know I can do this in CICS, but I am digging around to see if this can
> be done in a batch COBOL program.
> :>Basically, I just want to include Fred's Name in a report I generate,
> where Fred is the RACF ID associate with the currently executing Batch JOB.
> (a COBOL program).
> :>I could write something to call out to CICS (EXCI maybe) to get a name.
> :>But I wanted to know if there is anyway to do this by calling some
> routines from my Batch COBOL program.
>
> :>I am assuming right now, it is not possible since I have come up empty
> so far.
>
> You can get it from ACEEUNAM.
>
> https://www.microfocus.co.jp/manuals/ED23/html/HCOMCMCBLKS005.html shows
> how
> to locate MVS control blocks from COBOL.
>
> --
> Binyamin Dissen 
> http://www.dissensoftware.com
>
> Director, Dissen Software, Bar & Grill - Israel
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

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


Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-29 Thread Cameron Conacher
Thanks everyone,
This is just what I needed.

Appreciate the help.


Thanks

…….Cameron

From: IBM Mainframe Discussion List  On Behalf Of 
Lars Höglund
Sent: Monday, January 29, 2024 11:10 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Sv: How can I determine the User Name associated with the current 
Batch JOB RACF ID?

Something like this Code Extract: LINKAGE SECTION. 01 CB1. 05 PTR1 POINTER 
OCCURS 512. 01 CVT. 05 CVT1 POINTER OCCURS 512. 01 CB2. 05 PTR2 POINTER OCCURS 
256. . . . SET ADDRESS OF CB2 TO PTR1(4) MOVE CB2(1: 8) TO WS-BJOBNAMN SET 
ADDRESS OF CB2


Something like this



Code Extract:



LINKAGE SECTION.



01 CB1.

  05 PTR1 POINTER OCCURS 512.

01 CVT.

  05 CVT1 POINTER OCCURS 512.

01 CB2.

  05 PTR2 POINTER OCCURS 256.

.

.

.

SET ADDRESS OF CB2  TO PTR1(4)

MOVE CB2(1:8)TO WS-BJOBNAMN

SET ADDRESS OF CB2  TO PTR1(46)

MOVE CB2(361:8)  TO WS-BPGM

SET ADDRESS OF CB2  TO PTR2(80)

MOVE CB2(13:8) TO  BJOBNR

SET ADDRESS OF CB1  TO NULL

SET ADDRESS OF CB1  TO PTR1(138)

SET ADDRESS OF CB2  TO PTR1(28)

MOVE CB2(193:8) TO WS-BUSER







-Ursprungligt meddelande-

Från: IBM Mainframe Discussion List 
mailto:IBM-MAIN@LISTSERV.UA.EDU>> För Cameron Conacher

Skickat: den 29 januari 2024 14:37

Till: IBM-MAIN@LISTSERV.UA.EDU

Ämne: How can I determine the User Name associated with the current Batch JOB 
RACF ID?



[Du f?r inte e-post ofta fr?n 
03cfc59146bb-dmarc-requ...@listserv.ua.edu.
 L?s om varf?r det h?r ?r viktigt p? 
https://aka.ms/LearnAboutSenderIdentification
 ]



Good Morning,

I know I can do this in CICS, but I am digging around to see if this can be 
done in a batch COBOL program.

Basically, I just want to include Fred's Name in a report I generate, where 
Fred is the RACF ID associate with the currently executing Batch JOB. (a COBOL 
program).

I could write something to call out to CICS (EXCI maybe) to get a name.

But I wanted to know if there is anyway to do this by calling some routines 
from my Batch COBOL program.



I am assuming right now, it is not possible since I have come up empty so far.



Thanks





Cameron Conacher

Senior Engineer



American Express Canada Inc.

GCICS

2225 Sheppard Avenue East, Toronto, ON  M2J 5C2



cameron.conac...@aexp.com>

Office: 1-437-836-5265

Mobile: 1-416-409-5147



https://amex.webex.com/join/cameron.conacher









American Express made the following annotations 
 This e-mail was sent to you by a 
representative of Amex Bank of Canada, P.O. Box 3204, Station "F", Toronto, ON, 
M1W 3W7, 
www.americanexpress.ca.
 If you no longer wish to receive these e-mails, please notify the sender by 
reply e-mail.



This e-mail is solely for the intended recipient and may contain confidential 
or privileged information. If you are not the intended recipient, any 
disclosure, copying, use, or distribution of the information included in this 
e-mail is prohibited. If you have received this e-mail in error, please notify 
the sender by reply e-mail and immediately and permanently delete this e-mail 
and any attachments. Thank you.



American Express a fait les remarques suivantes Ce courriel vous a ?t? envoy? 
par un repr?sentant de la Banque Amex du Canada, C.P. 3204, succursale F, 
Toronto (Ontario) M1W 3W7, 
www.americanexpress.ca.
 Si, par la suite, vous ne souhaitez plus recevoir ces courriels, veuillez en 
aviser les exp?diteurs par courriel.



Ce courriel est r?serv? au seul destinataire indiqu? et peut renfermer des 
renseignements confidentiels et privil?gi?s. Si vous n'?tes pas le destinataire 
pr?vu, toute divulgation, duplication, utilisation ou distribution du courriel 
est interdite. Si vous avez re?u ce courriel par erreur, veuillez en aviser 
l'exp?diteur par courriel et d?truire imm?diatement le courriel et toute pi?ce 
jointe. Merci.



--

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



--

For IBM-MAIN subscribe / signoff / archive access instructions,

send email to lists...@listserv.ua.edu with 
the message: INFO IBM-MAIN


American Express made the following annotations
_

Re: How can I determine the User Name associated with the current Batch JOB RACF ID?

2024-01-29 Thread Binyamin Dissen
On Mon, 29 Jan 2024 13:36:51 + Cameron Conacher
<03cfc59146bb-dmarc-requ...@listserv.ua.edu> wrote:

:>Good Morning,
:>I know I can do this in CICS, but I am digging around to see if this can be 
done in a batch COBOL program.
:>Basically, I just want to include Fred's Name in a report I generate, where 
Fred is the RACF ID associate with the currently executing Batch JOB. (a COBOL 
program).
:>I could write something to call out to CICS (EXCI maybe) to get a name.
:>But I wanted to know if there is anyway to do this by calling some routines 
from my Batch COBOL program.

:>I am assuming right now, it is not possible since I have come up empty so far.

You can get it from ACEEUNAM.

https://www.microfocus.co.jp/manuals/ED23/html/HCOMCMCBLKS005.html shows how
to locate MVS control blocks from COBOL.

--
Binyamin Dissen 
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

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