Issue TSO command from SAS

Issue TSO command from SAS

Post by oht307 » Sat, 26 Feb 2005 04:49:06


Is there any way to issue the TSO command WOHIS from sas ? I would
like to capture the name of the user. I tried

name=system("whois &userid");

but this only give me the error

SAST105I WHOIS ENDED DUE TO ERROR +
SAST105I SYSTEM ABEND CODE 684 REASON CODE 004
***

Is anyone has a better idea ?

Thanks for all the help..

David
 
 
 

Issue TSO command from SAS

Post by harry.droo » Sat, 26 Feb 2005 05:19:54

See &sysuid is the "Host Specific" area of Online Docs

-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ]On Behalf Of
David
Sent: Thursday, February 24, 2005 2:49 PM
To: XXXX@XXXXX.COM
Subject: Issue TSO command from SAS


Is there any way to issue the TSO command WOHIS from sas ? I would
like to capture the name of the user. I tried

name=system("whois &userid");

but this only give me the error

SAST105I WHOIS ENDED DUE TO ERROR +
SAST105I SYSTEM ABEND CODE 684 REASON CODE 004
***

Is anyone has a better idea ?

Thanks for all the help..

David


------------------------------------------------------------

This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier ectronique est confidentiel et prot L'expiteur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) digns) est interdite. Si vous recevez ce courrier ectronique par erreur, veuillez m'en aviser immiatement, par retour de courrier ectronique ou par un autre moyen.

============================================================

 
 
 

Issue TSO command from SAS

Post by michaelrai » Sat, 26 Feb 2005 05:31:46

ear SAS-L-ers,

A "David" posed the following interesting question:


David, I have a better idea, and you are welcome for the help! You can
use either of the following z/OS automatic macro variables:

SYSJOBID
contains the job name of the batch job that is currently
executing, or the user ID that is associated with the current SAS
session. SAS obtains this value from the TIOCNJOB field of the TIOT
control block, except in the case of SAS/SESSION. With SAS/SESSION, SAS
obtains the value from the User_id field that is returned by the
Get_TP_Properties service of APPC/MVS. You cannot change the value of
this variable.

SYSUID
contains the value of the TSO user ID that is associated with
the SAS session, regardless of whether the session is a batch job, a
remote connect session, a SAS/SESSION connection, or a TSO session. SAS
obtains this value from the ACEEUSRI field of the ACEE control block.

Both of the above explanations were copied from the SAS V9.1.3 online
documentation.

I have used SYSUID a lot in SAS/AF and SAS/SCL programs. And, I have
tended to use SYSJOBID more in batch programs.

A scan of some of my old code dug up the following snippet that I had in
several programs to record the batch job name:


/***********************************************************************
*************************/
/* UPDATE THE ADMIN.PRODJOBS WITH INFORMATION ABOUT THIS BATCH
*/
/* JOBS RUN DATETIME. FOR AUDIT PURPOSES.
*/

/***********************************************************************
************************/
DATA JOBRUN;

FORMAT JOB $8. RUNDATE DATETIME.;

JOB = SYMGET('SYSJOBID');
RUNDATE = DATETIME();

RUN;

There is no reason why you couldn't morph this example to use SYSUID,
instead.

David, best of luck to you in getting the Userids of people executing
your SAS programs!

I hope that this suggestion proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not
reflect those of my organization or my associates. All SAS code and/or
methodologies specified in this posting are for illustrative purposes
only and no warranty is stated or implied as to their accuracy or
applicability. People deciding to use information in this posting do so
at their own risk.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Michael A. Raithel
"The man who wrote the book on performance"
E-mail: XXXX@XXXXX.COM
Author: Tuning SAS Applications in the MVS Environment
Author: Tuning SAS Applications in the OS/390 and z/OS Environments,
Second Edition
http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172

Currently Writing: The Complete Guide to Creating and Using SAS Indexes
(due Summer 2005)

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
It is our choices...that show what we truly are, far more than our
abilities.
- J.K. Rowling
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 
 

Issue TSO command from SAS

Post by Jeff.Voell » Sat, 26 Feb 2005 05:33:37

I may have made the task more complicated than necessary (it's a personal
specialty), but when I needed the same thing I had to write a REXX script
that ran WHOIS and wrote the results to a file which SAS could then read.
This was back in version 6. Things may have changed since, but the advice I
got from SAS at the time said there was no way for SAS to capture the output
from a system command.

-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ] On Behalf Of David
Sent: Thursday, February 24, 2005 11:49 AM
To: XXXX@XXXXX.COM
Subject: Issue TSO command from SAS


Is there any way to issue the TSO command WOHIS from sas ? I would
like to capture the name of the user. I tried

name=system("whois &userid");

but this only give me the error

SAST105I WHOIS ENDED DUE TO ERROR +
SAST105I SYSTEM ABEND CODE 684 REASON CODE 004
***

Is anyone has a better idea ?

Thanks for all the help..

David
 
 
 

Issue TSO command from SAS

Post by Jeff.Voell » Sat, 26 Feb 2005 05:50:53

I think David's issue is that he wants to convert the userid to a name,
which is why he's using WHOIS.

-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ] On Behalf Of Harry
Droogendyk
Sent: Thursday, February 24, 2005 12:20 PM
To: XXXX@XXXXX.COM
Subject: Re: Issue TSO command from SAS


See &sysuid is the "Host Specific" area of Online Docs

-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ]On Behalf Of
David
Sent: Thursday, February 24, 2005 2:49 PM
To: XXXX@XXXXX.COM
Subject: Issue TSO command from SAS


Is there any way to issue the TSO command WOHIS from sas ? I would
like to capture the name of the user. I tried

name=system("whois &userid");

but this only give me the error

SAST105I WHOIS ENDED DUE TO ERROR +
SAST105I SYSTEM ABEND CODE 684 REASON CODE 004
***

Is anyone has a better idea ?

Thanks for all the help..

David


------------------------------------------------------------

This e-mail may be privileged and/or confidential, and the sender does not
waive any related rights and obligations. Any distribution, use or copying
of this e-mail or the information it contains by other than an intended
recipient is unauthorized. If you received this e-mail in error, please
advise me (by return e-mail or otherwise) immediately.

Ce courrier ectronique est confidentiel et prot L'expiteur ne
renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion,
utilisation ou copie de ce message ou des renseignements qu'il contient par
une personne autre que le (les) destinataire(s) digns) est interdite. Si
vous recevez ce courrier ectronique par erreur, veuillez m'en aviser
immiatement, par retour de courrier ectronique ou par un autre moyen.

============================================================
 
 
 

Issue TSO command from SAS

Post by oht307 » Sat, 05 Mar 2005 02:42:26

Hi,

Thanks for all your helps. Jeff is right. I use the sysuid a lot in my
AF/FSP. However, my issue is to obtain the name that associate with
the SYSUID. There don't seem a SAS system variable I can use. The only
way I know is the WHOIS tso function and I can get in in batch with
'PGM=IKJEFT01' but has trouble bringing it into the AF/SPF environment.
I need this to build a kind of automatic email address such as
XXXX@XXXXX.COM without the user type in in my AF/FSP
apps. Anybody has any experience or idea ?

David





name,
Harry
does not
copying
intended
please
L'expiteur ne >> renonce pas aux droits et obligations qui s'y rapportent. Toute
diffusion, >> utilisation ou copie de ce message ou des renseignements qu'il
contient par >> une personne autre que le (les) destinataire(s) digns) est
interdite. Si> > vous recevez ce courrier ectronique par erreur, veuillez m'en
aviser> > immiatement, par retour de courrier ectronique ou par un autre
moyen.> > > > ============================================================