View previous topic :: View next topic |
Author |
Message |
mfuser Banned
Joined: 01 Mar 2005 Posts: 105 Topics: 58
|
Posted: Thu Oct 05, 2006 7:31 am Post subject: Program needs the TSO USERID |
|
|
Members,
How can i know from a Program about the TSO ID which we logged in , i mean is it possible in a program to know the TSO Userid of the person logged in ? |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Thu Oct 05, 2006 7:33 am Post subject: |
|
|
Use can use ISPF services from within any mainframe program. Then, just VGET ZUSER.
O.
________
Ford Squire picture
Last edited by ofer71 on Sat Feb 05, 2011 11:50 am; edited 1 time in total |
|
Back to top |
|
 |
mfuser Banned
Joined: 01 Mar 2005 Posts: 105 Topics: 58
|
Posted: Thu Oct 05, 2006 7:43 am Post subject: |
|
|
Thanks Offer,
But how would i make use of it in the program say for example COBOL. Do i need to make any call or any syntax would help me . |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
|
Posted: Thu Oct 05, 2006 8:22 am Post subject: |
|
|
mfuser,
Search the forum for "cob2job" and see what you find from the search results.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
bauer Intermediate
Joined: 10 Oct 2003 Posts: 317 Topics: 50 Location: Germany
|
Posted: Thu Oct 05, 2006 9:26 am Post subject: |
|
|
mfuser,
this PL1 solution gets the userkey of user who submitts an batchjob. So if you are talking about tso batch program, transfer this coding to cobol and you get the userkey of submitter.
Code: |
/* PREFIXED SAVE AREA */
DCL 1 PSA BASED(SYSNULL()),
2 FILLER CHAR(548),
2 PSAAOLD PTR ;
/* ADRESS SPACE CONTROL BLOCK */
DCL 1 ASCB BASED(PSA.PSAAOLD) ,
2 FILLER CHAR(108) ,
2 ASCBASXB PTR ;
/* ADRESS SAPCE EXTENSION BLOCK */
DCL 1 ASXB BASED(ASCB.ASCBASXB) ,
2 FILLER CHAR(192) ,
2 ASXBUSER CHAR(7) ;
|
See also:
IBM Doku, MVS Data Areas, Volumne 1 - 5
GA22-7581-01, GA22-7582-01, ......
Hank Murphy, MVS Control Blocks, McGraw-Hill, Inc,
ISBN 0-07-044309-2
HTTP://WWW.S390.IBM.COM/BOOKMGR-CGI/BOOKMGR.CMD/LIBRARY
search for: "MVS DATA AREAS"
regards,
bauer |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Oct 05, 2006 11:14 am Post subject: |
|
|
This is a COBOL example of the ISPF VGET option:
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID...
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 VARLIST.
03 ZUSER PIC X(8).
01 NZUSER PIC X(7) VALUE '(ZUSER)'.
01 VDEFINE PIC X(8) VALUE 'VDEFINE'.
01 VGET PIC X(8) VALUE 'VGET '.
01 SHARED PIC X(8) VALUE 'SHARED '.
01 ASIS PIC X(8) VALUE 'ASIS '.
01 PROFILE PIC X(8) VALUE 'PROFILE'.
01 CHAR PIC X(8) VALUE 'CHAR '.
01 L8 PIC 9(6) VALUE 8 COMP.
PROCEDURE DIVISION.
CALL 'ISPLINK' USING VDEFINE NZUSER ZUSER CHAR L8.
CALL 'ISPLINK' USING VGET NZUSER ASIS.
DISPLAY ZUSER.
MOVE ZEROS TO RETURN-CODE.
STOP RUN.
|
|
|
Back to top |
|
 |
ramesh_v_s Beginner
Joined: 14 Oct 2004 Posts: 6 Topics: 3
|
Posted: Wed Sep 12, 2007 2:58 pm Post subject: |
|
|
Can we use this VDEFINE and VPUT in c programming? I am having to pass some values from C program to REXX. I am calling the C from REXX using LINKMVS.
Please post any working examples.
Thanks
Ramesh. |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Wed Sep 12, 2007 4:02 pm Post subject: |
|
|
I opened an EDIT session, entered the MODEL command on the command line, selected option 12 C - ISPF services in C/370 programs, then selected option V3 VDEFINE, which coded in the member:
Code: |
C Language calls to VDEFINE may be made by:
retcode = isplink ("VDEFINE ", namelist, variable, "CHAR ", length,
"(COPY, NOBSCAN, LIST )", userdata, "LFORMAT ");
|
Then, selecting V2 VPUT. I got
Code: |
C Language calls to VPUT may be made in two ways:
retcode = isplink("VPUT", namelist, "ASIS");
OR
strcpy(buffer,"VPUT namelist ASIS");
buflen = strlen(buffer);
retcode = ispexec(buflen, buffer);
|
|
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Thu Sep 27, 2007 10:39 am Post subject: |
|
|
Hi,
You could enter &sysuid in the parm field when the pgm is execed. Eg.:
//step10 exec=yrpgm,parm='&sysuid'
Then access the parm data in the pgm. _________________ Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Sep 27, 2007 6:14 pm Post subject: |
|
|
This thread is almost a year old. This recent activity should have been a new thread. |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Fri Sep 28, 2007 12:35 pm Post subject: |
|
|
semigeezer wrote: | This thread is almost a year old. This recent activity should have been a new thread. | So what?
The info provided could be relevant to someone researching the same problem a year from now. _________________ Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Sep 28, 2007 3:24 pm Post subject: |
|
|
How will a searcher know that they can find information about using ISPF services from C when the title is "Program needs the TSO USERID"? I agree that information relevant to the original question (like that which you provided) is appropriate for reasons you mentioned, but the update to this post had almost nothing to do with the original question. |
|
Back to top |
|
 |
slade Intermediate
Joined: 07 Feb 2003 Posts: 266 Topics: 1 Location: Edison, NJ USA
|
Posted: Sun Sep 30, 2007 11:50 am Post subject: |
|
|
Your orig post said:
Quote: | This thread is almost a year old. This recent activity should have been a new thread. |
It implies that it is too old to be updated or appended.
Given what you said in your follow-up post, this orig may have been more appropriate:
Quote: | If you want to go off topic, start another thread. |
_________________ Regards, Jack.
"A problem well stated is a problem half solved" -- Charles F. Kettering |
|
Back to top |
|
 |
|
|