Re: Userid from assembler in z/OS batch

2010-05-27 Thread Charles Mills
 L R3,PSAAOLD-PSA(0)   POINT TO ACB
 L R4,X'6C'(,R3)   POINT TO ASXB FROM ACB
 MVC   DDINAME8(8),X'C0'(R4)  MOVE USER NAME FROM ASXB

Charles

-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf
Of zMan
Sent: Thursday, May 27, 2010 11:41 AM
To: IBM-MAIN@bama.ua.edu
Subject: Userid from assembler in z/OS batch

How do I determine what userid I'm running under from an assembler
application in z/OS batch? The Rexx USERID() function works, but I'd rather
not call a Rexx program just to fetch me the userid.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Userid from assembler in z/OS batch

2010-05-27 Thread Starr, Alan
John,

I do love that macro. A standard interface without any control block and/or 
component sensitivity (except JSAB, of course).

That's a keeper! Thanks! 

-Original Message-
From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of 
McKown, John
Sent: Thursday, May 27, 2010 11:54
To: IBM-MAIN@bama.ua.edu
Subject: Re: Userid from assembler in z/OS batch

You will love this macro:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2A2A0/29.1

You can get:

JES jobid (JOBn)
JOB name
RACF userid


--
John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * 
www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

> -Original Message-
> From: IBM Mainframe Discussion List
> [mailto:ibm-m...@bama.ua.edu] On Behalf Of zMan
> Sent: Thursday, May 27, 2010 1:41 PM
> To: IBM-MAIN@bama.ua.edu
> Subject: Userid from assembler in z/OS batch
> 
> How do I determine what userid I'm running under from an assembler 
> application in z/OS batch? The Rexx USERID() function works, but I'd 
> rather not call a Rexx program just to fetch me the userid.
> 
> Some Googling hasn't turned anything up, but it's a pretty generic 
> request, lots of (useless) hits.
> --
> zMan -- "I've got a mainframe and I'm not afraid to use it"
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO 
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
> 
> 

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Userid from assembler in z/OS batch

2010-05-27 Thread Hayim Sokolsky
  USING PSA,0 (PSA)
  LR1,PSATOLD   R1->TCB
  USING TCB,R1(TCB)
  ICM  R1,15,TCBSENV  Have ACEE?
  BNZ  HAVEACEE Yes, use it
  LR1,PSAAOLD   R1->ASCB
  USING ASCB,R1   (ASCB)
  LR1,ASCBASXB  R1->ASXB
  USING ASXB,R1   (ASXB)
  ICM  R1,15,ASXBSENV Have ACEE?
  BNZ  HAVEACEE Yes, use it
  BNOACEE   No, don't have one

HAVEACEE  DS   0H
  USING ACEE,R1   (ACEE)
  MVC  myfield,ACEEUSRI  Get UserID

 
  DROP R1 (ASCB,ASXB,TCB,ACEE)


Mapping macros not shown above If you skip the mapping macros:
 
  USING PSA,0 (PSA)
  LR1,X'21C'R1->TCB
  ICM  R1,15,X'154'(R1) Have ACEE?
  BNZ  HAVEACEE Yes, use it
  LR1,X'224'R1->ASCB
  LR1,X'6C'(,R1)  R1->ASXB
  ICM  R1,15,X'C8'(R1) Have ACEE?
  BNZ  HAVEACEE Yes, use it
  BNOACEE   No, don't have one

HAVEACEE  DS   0H
  USING ACEE,R1   (ACEE)
  MVC  myfield,X'15'(R1)  Get UserID

 
  DROP R1 (ASCB,ASXB,TCB,ACEE)




Hayim
_
Hayim Sokolsky, CISSP
Mainframe Security Architect
DTCC Corporate Information Security
18301 Bermuda Green Dr, MS 1-CIS
Tampa FL 33647-1760

Tel. (813) 470-2177



zMan  
Sent by: IBM Mainframe Discussion List 
2010.05.27 14:40
Please respond to
IBM Mainframe Discussion List 


To
IBM-MAIN@bama.ua.edu
cc

Subject
Userid from assembler in z/OS batch






How do I determine what userid I'm running under from an assembler
application in z/OS batch? The Rexx USERID() function works, but I'd 
rather
not call a Rexx program just to fetch me the userid.

Some Googling hasn't turned anything up, but it's a pretty generic 
request,
lots of (useless) hits.
-- 
zMan -- "I've got a mainframe and I'm not afraid to use it"

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html



_

DTCC DISCLAIMER: This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error, please notify us immediately and delete the email and any
attachments from your system. The recipient should check this email
and any attachments for the presence of viruses.  The company
accepts no liability for any damage caused by any virus transmitted
by this email.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Userid from assembler in z/OS batch

2010-05-27 Thread McKown, John
You will love this macro:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2A2A0/29.1

You can get:

JES jobid (JOBn)
JOB name
RACF userid


--
John McKown 
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets(r)

9151 Boulevard 26 * N. Richland Hills * TX 76010
(817) 255-3225 phone * (817)-961-6183 cell
john.mck...@healthmarkets.com * www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets(r) is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company(r), Mid-West National Life Insurance Company of TennesseeSM and The 
MEGA Life and Health Insurance Company.SM

 

> -Original Message-
> From: IBM Mainframe Discussion List 
> [mailto:ibm-m...@bama.ua.edu] On Behalf Of zMan
> Sent: Thursday, May 27, 2010 1:41 PM
> To: IBM-MAIN@bama.ua.edu
> Subject: Userid from assembler in z/OS batch
> 
> How do I determine what userid I'm running under from an assembler
> application in z/OS batch? The Rexx USERID() function works, 
> but I'd rather
> not call a Rexx program just to fetch me the userid.
> 
> Some Googling hasn't turned anything up, but it's a pretty 
> generic request,
> lots of (useless) hits.
> -- 
> zMan -- "I've got a mainframe and I'm not afraid to use it"
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
> 
> 

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Userid from assembler in z/OS batch

2010-05-27 Thread Mark Jacobs

On 05/27/10 14:51, Mark Zelden wrote:

On Thu, 27 May 2010 14:44:18 -0400, Mark Jacobs
wrote:

   

On 05/27/10 14:40, zMan wrote:
 

How do I determine what userid I'm running under from an assembler
application in z/OS batch? The Rexx USERID() function works, but I'd rather
not call a Rexx program just to fetch me the userid.

Some Googling hasn't turned anything up, but it's a pretty generic request,
lots of (useless) hits.

   

If you're running RACF you can use the ACEEUSRI field in the ACEE
control block to get it.

 

It's there for ACF2 and Top Secret also.

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS
mailto:mzel...@flash.net
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html
Systems Programming expert at http://expertanswercenter.techtarget.com/

-
   


I've never worked with Top Secret and my ACF2 experience is 15 years in 
the past.


--
Mark Jacobs
Time Customer Service
Tampa, FL


It is impossible to make anything foolproof, because fools
are so ingenious.

 -- Robert Heinlein

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Userid from assembler in z/OS batch

2010-05-27 Thread Mark Zelden
On Thu, 27 May 2010 14:44:18 -0400, Mark Jacobs 
wrote:

>On 05/27/10 14:40, zMan wrote:
>> How do I determine what userid I'm running under from an assembler
>> application in z/OS batch? The Rexx USERID() function works, but I'd rather
>> not call a Rexx program just to fetch me the userid.
>>
>> Some Googling hasn't turned anything up, but it's a pretty generic request,
>> lots of (useless) hits.
>>
>
>If you're running RACF you can use the ACEEUSRI field in the ACEE
>control block to get it.
>

It's there for ACF2 and Top Secret also.

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS   
mailto:mzel...@flash.net  
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html 
Systems Programming expert at http://expertanswercenter.techtarget.com/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Userid from assembler in z/OS batch

2010-05-27 Thread zMan
Thanks, Marks! :-)

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Userid from assembler in z/OS batch

2010-05-27 Thread Mark Zelden
On Thu, 27 May 2010 14:40:38 -0400, zMan  wrote:

>How do I determine what userid I'm running under from an assembler
>application in z/OS batch? The Rexx USERID() function works, but I'd rather
>not call a Rexx program just to fetch me the userid.
>
>Some Googling hasn't turned anything up, but it's a pretty generic request,
>lots of (useless) hits.
>--


I get it from the ACEE.ASCB --> ASXB --> ACEE 

Have a look at the data areas manuals, or you can have a look at
this rexx example to see the offsets:

/* REXX */  
ASCB = C2d(Storage(224,4))   /* point to ASCB*/ 
ASXB = C2d(Storage(D2x(ASCB+108),4)) /* point to ASXB*/ 
ACEE = C2d(Storage(D2x(ASXB+200),4)) /* point to ACEE*/ 
/*   */ 
USER = Storage(D2x(ACEE+21),8)   /* point to USERID  */ 
GROUP= Storage(D2x(ACEE+30),8)   /* point to GROUP   */ 
Say 'The USERID in the ACEE is:' USER   
Say 'The GROUP  in the ACEE is:' GROUP  


Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS   
mailto:mzel...@flash.net  
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html 
Systems Programming expert at http://expertanswercenter.techtarget.com/

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Userid from assembler in z/OS batch

2010-05-27 Thread Mark Jacobs

On 05/27/10 14:40, zMan wrote:

How do I determine what userid I'm running under from an assembler
application in z/OS batch? The Rexx USERID() function works, but I'd rather
not call a Rexx program just to fetch me the userid.

Some Googling hasn't turned anything up, but it's a pretty generic request,
lots of (useless) hits.
   


If you're running RACF you can use the ACEEUSRI field in the ACEE 
control block to get it.


--
Mark Jacobs
Time Customer Service
Tampa, FL


It is impossible to make anything foolproof, because fools
are so ingenious.

 -- Robert Heinlein

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Userid from assembler in z/OS batch

2010-05-27 Thread zMan
How do I determine what userid I'm running under from an assembler
application in z/OS batch? The Rexx USERID() function works, but I'd rather
not call a Rexx program just to fetch me the userid.

Some Googling hasn't turned anything up, but it's a pretty generic request,
lots of (useless) hits.
-- 
zMan -- "I've got a mainframe and I'm not afraid to use it"

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html