Re: Where can a running TSO program get its terminal name
Well, this may be all well and good. It is still useless to me and I suspect most of us here. Even searching locally on my workstation, the only place I find the string 0de6a9840123e547b061ac5b6765c02617769...@exmb-05.ad.wsu.edu Is in the recent google search from trying it there. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Shmuel Metz (Seymour J.) Sent: Thursday, June 04, 2015 9:43 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name In 0DE6A9840123E547B061AC5B6765C0261776927D@EXMB- 05.ad.wsu.edu, on 06/02/2015 at 05:37 PM, Gibney, David Allen,Jr gib...@wsu.edu said: For some reason, which I can't make work Shmuel believes the In 000701d09bd1$1872a0e0$4957e2a0$@mcn.org, on 05/31/2015 He always includes is of value. Perhaps if you were more famliar with long establshed Internet conventions you would understand why it is of value. Where this link may lead is not anywhere I can seem to get to :) It's the message id of the original message. If your email spool is in mbox format, you can simply search for the string with any editor. If maildir, any equivalent of grep will work. Personally, i use an SPF clone for both. Likewise for a searchable archive of messages, just search for the string. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see https://urldefense.proofpoint.com/v1/url?u=http://patriot.net/~shmuel/resu me/brief.htmlk=EWEYHnIvm0nsSxnW5y9VIw%3D%3D%0Ar=j6Xa1Y0fbuP2 mfgCQ5Zxhg%3D%3D%0Am=b6at5teCddNF5Hf5Pq6brmCc6FOdwmweAzuQ bSYhPsI%3D%0As=bc0e514e08598f851e72e0b9c7f9b58444af42839b696118 acfd5e6bd37be92b We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- 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: Where can a running TSO program get its terminal name
In 0de6a9840123e547b061ac5b6765c02617769...@exmb-05.ad.wsu.edu, on 06/02/2015 at 05:37 PM, Gibney, David Allen,Jr gib...@wsu.edu said: For some reason, which I can't make work Shmuel believes the In 000701d09bd1$1872a0e0$4957e2a0$@mcn.org, on 05/31/2015 He always includes is of value. Perhaps if you were more famliar with long establshed Internet conventions you would understand why it is of value. Where this link may lead is not anywhere I can seem to get to :) It's the message id of the original message. If your email spool is in mbox format, you can simply search for the string with any editor. If maildir, any equivalent of grep will work. Personally, i use an SPF clone for both. Likewise for a searchable archive of messages, just search for the string. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
In 000701d09bd1$1872a0e0$4957e2a0$@mcn.org, on 05/31/2015 at 11:39 AM, Charles Mills charl...@mcn.org said: The master of the out-of-context quote. Not even close; the context was clearly IEABRCX. By all means use it blindly; it's not my dog. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
For some reason, which I can't make work Shmuel believes the In 000701d09bd1$1872a0e0$4957e2a0$@mcn.org, on 05/31/2015 He always includes is of value. Where this link may lead is not anywhere I can seem to get to :) -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Shmuel Metz (Seymour J.) Sent: Monday, June 01, 2015 4:57 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name In 000701d09bd1$1872a0e0$4957e2a0$@mcn.org, on 05/31/2015 at 11:39 AM, Charles Mills charl...@mcn.org said: The master of the out-of-context quote. Not even close; the context was clearly IEABRCX. By all means use it blindly; it's not my dog. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see https://urldefense.proofpoint.com/v1/url?u=http://patriot.net/~shmuel/resu me/brief.htmlk=EWEYHnIvm0nsSxnW5y9VIw%3D%3D%0Ar=j6Xa1Y0fbuP2 mfgCQ5Zxhg%3D%3D%0Am=7SKyCkAfJ67LTYAs%2Fp0A661K9Gktd1tGjWsHJ Kdg3gw%3D%0As=7ca3515d0428275e42f8a293fc866b35f3d11efa4ac80944f 4d3a132e9063bf7 We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- 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: Where can a running TSO program get its terminal name
In 03d701d09566$b22a3de0$167eb9a0$@mcn.org, on 05/23/2015 at 07:42 AM, Charles Mills charl...@mcn.org said: @Shmuel, MVS Assembler Services Guide says In what context and section? Is the reference to the AMODE24 flag in the load module or to the actual addressing mode? The AMODE24 pseudo-op implies RMODEANY, but dynamically setting the PSW to 24-bit mode does not. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
In 03fa01d09573$5a824990$0f86dcb0$@mcn.org, on 05/23/2015 at 09:13 AM, Charles Mills charl...@mcn.org said: Sorry to belabor this thread but for the sake of future Googlers felt I needed to say that a global IEABRCX DEFINE is probably a necessary part of this solution. Not if you use MF=. IEABRCX DEFINE might cause collatral damage, but it's not my dog. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
The master of the out-of-context quote. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Shmuel Metz (Seymour J.) Sent: Sunday, May 31, 2015 7:34 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name In 03fa01d09573$5a824990$0f86dcb0$@mcn.org, on 05/23/2015 at 09:13 AM, Charles Mills charl...@mcn.org said: Sorry to belabor this thread but for the sake of future Googlers felt I needed to say that a global IEABRCX DEFINE is probably a necessary part of this solution. Not if you use MF=. IEABRCX DEFINE might cause collatral damage, but it's not my dog. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
On 5/19/2015 5:56 AM, Charles Mills wrote: GTTERM is AMODE 24 only! IBM, really? We issue GTTERM all the time from programs that are AMODE(31) and RMODE(31). Only the 8-byte parameter must reside below 16MB. Put it next to your DCBs (if any) otherwise you'll need to acquire and free an 8-byte parm list area using LOC=24 ... yes, it's gross... Example, TSOPRM24 is an 8-byte area below 16MB: | MVC TSOPRM24(GTTERMPL),GTTERMP Set GTTERM parm list | GTTERM ATTRIB=(3),Issue GTTERM macro | PRMSZE=4(,3), (same) | MF=(E,TSOPRM24) (same) | ... |GTTERMP GTTERM MF=L GTTERM parm list |GTTERMPL EQU *-GTTERMP Length of GTTERM parm list -- Edward E Jaffe Phoenix Software International, Inc 831 Parkview Drive North El Segundo, CA 90245 http://www.phoenixsoftware.com/ -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
As I said, I had heard that theory but decided to play it safe. It's a fairly small in-and-out subroutine and its entire GETMAIN requirement (save area, other MF=L's, etc.) is only about 1K, so I just get it all below the line. Only the 8-byte parameter must reside below 16MB. Are you real sure? Based on my S0C4 before I realized that anything had to go below the line it seemed like the operands (R3 in your example) had to be below the line. Perhaps not -- once I figured out what the general S0C4 problem was I did not put too fine a point on it. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Ed Jaffe Sent: Saturday, May 23, 2015 3:37 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name On 5/19/2015 5:56 AM, Charles Mills wrote: GTTERM is AMODE 24 only! IBM, really? We issue GTTERM all the time from programs that are AMODE(31) and RMODE(31). Only the 8-byte parameter must reside below 16MB. Put it next to your DCBs (if any) otherwise you'll need to acquire and free an 8-byte parm list area using LOC=24 ... yes, it's gross... Example, TSOPRM24 is an 8-byte area below 16MB: | MVC TSOPRM24(GTTERMPL),GTTERMP Set GTTERM parm list | GTTERM ATTRIB=(3),Issue GTTERM macro | PRMSZE=4(,3), (same) | MF=(E,TSOPRM24) (same) | ... |GTTERMP GTTERM MF=L GTTERM parm list |GTTERMPL EQU *-GTTERMP Length of GTTERM parm list -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Agreed. Solving the BAL is necessary but not sufficient. I think an MF=E/L approach might be an alternative also. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Bill Godfrey Sent: Saturday, May 23, 2015 10:36 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Just using a relative branch alone doesn't work if the GTTERM being executed is above the line. You have to use MF=(E,address) for it to work in RMODE 31. I'm referring to running GTTERM directly from above the line, not from a copy of it that is below the line as you are doing. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
In 037f01d09233$366e4c90$a34ae5b0$@mcn.org, on 05/19/2015 at 05:56 AM, Charles Mills charl...@mcn.org said: GTTERM is AMODE 24 only! IBM, really? As long as it's not RMODE24, it's a reasonable retriction for a legacy macro. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
I doubt that a relative branch will help. Register 1 is expected to contain an address below the line. It works in RMODE 31, but only if MF=(E,address) is specified on GTTERM and the specified address is below the line. The macro expansion will just point register 1 to the specified address, or if the address is (1) leave it unchanged. If register 1 points above the line, as it would with a BAL, SVC 94 gets a S0C4, presumably because the above-the-line address in register 1 is not expected. Bill On Sat, 23 May 2015 09:13:06 -0700, Charles Mills wrote: Sorry to belabor this thread but for the sake of future Googlers felt I needed to say that a global IEABRCX DEFINE is probably a necessary part of this solution. GTTERM contains the common BAL 1,*+12 type formulation and that will not work when moved to GETMAIN storage without either converting the BAL to a relative branch (as IEABRCX does) or some cleverness with USING. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Charles Mills Sent: Wednesday, May 20, 2015 5:14 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Thanks all for your suggestions. In the hope of helping a future Googler, here is How to Use GTTERM from an AMODE 31 Program. I don't claim this method is novel or optimal, just that it works. BTW, I am using the GTTERM now primarily for the other information it returns like the IP address. I get the terminal name from ACEETRID. I built a model GTTERM. This is assembled like a constant, not in the line of executable code. GTTERMmdl EQU * GTTERM PRMSZE=(R2), TERMSIZE, mandatory + TERMID=(R4) TERMWORK BSM 0,R11 Return in 31-bit mode GTTERMmdl_len EQU *-GTTERMmdl The module already had a GETMAIN for a save area and other (small) reentrant storage. I changed the GETMAIN to LOC=BELOW and added the following to the reentrant storage: DS0H Align GTTERMarea DS XL(GTTERMmdl_len) GTTERM moved here TERMSIZE DSH GTTERM terminal size TERMWORK DSCL39GTTERM return area In the executable code, I move the model GTTERM into the GETMAIN area and BASSM to it MVC GTTERMarea,GTTERMmdl MVC TERMWORK(6),=C'CODEPG' LAR2,TERMSIZE LAR4,TERMWORK LAR15,GTTERMarea BASSM R11,R15 I have not done extensive testing but this does all seem to work. -- 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: Where can a running TSO program get its terminal name
Just using a relative branch alone doesn't work if the GTTERM being executed is above the line. You have to use MF=(E,address) for it to work in RMODE 31. I'm referring to running GTTERM directly from above the line, not from a copy of it that is below the line as you are doing. Bill On Sat, 23 May 2015 10:06:31 -0700, Charles Mills wrote: Nope. It works. BAL 1, points R1 to the words following, in any event or AMODE. The problem is the *+12 part. As a relative branch you can move the instruction around in memory and it still jumps to *+12. As an old-fashioned BAL it jumps to some specific address off of the CSECT base register. No MF= anywhere in the picture. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Bill Godfrey Sent: Saturday, May 23, 2015 9:46 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name I doubt that a relative branch will help. Register 1 is expected to contain an address below the line. It works in RMODE 31, but only if MF=(E,address) is specified on GTTERM and the specified address is below the line. The macro expansion will just point register 1 to the specified address, or if the address is (1) leave it unchanged. If register 1 points above the line, as it would with a BAL, SVC 94 gets a S0C4, presumably because the above-the-line address in register 1 is not expected. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
@Shmuel, MVS Assembler Services Guide says of AMODE 24/RMODE ANY This combination is invalid because an AMODE 24 module cannot reside above 16 megabytes. I'm not sure how you would execute an RMODE ANY macro with a 24-bit address in the PSW. So I think AMODE 24 pretty much implies RMODE 24. That's why I moved the executable macro below the line. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Shmuel Metz (Seymour J.) Sent: Thursday, May 21, 2015 8:04 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name In 037f01d09233$366e4c90$a34ae5b0$@mcn.org, on 05/19/2015 at 05:56 AM, Charles Mills charl...@mcn.org said: GTTERM is AMODE 24 only! IBM, really? As long as it's not RMODE24, it's a reasonable retriction for a legacy macro. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Nope. It works. BAL 1, points R1 to the words following, in any event or AMODE. The problem is the *+12 part. As a relative branch you can move the instruction around in memory and it still jumps to *+12. As an old-fashioned BAL it jumps to some specific address off of the CSECT base register. No MF= anywhere in the picture. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Bill Godfrey Sent: Saturday, May 23, 2015 9:46 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name I doubt that a relative branch will help. Register 1 is expected to contain an address below the line. It works in RMODE 31, but only if MF=(E,address) is specified on GTTERM and the specified address is below the line. The macro expansion will just point register 1 to the specified address, or if the address is (1) leave it unchanged. If register 1 points above the line, as it would with a BAL, SVC 94 gets a S0C4, presumably because the above-the-line address in register 1 is not expected. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Sorry to belabor this thread but for the sake of future Googlers felt I needed to say that a global IEABRCX DEFINE is probably a necessary part of this solution. GTTERM contains the common BAL 1,*+12 type formulation and that will not work when moved to GETMAIN storage without either converting the BAL to a relative branch (as IEABRCX does) or some cleverness with USING. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Charles Mills Sent: Wednesday, May 20, 2015 5:14 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Thanks all for your suggestions. In the hope of helping a future Googler, here is How to Use GTTERM from an AMODE 31 Program. I don't claim this method is novel or optimal, just that it works. BTW, I am using the GTTERM now primarily for the other information it returns like the IP address. I get the terminal name from ACEETRID. I built a model GTTERM. This is assembled like a constant, not in the line of executable code. GTTERMmdl EQU * GTTERM PRMSZE=(R2), TERMSIZE, mandatory + TERMID=(R4) TERMWORK BSM 0,R11 Return in 31-bit mode GTTERMmdl_len EQU *-GTTERMmdl The module already had a GETMAIN for a save area and other (small) reentrant storage. I changed the GETMAIN to LOC=BELOW and added the following to the reentrant storage: DS0H Align GTTERMarea DS XL(GTTERMmdl_len) GTTERM moved here TERMSIZE DSH GTTERM terminal size TERMWORK DSCL39GTTERM return area In the executable code, I move the model GTTERM into the GETMAIN area and BASSM to it MVC GTTERMarea,GTTERMmdl MVC TERMWORK(6),=C'CODEPG' LAR2,TERMSIZE LAR4,TERMWORK LAR15,GTTERMarea BASSM R11,R15 I have not done extensive testing but this does all seem to work. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
In 007f01d0935a$fdc4feb0$f94efc10$@mcn.org, on 05/20/2015 at 05:13 PM, Charles Mills charl...@mcn.org said: Thanks all for your suggestions. In the hope of helping a future Googler, here is How to Use GTTERM from an AMODE 31 Program. Why the complexity? As long a there's no RMODE24 requirement, why move the code to a work area? You still need the BASSM/BSM and the parameters below the line, but I don't see the need for more than a model GTTERM MF=L -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Well, it seemed safer. As I said, I do not claim this is optimal. Someone else suggested offline that they thought it would work AMODE 31 just so long as the actual operands were below the line. I don't need to have this blow up at a customer's. The additional cost of doing it this way rather than without a move is one DS and one MVC (OTOH saving the complexity of an MF=E/L pair). Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Shmuel Metz (Seymour J.) Sent: Thursday, May 21, 2015 8:13 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name In 007f01d0935a$fdc4feb0$f94efc10$@mcn.org, on 05/20/2015 at 05:13 PM, Charles Mills charl...@mcn.org said: Thanks all for your suggestions. In the hope of helping a future Googler, here is How to Use GTTERM from an AMODE 31 Program. Why the complexity? As long a there's no RMODE24 requirement, why move the code to a work area? You still need the BASSM/BSM and the parameters below the line, but I don't see the need for more than a model GTTERM MF=L -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Charles, You look at the TSB and its extension ? Scott On Tuesday, May 19, 2015, Charles Mills charl...@mcn.org wrote: GTTERM is AMODE 24 only! IBM, really? Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU javascript:;] On Behalf Of Bill Godfrey Sent: Tuesday, May 12, 2015 12:40 PM To: IBM-MAIN@LISTSERV.UA.EDU javascript:; Subject: Re: Where can a running TSO program get its terminal name Also the GTTERM macro. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4B790/7.4 Bill -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu javascript:; 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: Where can a running TSO program get its terminal name
Thanks all for your suggestions. In the hope of helping a future Googler, here is How to Use GTTERM from an AMODE 31 Program. I don't claim this method is novel or optimal, just that it works. BTW, I am using the GTTERM now primarily for the other information it returns like the IP address. I get the terminal name from ACEETRID. I built a model GTTERM. This is assembled like a constant, not in the line of executable code. GTTERMmdl EQU * GTTERM PRMSZE=(R2), TERMSIZE, mandatory + TERMID=(R4) TERMWORK BSM 0,R11 Return in 31-bit mode GTTERMmdl_len EQU *-GTTERMmdl The module already had a GETMAIN for a save area and other (small) reentrant storage. I changed the GETMAIN to LOC=BELOW and added the following to the reentrant storage: DS0H Align GTTERMarea DS XL(GTTERMmdl_len) GTTERM moved here TERMSIZE DSH GTTERM terminal size TERMWORK DSCL39GTTERM return area In the executable code, I move the model GTTERM into the GETMAIN area and BASSM to it MVC GTTERMarea,GTTERMmdl MVC TERMWORK(6),=C'CODEPG' LAR2,TERMSIZE LAR4,TERMWORK LAR15,GTTERMarea BASSM R11,R15 I have not done extensive testing but this does all seem to work. Charles -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
GTTERM is AMODE 24 only! IBM, really? Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Bill Godfrey Sent: Tuesday, May 12, 2015 12:40 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Also the GTTERM macro. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4B790/7.4 Bill -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
In 03a301d08cef$ad9c2bf0$08d483d0$@mcn.org, on 05/12/2015 at 01:10 PM, Charles Mills charl...@mcn.org said: I did not know that TSO was cognizant of any IP address. VTIOC picks the IP address out of an optional SNA CV. If you're using a session manager, verify that it is configured to support this. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
In 036f01d08cd5$35873340$a09599c0$@mcn.org, on 05/12/2015 at 10:00 AM, Charles Mills charl...@mcn.org said: Subject line pretty much says it all. No. What is a terminal name these days? SMF30TSN or SMF30TID. They should match fields returned by GTTERM. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
On 12 May 2015 at 13:00, Charles Mills charl...@mcn.org wrote: Subject line pretty much says it all. ASCBTSB-IKJTSB. Field TSBTRMID, and maybe others in TSBEXTNT-IKTTSBX. Both in fetch protected storage, iirc. Tony H. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
The z/OS MVS Data Areas manuals are available -- do you need more details? Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Rupert Reynolds Sent: Tuesday, May 12, 2015 10:49 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Many years ago I had an MVS/ESA control block map from a course run by IMI. It got lost during a house move. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
In REXX, try: term_name = sysvar(SYSLTERM) Roger On 2015-05-12 2:22 PM, Leonardo Vaz wrote: This works for me: /* REXX */ ASCB = C2d(Storage(224,4)) ASXB = C2d(Storage(D2x(ASCB+108),4)) ACEE = C2d(Storage(D2x(ASXB+200),4)) /* USER = Storage(D2x(ACEE+21),8) GROUP= Storage(D2x(ACEE+30),8) terminal = Storage(D2x(ACEE+64),8) Say 'The USERID in the ACEE is:' USER Say 'The GROUP in the ACEE is:' GROUP Say 'The TERMID in the ACEE is:' terminal Regards, Leo -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Charles Mills Sent: Tuesday, May 12, 2015 2:17 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name The z/OS MVS Data Areas manuals are available -- do you need more details? Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Rupert Reynolds Sent: Tuesday, May 12, 2015 10:49 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Many years ago I had an MVS/ESA control block map from a course run by IMI. It got lost during a house move. -- 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 -- Hava a great day! Roger W. Suhr Indianapolis, IN 46202 suhr...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Thanks, yes, I got pointed at GTTERM by a private reply also. When all else fails, try the environment's API. Good stuff in GTTERM: Terminal name, net ID, and IP address (among others). I did not know that TSO was cognizant of any IP address. I thought that TSO just saw a TN3270 LU like any other 3270 LU and had no awareness of the concept of IP addresses. Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Bill Godfrey Sent: Tuesday, May 12, 2015 12:40 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Also the GTTERM macro. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4B790/7.4 -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Also the GTTERM macro. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4B790/7.4 Bill On Tue, 12 May 2015 11:29:55 -0700, Charles Mills charl...@mcn.org wrote: Great! Thanks. (Also Thanks, Tony.) Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Leonardo Vaz Sent: Tuesday, May 12, 2015 11:23 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name This works for me: /* REXX */ ASCB = C2d(Storage(224,4)) ASXB = C2d(Storage(D2x(ASCB+108),4)) ACEE = C2d(Storage(D2x(ASXB+200),4)) /* USER = Storage(D2x(ACEE+21),8) GROUP= Storage(D2x(ACEE+30),8) terminal = Storage(D2x(ACEE+64),8) Say 'The USERID in the ACEE is:' USER Say 'The GROUP in the ACEE is:' GROUP Say 'The TERMID in the ACEE is:' terminal -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
This works for me: /* REXX */ ASCB = C2d(Storage(224,4)) ASXB = C2d(Storage(D2x(ASCB+108),4)) ACEE = C2d(Storage(D2x(ASXB+200),4)) /* USER = Storage(D2x(ACEE+21),8) GROUP= Storage(D2x(ACEE+30),8) terminal = Storage(D2x(ACEE+64),8) Say 'The USERID in the ACEE is:' USER Say 'The GROUP in the ACEE is:' GROUP Say 'The TERMID in the ACEE is:' terminal Regards, Leo -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Charles Mills Sent: Tuesday, May 12, 2015 2:17 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name The z/OS MVS Data Areas manuals are available -- do you need more details? Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Rupert Reynolds Sent: Tuesday, May 12, 2015 10:49 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Many years ago I had an MVS/ESA control block map from a course run by IMI. It got lost during a house move. -- 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: Where can a running TSO program get its terminal name
Don't you mean sysvar(systermid)? I don't think he's looking for the number of lines in the screen -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Roger Suhr (gmail) Sent: Tuesday, May 12, 2015 3:01 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name In REXX, try: term_name = sysvar(SYSLTERM) Roger On 2015-05-12 2:22 PM, Leonardo Vaz wrote: This works for me: /* REXX */ ASCB = C2d(Storage(224,4)) ASXB = C2d(Storage(D2x(ASCB+108),4)) ACEE = C2d(Storage(D2x(ASXB+200),4)) /* USER = Storage(D2x(ACEE+21),8) GROUP= Storage(D2x(ACEE+30),8) terminal = Storage(D2x(ACEE+64),8) Say 'The USERID in the ACEE is:' USER Say 'The GROUP in the ACEE is:' GROUP Say 'The TERMID in the ACEE is:' terminal Regards, Leo -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Charles Mills Sent: Tuesday, May 12, 2015 2:17 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name The z/OS MVS Data Areas manuals are available -- do you need more details? Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Rupert Reynolds Sent: Tuesday, May 12, 2015 10:49 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Many years ago I had an MVS/ESA control block map from a course run by IMI. It got lost during a house move. -- 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 -- Hava a great day! Roger W. Suhr Indianapolis, IN 46202 suhr...@gmail.com -- 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: Where can a running TSO program get its terminal name
Yes, that's correct. Sorry for the confusion. sysvar(SYSTERMID) gives the VTAM terminal ID. The point i, there is no need to chase control block chains. Roger On 2015-05-12 3:30 PM, Gross, Randall [PRI-1PP] wrote: Don't you mean sysvar(systermid)? I don't think he's looking for the number of lines in the screen -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Roger Suhr (gmail) Sent: Tuesday, May 12, 2015 3:01 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name In REXX, try: term_name = sysvar(SYSLTERM) Roger On 2015-05-12 2:22 PM, Leonardo Vaz wrote: This works for me: /* REXX */ ASCB = C2d(Storage(224,4)) ASXB = C2d(Storage(D2x(ASCB+108),4)) ACEE = C2d(Storage(D2x(ASXB+200),4)) /* USER = Storage(D2x(ACEE+21),8) GROUP= Storage(D2x(ACEE+30),8) terminal = Storage(D2x(ACEE+64),8) Say 'The USERID in the ACEE is:' USER Say 'The GROUP in the ACEE is:' GROUP Say 'The TERMID in the ACEE is:' terminal Regards, Leo -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Charles Mills Sent: Tuesday, May 12, 2015 2:17 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name The z/OS MVS Data Areas manuals are available -- do you need more details? Charles -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Rupert Reynolds Sent: Tuesday, May 12, 2015 10:49 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Where can a running TSO program get its terminal name Many years ago I had an MVS/ESA control block map from a course run by IMI. It got lost during a house move. -- 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 -- Hava a great day! Roger W. Suhr Indianapolis, IN 46202 suhr...@gmail.com -- 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 -- Hava a great day! Roger W. Suhr Indianapolis, IN 46202 suhr...@gmail.com -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Many years ago I had an MVS/ESA control block map from a course run by IMI. It got lost during a house move. Does anyone know anything that could replace it, please? Even if it only goes as far as 24-bit MVS it would be a big help right now :-) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: Where can a running TSO program get its terminal name
Hi Rupert In TSO REXX you can use a 'SYSVAR'... tid = SYSVAR(SYSTERMID) /Steve From: Rupert Reynolds rreyno...@cix.co.uk To: IBM-MAIN@LISTSERV.UA.EDU Date: 2015-05-12 19:59 Subject:Re: Where can a running TSO program get its terminal name Sent by:IBM Mainframe Discussion List IBM-MAIN@LISTSERV.UA.EDU Many years ago I had an MVS/ESA control block map from a course run by IMI. It got lost during a house move. Does anyone know anything that could replace it, please? Even if it only goes as far as 24-bit MVS it would be a big help right now :-) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN SÃ¥vida annat inte anges ovan: / Unless stated otherwise above: IBM Svenska AB Organisationsnummer: 556026-6883 Adress: 164 92 Stockholm -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN