PL/1 on MVS IBM S/390 
Author Message
 PL/1 on MVS IBM S/390

Hello,

Is there a way to retrieve the UserID from a dataset within PL/1 statements?

Tnx!
Sjoerd



Sat, 17 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390
On Tue, 29 Sep 1998 20:29:19 +0200, "Sjoerd de Boer"

Quote:

>Hello,

>Is there a way to retrieve the UserID from a dataset within PL/1 statements?

Via PL/1 facilities?  No.  But you could invoke IKJEFTSR to have a
REXX exec or CLIST do it via TSO facilities.

Frank Clarke
Tampa Area REXX Programmers' Alliance (TARPA)
Member of the REXX Language Assn
  Join us at http://www/rexxla.org



Sat, 17 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390
In a message dated 09-29-98, Frank Clarke said to All about "PL/1 on MVS IBM
S/390"

FC>On Tue, 29 Sep 1998 20:29:19 +0200, "Sjoerd de Boer"

Quote:

>Hello,

>Is there a way to retrieve the UserID from a dataset within PL/1 >statements?

FC>Via PL/1 facilities?  No.  But you could invoke IKJEFTSR to have a
FC>REXX exec or CLIST do it via TSO facilities.

Via PL/I facilities? Yes!

You need a structure that maps the ASCB (Address Space Control Block) and
another that maps the ASXB (Address Space Extension Block). The current ASCB
is pointed to by the pointer at virtual storage location '0000051C'X
(PSAAOLD). The ASCBASXB pointer points to the ASXB, and the user id is in
ASXBACEE, the Access Control Extension Element.

It can be done in 1 line of PL/I code, generating about 4 machine
instructions.

In fact, it takes longer to describe in English than it does to code.

Moreover, my method will work in simple batch, even when no TMP is present.

Regards

Dave
<Team PL/I>
___
 * MR/2 2.25 #353 * Pollytheism: belief that God is a parrot



Sun, 18 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390
Dave ...

I think this will just give you the User ID of the current user, and the
original request was to get the User ID from ANY dataset being read, not
necessarily created by the reading user....



Quote:
> In a message dated 09-29-98, Frank Clarke said to All about "PL/1 on MVS
IBM
> S/390"

> FC>On Tue, 29 Sep 1998 20:29:19 +0200, "Sjoerd de Boer"

> >Hello,

> >Is there a way to retrieve the UserID from a dataset within PL/1
>statements?

> FC>Via PL/1 facilities?  No.  But you could invoke IKJEFTSR to have a
> FC>REXX exec or CLIST do it via TSO facilities.

> Via PL/I facilities? Yes!

> You need a structure that maps the ASCB (Address Space Control Block) and
> another that maps the ASXB (Address Space Extension Block). The current
ASCB
> is pointed to by the pointer at virtual storage location '0000051C'X
> (PSAAOLD). The ASCBASXB pointer points to the ASXB, and the user id is in
> ASXBACEE, the Access Control Extension Element.

> It can be done in 1 line of PL/I code, generating about 4 machine
> instructions.

> In fact, it takes longer to describe in English than it does to code.

> Moreover, my method will work in simple batch, even when no TMP is
present.

> Regards

> Dave
> <Team PL/I>
> ___
>  * MR/2 2.25 #353 * Pollytheism: belief that God is a parrot



Mon, 19 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390

Quote:

> Via PL/I facilities? Yes!

> You need a structure that maps the ASCB (Address Space Control Block)
> and
> another that maps the ASXB (Address Space Extension Block). The
> current ASCB
> is pointed to by the pointer at virtual storage location '0000051C'X
> (PSAAOLD). The ASCBASXB pointer points to the ASXB, and the user id is
> in
> ASXBACEE, the Access Control Extension Element.

PSAAOLD is location 548 decimal, 224 hex. ASXBSENV points to ACEE which
has userid in ACEEUSER/ACEEUSRI.

You can also get userid from JSAB. Code up an IAZXJSAB READ macro and
translate the expansion to PL/I.

Quote:

> It can be done in 1 line of PL/I code, generating about 4 machine
> instructions.

> In fact, it takes longer to describe in English than it does to code.

> Moreover, my method will work in simple batch, even when no TMP is
> present.

> Regards

> Dave
> <Team PL/I>
> ___
>  * MR/2 2.25 #353 * Pollytheism: belief that God is a parrot



Mon, 19 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390
In a message dated 10-01-98, Andy Wood said to All about "Re: PL/1 on MVS
IBM S/390"

[snip]
AW>PSAAOLD is location 548 decimal, 224 hex. ASXBSENV points to ACEE which
AW>has userid in ACEEUSER/ACEEUSRI.

Oops, you're right. I should look at my old code before typing.

AW>You can also get userid from JSAB. Code up an IAZXJSAB READ macro and
AW>translate the expansion to PL/I.

Yes, that's good for newer cuts of the OS. My code dates back to MVS/370,
worked all through XA and still does. But perhaps it's time to take the
newer short cut.

Even so, still no TSO calls required.

Regards

Dave
<Team PL/I>
___
 * MR/2 2.25 #353 * Sure, when... OINK FLAP, OINK FLAP... Well, I'll be damned.



Mon, 19 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390
In a message dated 10-01-98, Bob Sitko said to All about "Re: PL/1 on MVS
IBM S/390"

BS>Dave ...

BS>I think this will just give you the User ID of the current user, and the
BS>original request was to get the User ID from ANY dataset being read, not
BS>necessarily created by the reading user....



Quote:
> In a message dated 09-29-98, Frank Clarke said to All about "PL/1 on MVS
BS>IBM
> S/390"

> FC>On Tue, 29 Sep 1998 20:29:19 +0200, "Sjoerd de Boer"

> >Hello,

> >Is there a way to retrieve the UserID from a dataset within PL/1
>statements?

Re-reading the original message, I'm not sure what it is asking. Datasets
don't have userids. The only other thing I can think of is the high-level
qualifier of the DSN, which can be had by scanning the DSAB queue or using
SVC 99 enquiry. Again, just a case of mapping control blocks in PL/I for
scanning the DSAB queue.

Regards

Dave
<Team PL/I>
___
 * MR/2 2.25 #353 * With 1-900 support does the Tech talk dirty?



Mon, 19 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390

Quote:

>In a message dated 10-01-98, Bob Sitko said to All about "Re: PL/1 on MVS
>IBM S/390"

>BS>Dave ...

>BS>I think this will just give you the User ID of the current user, and the
>BS>original request was to get the User ID from ANY dataset being read, not
>BS>necessarily created by the reading user....



>> In a message dated 09-29-98, Frank Clarke said to All about "PL/1 on MVS
>BS>IBM
>> S/390"

>> FC>On Tue, 29 Sep 1998 20:29:19 +0200, "Sjoerd de Boer"

>> >Hello,

>> >Is there a way to retrieve the UserID from a dataset within PL/1
>>statements?

>Re-reading the original message, I'm not sure what it is asking. Datasets
>don't have userids. The only other thing I can think of is the high-level
>qualifier of the DSN, which can be had by scanning the DSAB queue or using
>SVC 99 enquiry. Again, just a case of mapping control blocks in PL/I for
>scanning the DSAB queue.

A little bit more explenation..

It's about a sequential dataset..  The members inside the dataset have a
userID attached with the userID of the latest person who made a change..  I
want a pl1 program to look after that userID.. If it changes I want a
message to my terminal..

Can it be done?

Gr.
Sjoerd



Tue, 20 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390
On Fri, 2 Oct 1998 20:10:27 +0200, "Sjoerd de Boer"

Quote:

>A little bit more explenation..

>It's about a sequential dataset..  The members inside the dataset have a
>userID attached with the userID of the latest person who made a change..  I
>want a pl1 program to look after that userID.. If it changes I want a
>message to my terminal..

Huh?   Sequential datasets don't have members; partitioned datasets
do, sometimes with statistics (as from ISPF).  In that case, David
Noon is right.  The directory in which those stats are stored can be
handled as if it were a PS dataset.  With the proper sort of
declaration, the information is pretty easily available.  On the other
hand, PL/1 requires LOTS of keystroking (plus compiling and linking)
to get at that information.  I still think you'd be better off using
REXX.  If you have MVS Batch Pipes installed, you're down to about six
lines (total).

Frank Clarke
Tampa Area REXX Programmers' Alliance (TARPA)
Member of the REXX Language Assn
  Join us at http://www/rexxla.org



Wed, 21 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390
In a message dated 10-02-98, Sjoerd de Boer said to All about "PL/1 on MVS
IBM S/390"

[snip]
SB>A little bit more explenation..

SB>It's about a sequential dataset..  The members inside the dataset have a
SB>userID attached with the userID of the latest person who made a change..

You mean ISPF statistics inside a PDS. These are far from reliable.

SB>I want a pl1 program to look after that userID.. If it changes I want a
SB>message to my terminal..

So, every time a user "saves" a member of a monitored PDS, you want to be
notified. Or is it every time a monitored user save a member in any PDS that
you want to be notified?

Which are you monitoring: a user or a PDS?

I shall assume the latter. [I might even assume that it's SYS1.PARMLIB.]

SB>Can it be done?

Not easily.

To be totally comprehensive, you will need to hook the STOW macro's
processing, as this is the assembler macro that determines which member of
the target PDS will be modified by any writes. This will be tough. You would
do well to read the SAM/E Logic manual, if you can obtain a copy. I would
use assembler for this approach and put the routine in LPA, as STOW gets
executed very, very often. The hook routine can use ACEEUSER to extract the
user id. I would limit the logging to something very quick, such as cutting
a SMF record.

If you limit yourself to ISPF, you might have an exit point in the edit
function that can be scheduled every time a member is saved. Check the ISPF
installation guides for this. If such an exit point is available, it can
pull the user id. out of ACEEUSER as I suggested earlier, and then do
whatever you need: SMF record; console message; etc.

Regards

Dave
<Team PL/I>
___
 * MR/2 2.25 #353 * You said Windows was a Power Tool???



Wed, 21 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390

Quote:

> It's about a sequential dataset..  The members inside the dataset have a
> userID attached with the userID of the latest person who made a change..  I
> want a pl1 program to look after that userID.. If it changes I want a
> message to my terminal..

There are no members in a sequential dataset, so I assume that you meant
partitioned. Just read the directory and parse out the individual members.

--

Shmuel (Seymour J.) Metz
Reply to host nsf (dot) gov, user smetz



Mon, 26 Mar 2001 03:00:00 GMT  
 PL/1 on MVS IBM S/390
How to make ISPF statistics available to a PL/I (or any other) program:

Assumption #1:  your system is running TCP/IP.

In a prior job step, run FTP to open the same machine, then
cd 'the.target.pds' and write the directory listing to disk.  Sample JCL:

//TSTDIRX JOB (XXXX),'Programmer Name',REGION=4096K,CLASS=A
//*
//*   get pds directory info
//*
/*JOBPARM R=141
/*ROUTE PRINT RM99
//STEP01   EXEC PGM=FTP,REGION=4096K
//INPUT    DD  *
111.22.333.44
<userid>
<password>
cd 'THE.TARGET.PDS'
dir * (DISK
quit
/*
//OUTPUT   DD  SYSOUT=T
//SYSPRINT DD  SYSOUT=T

Assuming that your userid is AAABBB (i.e., the OWNER of this job is
AAABBB), the directory listing will be written to sequential data set
AAABBB.FTP.DIROUTP, Recfm VB, Lrecl 256.  Then the next
job step (your PL/I program) can read it as input.

Quote:

> In a message dated 10-02-98, Sjoerd de Boer said to All about "PL/1 on MVS
> IBM S/390"

> [snip]
> SB>A little bit more explenation..

> SB>It's about a sequential dataset..  The members inside the dataset have a
> SB>userID attached with the userID of the latest person who made a change..

> You mean ISPF statistics inside a PDS. These are far from reliable.

> SB>I want a pl1 program to look after that userID.. If it changes I want a
> SB>message to my terminal..

> So, every time a user "saves" a member of a monitored PDS, you want to be
> notified. Or is it every time a monitored user save a member in any PDS that
> you want to be notified?

> Which are you monitoring: a user or a PDS?

> I shall assume the latter. [I might even assume that it's SYS1.PARMLIB.]

> SB>Can it be done?

> Not easily.

> To be totally comprehensive, you will need to hook the STOW macro's
> processing, as this is the assembler macro that determines which member of
> the target PDS will be modified by any writes. This will be tough. You would
> do well to read the SAM/E Logic manual, if you can obtain a copy. I would
> use assembler for this approach and put the routine in LPA, as STOW gets
> executed very, very often. The hook routine can use ACEEUSER to extract the
> user id. I would limit the logging to something very quick, such as cutting
> a SMF record.

> If you limit yourself to ISPF, you might have an exit point in the edit
> function that can be scheduled every time a member is saved. Check the ISPF
> installation guides for this. If such an exit point is available, it can
> pull the user id. out of ACEEUSER as I suggested earlier, and then do
> whatever you need: SMF record; console message; etc.

> Regards

> Dave
> <Team PL/I>
> ___
>  * MR/2 2.25 #353 * You said Windows was a Power Tool???

--
Phil Robyn
Univ. of California, Berkeley
ICQ 16510003


Mon, 02 Apr 2001 03:00:00 GMT  
 
 [ 13 post ] 

 Relevant Pages 

1. USA CA Norwalk - IBM MVS-OS/390 Systems Programmer

2. USA CA Norwalk - IBM MVS-OS/390 Systems Programmer

3. USA CA Norwalk - IBM MVS-OS/390 Systems Programmer

4. USA CA Norwalk - IBM MVS-OS/390 Systems Programmer

5. IBM MVS/TSO or OS/390 dynamic allocation of dataset name

6. Porting PL/I from IBM 390 to Windows

7. What is the difference between DEC PL/1 and OS/390 PL/1

8. VisualAge PL/I for OS/390 and PL/I 2.3

9. PL/I - new IBM compiler for MVS ...

10. OS/390 or MVS Newsgroups

11. SPLEVEL macro (MVS and OS/390)

12. Smalltalk MVS - OS/390

 

 
Powered by phpBB® Forum Software