Re: GTTERM assistance (really 3270 VTAM application?)

2022-11-26 Thread Colin Paice
40 years ago someone used to teach 360 assembler to newbies.   The
registers were "rabbit", "grass" etc instead of r2,r3.  The grads came out
very confused.

On Sat, 26 Nov 2022 at 18:32, Leonard D Woren 
wrote:

> Long ago, in a nearby galaxy, I used descriptive names for registers.
> I got over it after having to deal with a program that had 36
> different register equates.  That program was completely incomprehensible.
>
> You should think not only of what works for you when writing it, but
> as they say, "Always code as if the guy who ends up maintaining your
> code will be a violent psychopath who /knows where you live/.."  (You
> can google that for yourself and get 100K hits.)
>
> /Leonard
>
> Brian Chapman wrote on 11/21/2022 7:04 AM:
> > For the register equates, I only use the equates when the equate is
> related
> > to an active USING statement. With registers 0,1,12 (if not
> > baseless),13,14,and 15 unavailable, it really limits the number of
> > registers for addressing control blocks. I find the register equate
> > methodology very useful and descriptive when managing many DSECTs.
>
>
> --
> 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: GTTERM assistance (really 3270 VTAM application?)

2022-11-26 Thread Leonard D Woren
Long ago, in a nearby galaxy, I used descriptive names for registers.  
I got over it after having to deal with a program that had 36 
different register equates.  That program was completely incomprehensible.


You should think not only of what works for you when writing it, but 
as they say, "Always code as if the guy who ends up maintaining your 
code will be a violent psychopath who /knows where you live/.."  (You 
can google that for yourself and get 100K hits.)


/Leonard

Brian Chapman wrote on 11/21/2022 7:04 AM:

For the register equates, I only use the equates when the equate is related
to an active USING statement. With registers 0,1,12 (if not
baseless),13,14,and 15 unavailable, it really limits the number of
registers for addressing control blocks. I find the register equate
methodology very useful and descriptive when managing many DSECTs.



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GTTERM assistance (really 3270 VTAM application?)

2022-11-21 Thread Brian Chapman
Michael.

Originally, I started on this project to build a PC service provider
address space. The address space acquired several 64-bit areas with the
IARV64 GETSHARED service, and the service provider would allow problem
state address spaces to acquire interest into these 64-bit areas. The
64-bit areas were buffers for monitoring data. I also wanted a 3270
interface for administrative management of the configurations and the
monitoring data. Now, this project has morphed into something different.

For the register equates, I only use the equates when the equate is related
to an active USING statement. With registers 0,1,12 (if not
baseless),13,14,and 15 unavailable, it really limits the number of
registers for addressing control blocks. I find the register equate
methodology very useful and descriptive when managing many DSECTs.

I found the solution to my bind problem. All of the examples and most of
the manuals referenced the alternate area for bind information. I found one
manual that referenced 'Record area' and 'RECLEN'. I change the VTAM
INQUIRE macro from AAREA and AAREALN to AREA and AREALEN, and the INQUIRE
and OPNDST worked successfully with the bind information returned.

Here is the updated source:
**-**
** PROGRAM : PORTDSPI  **
** AUTHOR  : BRIAN CHAPMAN **
** WRITTEN ON  : 23 AUGUST 2017**
** MODIFIED ON :   **
** ASM OPTIONS : RENT,REUS AMODE=31 RMODE=31 AC=0  **
** DESCRIPTION : TASK INITIALIZATION ROUTINE   **
** : THIS PROGRAM BUILDS THE INITIAL TASK RELATED  **
** : CONTROL BLOCKS FOR A NEW TASK TO BE DISPATCHED.   **
**-**
** *
* REGEQU   *
** *
* COPY  PORTKERN   *
* COPY  PORTDMH*
* COPY  TASKANCH   *
* COPY  SESSVTAM   *
* COPY  SESSSOKT   *
** *
* EJECT*
* IFGRPL AM=VTAM*
* EJECT*
* ISTUSFBC   *
* EJECT  *
* IFGACB AM=VTAM *
* EJECT  *
* IFGEXLST AM=VTAM*
* EJECT  *
* ISTDNIB *
* ISTDBIND   *
**   *
*WORKAREA DSECT  *
*WORKNAME DSCL8  *
*SAVEAREA DS18F  *
*SAVERC   DSF*
*SAVEANCH DSF*
**   *
*VTAMRETC DSF*
*VTAMFDB2 DSF*
**   *
*CALLPLST DS0F   *
*CALLPRM1 DSF*
*CALLPRM2 DSF*
*CALLPRM3 DSF*
*CALLPRM4 DSF*
*CALLPRM5 DSF *
**   *
*WORKLEN  EQU   *-WORKAREA   *
**   *
*WORKREG  EQU   R3   *
*KERNREG  EQU   R4   *
*ANCHREG  EQU   R5   *
*DMHREG   EQU   R6   *
*VTAMREG  EQU   R6   *
*RPLREG   EQU   R7*
*NIBREG   EQU   R8   *
*ACBREG   EQU   R9   *
*BINDREG  EQU   R10  *
**   *
*PORTDSPI CSECT  *
*PORTDSPI AMODE 31   *
*PORTDSPI RMODE ANY  *
* STM   R14,R12,12(R13) SAVE REGISTERS   *
* LRR12,R15 ESTABLISH BASE   *
* USING PORTDSPI,R12SET ADDRESSIBILITY*
* B START*
**   *
* DCCL9'PORTDSPI' *
* DCCL9'&SYSDATC' *
* DCCL5'&SYSTIME' *
***
*STARTDS0H 

Re: GTTERM assistance (really 3270 VTAM application?)

2022-11-10 Thread Seymour J Metz
Why do you say that page  is for LU 6.2?

"Session parameters not valid—PRI: A positive response to an activation request 
(for example, BIND) was received and was changed to a negative response because 
session parameters that were not valid were carried in the response. The 
services manager receiving the response sends a deactivation request for the 
corresponding session. This error can occur if NETIDs are coded incorrectly on 
any NETWORK statements in CDRM definitions. See z/OS Communications Server: SNA 
Resource Definition Reference for more information."


From: IBM Mainframe Discussion List  on behalf of 
Michael Stein 
Sent: Thursday, November 10, 2022 12:20 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance (really 3270 VTAM application?)

On Thu, Nov 10, 2022 at 07:14:34AM -0500, Brian Chapman wrote:
> Michael,
>
> Are you saying that sense code 084E is only applicable for LU6.2?

I'm saying the page you linked to was for LU6.2 and as far as I know
3270s aren't LU6.2.

Also I'm still very very uncertain what you are doing.  At least I now
know you aren't running a TSO session, but what you are doing is still
unclear.  I've just sort of assumed it's some sort of VTAM application
and talks to 3270s.

So what's unknown is the VTAM network environment like (modetab?, cross
domain?), what kind of 3270 you have: LU type? (or emulate?), what the
VTAM application is doing (like code?).

In trying to guess what's needed (it's been a long time) I looked at some
old VTAM application code which talked to 3270s (back then real 3270s).
They don't seem to deal with the session parameters so they are getting
set somewhere else than in the VTAM application...

The question is then why is your application different?

> You have 3 R6's?:
...
> DMHREG is only in effect for the small section of code before the DROP
> instruction. I could have used the VTAMREG equate in the MVCL section, but
> I wanted to be sure that it utilized an even-odd pair. In this case it
> would have, but I like the flexibility of changing my equate assignments if
> necessary.

Yes, even-odd pair is yet another reason to use only numbered registers.

You can do whatever you want, but I'd recommend:

a. only use r0-r15
b. include comments on register usage at important points

I feel that part of writing assembly code is register assignment and
it should be clear from the code and comments what is assigned.

And the information on register usage should be local to where the
registers are used, not hidden at the beginning of the program (or worse
hidden in another source / macro file).

*VTAMREG  EQU   R6
*NIBREG   EQU   R8

# 

*ALLOCATE DS0H
* LHI   R7,TASKANCH_LEN LOAD SESSION ANCHOR LENGTH
* GETMAIN R,LV=(7),LOC=31
* LRR6,R1   LOAD REGISTER
**
* LAR8,0SET DUMMY FROM ADDRESS
* SRR15,R15 ZERO FROM LENGTH
* MVCL  R6,R14  INITIALIZE WITH LOW VALUES

So NIBREG has 0 now?

# 

The following DS 0F and ORG leave a "hole" in your code which in the load
module might contain anything.  And it might change every time your
code was reassembled or linked.

I don't know what is in that offset in the SESSVTAM DSECT but the
begining of it is being initalized to unknown values...

Likely the area should be zeroed after the GETMAIN and only the needed
fields initialized (or else the ORG area replaced with zeros?).

*INITVTAM DS0F
* ORG   INITVTAM+SESSVTAM_INIT
*INITRPL  RPL   AM=VTAM,RESPOND=FME
*INITNIB  NIB   MODE=RECORD,PROC=(RESPX,TRUNC,NEGBIND)
*INITVTAL EQU   *-INITVTAM

PS: I believe that there are 3270 type VTAM application codes on the
cbttape as well as elsewhere.  While these may not be the best code,
they might give you hints as to what is needed to get you past
connecting to a 3270.

--
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: GTTERM assistance (really 3270 VTAM application?)

2022-11-10 Thread Michael Stein
On Thu, Nov 10, 2022 at 07:14:34AM -0500, Brian Chapman wrote:
> Michael,
> 
> Are you saying that sense code 084E is only applicable for LU6.2? 

I'm saying the page you linked to was for LU6.2 and as far as I know
3270s aren't LU6.2.

Also I'm still very very uncertain what you are doing.  At least I now
know you aren't running a TSO session, but what you are doing is still
unclear.  I've just sort of assumed it's some sort of VTAM application
and talks to 3270s.

So what's unknown is the VTAM network environment like (modetab?, cross
domain?), what kind of 3270 you have: LU type? (or emulate?), what the
VTAM application is doing (like code?).

In trying to guess what's needed (it's been a long time) I looked at some
old VTAM application code which talked to 3270s (back then real 3270s).
They don't seem to deal with the session parameters so they are getting
set somewhere else than in the VTAM application...

The question is then why is your application different?

> You have 3 R6's?:
...
> DMHREG is only in effect for the small section of code before the DROP
> instruction. I could have used the VTAMREG equate in the MVCL section, but
> I wanted to be sure that it utilized an even-odd pair. In this case it
> would have, but I like the flexibility of changing my equate assignments if
> necessary.

Yes, even-odd pair is yet another reason to use only numbered registers.

You can do whatever you want, but I'd recommend:

a. only use r0-r15 
b. include comments on register usage at important points

I feel that part of writing assembly code is register assignment and
it should be clear from the code and comments what is assigned. 

And the information on register usage should be local to where the
registers are used, not hidden at the beginning of the program (or worse
hidden in another source / macro file).

*VTAMREG  EQU   R6
*NIBREG   EQU   R8

# 

*ALLOCATE DS0H
* LHI   R7,TASKANCH_LEN LOAD SESSION ANCHOR LENGTH
* GETMAIN R,LV=(7),LOC=31
* LRR6,R1   LOAD REGISTER
**
* LAR8,0SET DUMMY FROM ADDRESS
* SRR15,R15 ZERO FROM LENGTH
* MVCL  R6,R14  INITIALIZE WITH LOW VALUES   

So NIBREG has 0 now?

# 

The following DS 0F and ORG leave a "hole" in your code which in the load
module might contain anything.  And it might change every time your
code was reassembled or linked.

I don't know what is in that offset in the SESSVTAM DSECT but the
begining of it is being initalized to unknown values...

Likely the area should be zeroed after the GETMAIN and only the needed
fields initialized (or else the ORG area replaced with zeros?).

*INITVTAM DS0F
* ORG   INITVTAM+SESSVTAM_INIT
*INITRPL  RPL   AM=VTAM,RESPOND=FME
*INITNIB  NIB   MODE=RECORD,PROC=(RESPX,TRUNC,NEGBIND)
*INITVTAL EQU   *-INITVTAM

PS: I believe that there are 3270 type VTAM application codes on the
cbttape as well as elsewhere.  While these may not be the best code,
they might give you hints as to what is needed to get you past
connecting to a 3270.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GTTERM assistance

2022-11-10 Thread Seymour J Metz
Try running a trace and posting, e.g., BIND, CINIT, INIT, RR units and 
responses.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Brian Chapman [bchapma...@gmail.com]
Sent: Thursday, November 10, 2022 7:54 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

Normal processing is for the user to enter a logon string and for
Unformatted System Services (or the TN3270 equivalent to USS) to convert it
to SNA.

Shmuel,

It should be this scenario. The address space issues the SETLOGON macro
with the LOGON parameter which addresses a logon exit routine. I then issue
'LOGON APPLID=A70PORTC' in my emulator, the logon exit routine is invoked,
posts the dispatcher ECB, and eventually the PORTDSPI program is invoked to
establish the session.

I issued a D NET,ID= command to inquire about the status of the opened ACB.
Here is the output.

*06.53.32 SYSC NET   IST097I DISPLAY
ACCEPTED*

*06.53.32 SYSC NET   IST075I NAME = SCA.A70PORTC, TYPE = DYNAMIC
APPL*

*IST486I STATUS= ACTIV, DESIRED STATE=
ACTIV *

*IST1447I REGISTRATION TYPE =
NETSRVR*

*IST1629I MODSRCH =
NEVER*

*IST977I MDLTAB=***NA***
ASLTAB=***NA*** *

*IST861I MODETAB=SCAMODE USSTAB=***NA***
LOGTAB=***NA*** *

*IST934I DLOGMOD=***NA*** USS
LANGTAB=***NA***   *

*IST1632I VPACING =  7
 *

*IST1938I APPC =
NO  *

*IST597I CAPABILITY-PLU ENABLED  ,SLU ENABLED  ,SESSION LIMIT
NONE   *

*IST231I APPL MAJOR NODE = MODLCICS
   *

*IST1425I DEFINED USING MODEL
A70?*  *

*IST654I I/O TRACE = OFF, BUFFER TRACE =
OFF *

*IST1500I STATE TRACE =
OFF  *

*IST271I JOBNAME = TS00JY3N, STEPNAME = ***NA***, DSPNAME =
ISTD98B2 *

*IST1050I MAXIMUM COMPRESSION LEVEL - INPUT = 0, OUTPUT =
0  *

*IST1633I ASRCVLM =
100  *

*IST1634I DATA SPACE USAGE: CURRENT = 0 MAXIMUM =
0  *

*IST2436I DSMONITR =
NO  *

*IST171I ACTIVE SESSIONS = 00, SESSION REQUESTS =
00 *

*IST314I END
   *


Thank you,

Brian Chapman


On Thu, Nov 10, 2022 at 7:34 AM Seymour J Metz  wrote:

> Normal processing is for the user to enter a logon string and for
> Unformatted System Services (or the TN3270 equivalent to USS) to convert it
> to SNA. That process determines a BIND image. If, instead, your application
> initiates the session then your application is responsible for providing
> the BIND image.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Brian Chapman [bchapma...@gmail.com]
> Sent: Wednesday, November 9, 2022 2:59 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: GTTERM assistance
>
> Thanks everyone. I went back to my session initialization process and
> reviewed my logic for the OPNDST macro. Originally, I did not use the AAREA
> or AAREALN parameters on this macro. I added these parameters and set the
> NIBNDAR accordingly, but now I'm getting a 084E sense code.
>
> *09.04.47 JOB21339  +PRT103E VTAM OPNDST request failed for netname
> SACTV017. Return = 0004 Sense = 084E.*
>
> I reviewed the documentation for this sense code. It seems that VTAM is
> expecting certain bind fields to be populated, but I'm not sure which
> fields.
>
> Sense code 084E
>
> Session parameters not valid—PRI: A positive response to an activation
> request (for example, BIND) was received and was changed to a negative
> response because session parameters that were not valid were carried in the
> response. The services manager receiving the response sends a deactivation
> request for the corresponding session. This error can occur if NETIDs are
> coded incorrectly on any NETWORK statements in CDRM definitions. See z/OS
> Communications Server: SNA Resource Definition Reference
> <
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2FSSLTBW_2.1.0%2Fcom.ibm.zos.v2r1.istrdr0%2Ftoc.htm&data=05%7C01%7Csmetz3%40gmu.edu%7Cc2cff1a5dd2644cc757a08dac31ad74d%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638036817292038506%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6M

Re: GTTERM assistance

2022-11-10 Thread Brian Chapman
Normal processing is for the user to enter a logon string and for
Unformatted System Services (or the TN3270 equivalent to USS) to convert it
to SNA.

Shmuel,

It should be this scenario. The address space issues the SETLOGON macro
with the LOGON parameter which addresses a logon exit routine. I then issue
'LOGON APPLID=A70PORTC' in my emulator, the logon exit routine is invoked,
posts the dispatcher ECB, and eventually the PORTDSPI program is invoked to
establish the session.

I issued a D NET,ID= command to inquire about the status of the opened ACB.
Here is the output.

*06.53.32 SYSC NET   IST097I DISPLAY
ACCEPTED*

*06.53.32 SYSC NET   IST075I NAME = SCA.A70PORTC, TYPE = DYNAMIC
APPL*

*IST486I STATUS= ACTIV, DESIRED STATE=
ACTIV *

*IST1447I REGISTRATION TYPE =
NETSRVR*

*IST1629I MODSRCH =
NEVER*

*IST977I MDLTAB=***NA***
ASLTAB=***NA*** *

*IST861I MODETAB=SCAMODE USSTAB=***NA***
LOGTAB=***NA*** *

*IST934I DLOGMOD=***NA*** USS
LANGTAB=***NA***   *

*IST1632I VPACING =  7
 *

*IST1938I APPC =
NO  *

*IST597I CAPABILITY-PLU ENABLED  ,SLU ENABLED  ,SESSION LIMIT
NONE   *

*IST231I APPL MAJOR NODE = MODLCICS
   *

*IST1425I DEFINED USING MODEL
A70?*  *

*IST654I I/O TRACE = OFF, BUFFER TRACE =
OFF *

*IST1500I STATE TRACE =
OFF  *

*IST271I JOBNAME = TS00JY3N, STEPNAME = ***NA***, DSPNAME =
ISTD98B2 *

*IST1050I MAXIMUM COMPRESSION LEVEL - INPUT = 0, OUTPUT =
0  *

*IST1633I ASRCVLM =
100  *

*IST1634I DATA SPACE USAGE: CURRENT = 0 MAXIMUM =
0  *

*IST2436I DSMONITR =
NO  *

*IST171I ACTIVE SESSIONS = 00, SESSION REQUESTS =
00 *

*IST314I END
   *


Thank you,

Brian Chapman


On Thu, Nov 10, 2022 at 7:34 AM Seymour J Metz  wrote:

> Normal processing is for the user to enter a logon string and for
> Unformatted System Services (or the TN3270 equivalent to USS) to convert it
> to SNA. That process determines a BIND image. If, instead, your application
> initiates the session then your application is responsible for providing
> the BIND image.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Brian Chapman [bchapma...@gmail.com]
> Sent: Wednesday, November 9, 2022 2:59 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: GTTERM assistance
>
> Thanks everyone. I went back to my session initialization process and
> reviewed my logic for the OPNDST macro. Originally, I did not use the AAREA
> or AAREALN parameters on this macro. I added these parameters and set the
> NIBNDAR accordingly, but now I'm getting a 084E sense code.
>
> *09.04.47 JOB21339  +PRT103E VTAM OPNDST request failed for netname
> SACTV017. Return = 0004 Sense = 084E.*
>
> I reviewed the documentation for this sense code. It seems that VTAM is
> expecting certain bind fields to be populated, but I'm not sure which
> fields.
>
> Sense code 084E
>
> Session parameters not valid—PRI: A positive response to an activation
> request (for example, BIND) was received and was changed to a negative
> response because session parameters that were not valid were carried in the
> response. The services manager receiving the response sends a deactivation
> request for the corresponding session. This error can occur if NETIDs are
> coded incorrectly on any NETWORK statements in CDRM definitions. See z/OS
> Communications Server: SNA Resource Definition Reference
> <
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2FSSLTBW_2.1.0%2Fcom.ibm.zos.v2r1.istrdr0%2Ftoc.htm&data=05%7C01%7Csmetz3%40gmu.edu%7C799f7d19d4604778f6fd08dac28d008e%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638036208101949747%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pPIC%2B4ngPB8PQcj%2FelTSyfKCH3KdwJXAStf%2FHw988Bo%3D&reserved=0>
> for
> more information.
> Sense code 084E - IBM Documentation
> <
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.1.0%3Ftopic%3Dreject-sense-code-084e&data=05%7C01%7Csmetz3%40gmu.edu%7C799f7d19d4604778f6fd08dac2

Re: GTTERM assistance

2022-11-10 Thread Seymour J Metz
Normal processing is for the user to enter a logon string and for Unformatted 
System Services (or the TN3270 equivalent to USS) to convert it to SNA. That 
process determines a BIND image. If, instead, your application initiates the 
session then your application is responsible for providing the BIND image.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Brian Chapman [bchapma...@gmail.com]
Sent: Wednesday, November 9, 2022 2:59 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

Thanks everyone. I went back to my session initialization process and
reviewed my logic for the OPNDST macro. Originally, I did not use the AAREA
or AAREALN parameters on this macro. I added these parameters and set the
NIBNDAR accordingly, but now I'm getting a 084E sense code.

*09.04.47 JOB21339  +PRT103E VTAM OPNDST request failed for netname
SACTV017. Return = 0004 Sense = 084E.*

I reviewed the documentation for this sense code. It seems that VTAM is
expecting certain bind fields to be populated, but I'm not sure which
fields.

Sense code 084E

Session parameters not valid—PRI: A positive response to an activation
request (for example, BIND) was received and was changed to a negative
response because session parameters that were not valid were carried in the
response. The services manager receiving the response sends a deactivation
request for the corresponding session. This error can occur if NETIDs are
coded incorrectly on any NETWORK statements in CDRM definitions. See z/OS
Communications Server: SNA Resource Definition Reference
<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2FSSLTBW_2.1.0%2Fcom.ibm.zos.v2r1.istrdr0%2Ftoc.htm&data=05%7C01%7Csmetz3%40gmu.edu%7C799f7d19d4604778f6fd08dac28d008e%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638036208101949747%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pPIC%2B4ngPB8PQcj%2FelTSyfKCH3KdwJXAStf%2FHw988Bo%3D&reserved=0>
 for
more information.
Sense code 084E - IBM Documentation
<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.1.0%3Ftopic%3Dreject-sense-code-084e&data=05%7C01%7Csmetz3%40gmu.edu%7C799f7d19d4604778f6fd08dac28d008e%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638036208101949747%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=C7Jlf5PGavawBtwbmdlLghj%2FaiHhmNVta1qHXBAGdE8%3D&reserved=0>

I also reviewed Table 2 on this page, BIND image and response - IBM
Documentation
<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.4.0%3Ftopic%3Dsessions-bind-image-response&data=05%7C01%7Csmetz3%40gmu.edu%7C799f7d19d4604778f6fd08dac28d008e%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638036208101949747%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3d94LqTcK8pE7AWEsKdF2sb5M%2FvQ6R9EXZ0lfO7%2B%2FE0%3D&reserved=0>,
and most of the fields that I thought to update are listed as 'VTAM ignores
or overrides application program's setting.'

Here is the program that's establishing the session. It acquires the user
control blocks necessary for terminal based tasks, and then executes the
OPNDST macro. Again, any assistance would be greatly appreciated.

**-**
** PROGRAM : PORTDSPI  **
** AUTHOR  : BRIAN CHAPMAN **
** WRITTEN ON  : 23 AUGUST 2017**
** MODIFIED ON :   **
** ASM OPTIONS : RENT,REUS AMODE=31 RMODE=31 AC=0  **
** DESCRIPTION : TASK INITIALIZATION ROUTINE   **
** : THIS PROGRAM BUILDS THE INITIAL TASK RELATED  **
** : CONTROL BLOCKS FOR A NEW TASK TO BE DISPATCHED.   **
**-**
** *
* REGEQU   *
**  *
* COPY  PORTKERN   *
* COPY  PORTDMH*
* COPY  TASKANCH   *
* COPY  SESSVTAM   *
* COPY  SESSSOKT   *
** *
* EJECT *

Re: GTTERM assistance (really 3270 VTAM application?)

2022-11-10 Thread Brian Chapman
Michael,

Are you saying that sense code 084E is only applicable for LU6.2? I receive
the same sense code on my emulator when I attempt a logon to the opened ACB.

You have 3 R6's?:

DMHREG   EQU   R6
VTAMREG  EQU   R6
 LRR6,R1   LOAD DYNAMIC SESSION
 LAR8,INITVTAM LOAD INIT MODEL
 LHI   R9,INITVTAL LOAD INIT MODEL LENGTH
 MVCL  R6,R8   COPY INIT MODEL SESSION

I'm totally lost on your register usage and which using's are in effect.

DMHREG is only in effect for the small section of code before the DROP
instruction. I could have used the VTAMREG equate in the MVCL section, but
I wanted to be sure that it utilized an even-odd pair. In this case it
would have, but I like the flexibility of changing my equate assignments if
necessary.



Thank you,

Brian Chapman


On Thu, Nov 10, 2022 at 3:03 AM Michael Stein  wrote:

> > Sense code 084E - IBM Documentation
> > 
>
> That's for LU6.2.  What are your terminals, I thought they were 3270s?
>
> https://www.ibm.com/docs/en/search/3270?scope=SSLTBW_2.4.0&tag=istprg0
>
> https://www.ibm.com/docs/en/zos/2.4.0?topic=system-types-3270-terminals
>
> Types of 3270 terminals
>
> The following types of 3270 terminals are directly supported by VTAM®
> in its domain:
>
> SNA 3270 terminals:
>
> Local (PU type 2)
>
> 3270 terminal attaches to a PU type 2 cluster controller, which
> in turn attaches to the VTAM host processor by a System/370
> channel. Example: 3278 Display Station on 3274-1A Control Unit.
>
> Remote SDLC (PU type 2)
>
> 3270 terminal attaches to a PU type 2 cluster controller, which
> in turn attaches by an SDLC link to a communication controller
> containing an NCP, or directly to a processor through a communication
> adapter. Example: 3278 Display Station on 3276 Control Unit.
>
> Remote SDLC (PU type 1)
>
> 3270 terminal attaches to a PU type 1 cluster controller, which
> in turn attaches by an SDLC link to a communication controller
> containing NCP, or directly to a processor through a communication
> adapter. Examples: 3288 Line Printer on 3271-12 Control Unit or a
> 3767 terminal.
>
> Non-SNA 3270 terminals:
>
> Local
>
> 3270 terminal attaches to a non-SNA cluster controller, which in turn
> attaches to the VTAM host processor by a System/370 channel. Example:
> 3277 Display Station on 3272 Control Unit. A 3270 terminal attached
> to a 4331 Display/Printer adapter also presents this appearance.
>
> Remote BSC
>
> 3270 terminal attaches to a non-SNA cluster controller, which in turn
> attaches by a BSC link to a communication controller containing NCP,
> or directly to a processor through a communication adapter. Example:
> 3286 Printer on 3271-2 Control Unit.
>
> In addition, VTAM supports sessions between application programs in the
> VTAM host processor and 3270 terminals in another domain in which each
> cross-domain terminal provides the appearance of one of the types of
> 3270s listed in the preceding discussion.
>
> You have 3 R6's?:
>
> DMHREG   EQU   R6
> VTAMREG  EQU   R6
>  LRR6,R1   LOAD DYNAMIC SESSION
>  LAR8,INITVTAM LOAD INIT MODEL
>  LHI   R9,INITVTAL LOAD INIT MODEL LENGTH
>  MVCL  R6,R8   COPY INIT MODEL SESSION
>
> I'm totally lost on your register usage and which using's are in effect.
>
> --
> 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: GTTERM assistance (really 3270 VTAM application?)

2022-11-10 Thread Michael Stein
> Sense code 084E - IBM Documentation
> 

That's for LU6.2.  What are your terminals, I thought they were 3270s?

https://www.ibm.com/docs/en/search/3270?scope=SSLTBW_2.4.0&tag=istprg0

https://www.ibm.com/docs/en/zos/2.4.0?topic=system-types-3270-terminals

Types of 3270 terminals

The following types of 3270 terminals are directly supported by VTAM®
in its domain:

SNA 3270 terminals:
 
Local (PU type 2)

3270 terminal attaches to a PU type 2 cluster controller, which
in turn attaches to the VTAM host processor by a System/370
channel. Example: 3278 Display Station on 3274-1A Control Unit.

Remote SDLC (PU type 2)

3270 terminal attaches to a PU type 2 cluster controller, which
in turn attaches by an SDLC link to a communication controller
containing an NCP, or directly to a processor through a communication
adapter. Example: 3278 Display Station on 3276 Control Unit.

Remote SDLC (PU type 1)

3270 terminal attaches to a PU type 1 cluster controller, which
in turn attaches by an SDLC link to a communication controller
containing NCP, or directly to a processor through a communication
adapter. Examples: 3288 Line Printer on 3271-12 Control Unit or a
3767 terminal.

Non-SNA 3270 terminals:
 
Local

3270 terminal attaches to a non-SNA cluster controller, which in turn
attaches to the VTAM host processor by a System/370 channel. Example:
3277 Display Station on 3272 Control Unit. A 3270 terminal attached
to a 4331 Display/Printer adapter also presents this appearance.

Remote BSC

3270 terminal attaches to a non-SNA cluster controller, which in turn
attaches by a BSC link to a communication controller containing NCP,
or directly to a processor through a communication adapter. Example:
3286 Printer on 3271-2 Control Unit.

In addition, VTAM supports sessions between application programs in the
VTAM host processor and 3270 terminals in another domain in which each
cross-domain terminal provides the appearance of one of the types of
3270s listed in the preceding discussion.

You have 3 R6's?:

DMHREG   EQU   R6 
VTAMREG  EQU   R6
 LRR6,R1   LOAD DYNAMIC SESSION  
 LAR8,INITVTAM LOAD INIT MODEL   
 LHI   R9,INITVTAL LOAD INIT MODEL LENGTH 
 MVCL  R6,R8   COPY INIT MODEL SESSION 

I'm totally lost on your register usage and which using's are in effect.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GTTERM assistance

2022-11-09 Thread Seymour J Metz
The TN3270 server is the SLU.


From: IBM Mainframe Discussion List  on behalf of 
Brian Chapman 
Sent: Wednesday, November 9, 2022 3:14 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

I should also add another comment.

I was hoping I could just leave the bind area empty and let the SLU (the
user's emulator is the SLU in this scenario, right?) populate the bind
image with whatever it sends.



Thank you,

Brian Chapman


On Wed, Nov 9, 2022 at 2:59 PM Brian Chapman  wrote:

>
> Thanks everyone. I went back to my session initialization process and
> reviewed my logic for the OPNDST macro. Originally, I did not use the AAREA
> or AAREALN parameters on this macro. I added these parameters and set the
> NIBNDAR accordingly, but now I'm getting a 084E sense code.
>
> *09.04.47 JOB21339  +PRT103E VTAM OPNDST request failed for netname
> SACTV017. Return = 0004 Sense = 084E.*
>
> I reviewed the documentation for this sense code. It seems that VTAM is
> expecting certain bind fields to be populated, but I'm not sure which
> fields.
>
> Sense code 084E
>
> Session parameters not valid—PRI: A positive response to an activation
> request (for example, BIND) was received and was changed to a negative
> response because session parameters that were not valid were carried in the
> response. The services manager receiving the response sends a deactivation
> request for the corresponding session. This error can occur if NETIDs are
> coded incorrectly on any NETWORK statements in CDRM definitions. See z/OS
> Communications Server: SNA Resource Definition Reference
> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2FSSLTBW_2.1.0%2Fcom.ibm.zos.v2r1.istrdr0%2Ftoc.htm&data=05%7C01%7Csmetz3%40gmu.edu%7C23ee04746b73415976fb08dac28f1a42%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638036217121599520%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Zp1RsmGjzh%2FKMVPzO9kbyYwAYx%2FaHkeOPOKMFWH62Dg%3D&reserved=0>
>  for
> more information.
> Sense code 084E - IBM Documentation
> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.1.0%3Ftopic%3Dreject-sense-code-084e&data=05%7C01%7Csmetz3%40gmu.edu%7C23ee04746b73415976fb08dac28f1a42%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638036217121599520%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0z5mulCk9vhntWWYrQtbZxhx5ZWYQ3g%2FT%2F9w1rAbK34%3D&reserved=0>
>
> I also reviewed Table 2 on this page, BIND image and response - IBM
> Documentation
> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fdocs%2Fen%2Fzos%2F2.4.0%3Ftopic%3Dsessions-bind-image-response&data=05%7C01%7Csmetz3%40gmu.edu%7C23ee04746b73415976fb08dac28f1a42%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C638036217121599520%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZJ0Y8ICwfi2qPviQSM9wKx%2B79zxX%2B3PfzlC0A7J9DSQ%3D&reserved=0>,
> and most of the fields that I thought to update are listed as 'VTAM
> ignores or overrides application program's setting.'
>
> Here is the program that's establishing the session. It acquires the user
> control blocks necessary for terminal based tasks, and then executes the
> OPNDST macro. Again, any assistance would be greatly appreciated.
>
> **-**
> ** PROGRAM : PORTDSPI  **
> ** AUTHOR  : BRIAN CHAPMAN **
> ** WRITTEN ON  : 23 AUGUST 2017**
> ** MODIFIED ON :   **
> ** ASM OPTIONS : RENT,REUS AMODE=31 RMODE=31 AC=0  **
> ** DESCRIPTION : TASK INITIALIZATION ROUTINE   **
> ** : THIS PROGRAM BUILDS THE INITIAL TASK RELATED  **
> ** : CONTROL BLOCKS FOR A NEW TASK TO BE DISPATCHED.   **
> **-**
> ** *
> * REGEQU   *
> **  *
> * COPY  PORTKERN   *
> * COPY  PORTDMH*
> * COPY  TASKANCH   *
> * COPY  SESSVTAM   

Re: GTTERM assistance

2022-11-09 Thread Brian Chapman
I should also add another comment.

I was hoping I could just leave the bind area empty and let the SLU (the
user's emulator is the SLU in this scenario, right?) populate the bind
image with whatever it sends.



Thank you,

Brian Chapman


On Wed, Nov 9, 2022 at 2:59 PM Brian Chapman  wrote:

>
> Thanks everyone. I went back to my session initialization process and
> reviewed my logic for the OPNDST macro. Originally, I did not use the AAREA
> or AAREALN parameters on this macro. I added these parameters and set the
> NIBNDAR accordingly, but now I'm getting a 084E sense code.
>
> *09.04.47 JOB21339  +PRT103E VTAM OPNDST request failed for netname
> SACTV017. Return = 0004 Sense = 084E.*
>
> I reviewed the documentation for this sense code. It seems that VTAM is
> expecting certain bind fields to be populated, but I'm not sure which
> fields.
>
> Sense code 084E
>
> Session parameters not valid—PRI: A positive response to an activation
> request (for example, BIND) was received and was changed to a negative
> response because session parameters that were not valid were carried in the
> response. The services manager receiving the response sends a deactivation
> request for the corresponding session. This error can occur if NETIDs are
> coded incorrectly on any NETWORK statements in CDRM definitions. See z/OS
> Communications Server: SNA Resource Definition Reference
>  
> for
> more information.
> Sense code 084E - IBM Documentation
> 
>
> I also reviewed Table 2 on this page, BIND image and response - IBM
> Documentation
> ,
> and most of the fields that I thought to update are listed as 'VTAM
> ignores or overrides application program's setting.'
>
> Here is the program that's establishing the session. It acquires the user
> control blocks necessary for terminal based tasks, and then executes the
> OPNDST macro. Again, any assistance would be greatly appreciated.
>
> **-**
> ** PROGRAM : PORTDSPI  **
> ** AUTHOR  : BRIAN CHAPMAN **
> ** WRITTEN ON  : 23 AUGUST 2017**
> ** MODIFIED ON :   **
> ** ASM OPTIONS : RENT,REUS AMODE=31 RMODE=31 AC=0  **
> ** DESCRIPTION : TASK INITIALIZATION ROUTINE   **
> ** : THIS PROGRAM BUILDS THE INITIAL TASK RELATED  **
> ** : CONTROL BLOCKS FOR A NEW TASK TO BE DISPATCHED.   **
> **-**
> ** *
> * REGEQU   *
> **  *
> * COPY  PORTKERN   *
> * COPY  PORTDMH*
> * COPY  TASKANCH   *
> * COPY  SESSVTAM   *
> * COPY  SESSSOKT   *
> ** *
> * EJECT *
> * IFGRPL AM=VTAM  *
> * EJECT*
> * ISTUSFBC   *
> * EJECT  *
> * IFGACB AM=VTAM *
> * EJECT  *
> * IFGEXLST AM=VTAM*
> * EJECT  *
> * ISTDNIB*
> * ISTDBIND   *
> **   *
> *WORKAREA DSECT  *
> *WORKNAME DSCL8  *
> *SAVEAREA DS18F  *
> *SAVERC   DSF *
> *SAVEANCH DSF*
> **   *
> *VTAMRETC DSF *
> ***
> *CALLPLST DS0F*
> *CALLPRM1 DSF *
> *CALLPRM2 DSF *
> *CALLPRM3 DSF *
> *CALLPRM4 DSF *
> *CALLPRM5 DSF *
> **   *
> *WORKLEN  EQU   *-WORKAREA*
> **   *
> *WORKREG  EQU   R3   *
> *KERNREG  EQU   R4   *
> *ANCHREG  EQU   R5*
> *DMHREG   EQU   R6  *
> *VTAMREG  EQU   R6  *
> *RPLREG   EQU   R7  *
> *NIBREG   EQU   R8  *
> *ACBREG   EQU   R9  *
> **  *
> *PORTDSPI CSECT *
> *

Re: GTTERM assistance

2022-11-09 Thread Brian Chapman
Thanks everyone. I went back to my session initialization process and
reviewed my logic for the OPNDST macro. Originally, I did not use the AAREA
or AAREALN parameters on this macro. I added these parameters and set the
NIBNDAR accordingly, but now I'm getting a 084E sense code.

*09.04.47 JOB21339  +PRT103E VTAM OPNDST request failed for netname
SACTV017. Return = 0004 Sense = 084E.*

I reviewed the documentation for this sense code. It seems that VTAM is
expecting certain bind fields to be populated, but I'm not sure which
fields.

Sense code 084E

Session parameters not valid—PRI: A positive response to an activation
request (for example, BIND) was received and was changed to a negative
response because session parameters that were not valid were carried in the
response. The services manager receiving the response sends a deactivation
request for the corresponding session. This error can occur if NETIDs are
coded incorrectly on any NETWORK statements in CDRM definitions. See z/OS
Communications Server: SNA Resource Definition Reference
 for
more information.
Sense code 084E - IBM Documentation


I also reviewed Table 2 on this page, BIND image and response - IBM
Documentation
,
and most of the fields that I thought to update are listed as 'VTAM ignores
or overrides application program's setting.'

Here is the program that's establishing the session. It acquires the user
control blocks necessary for terminal based tasks, and then executes the
OPNDST macro. Again, any assistance would be greatly appreciated.

**-**
** PROGRAM : PORTDSPI  **
** AUTHOR  : BRIAN CHAPMAN **
** WRITTEN ON  : 23 AUGUST 2017**
** MODIFIED ON :   **
** ASM OPTIONS : RENT,REUS AMODE=31 RMODE=31 AC=0  **
** DESCRIPTION : TASK INITIALIZATION ROUTINE   **
** : THIS PROGRAM BUILDS THE INITIAL TASK RELATED  **
** : CONTROL BLOCKS FOR A NEW TASK TO BE DISPATCHED.   **
**-**
** *
* REGEQU   *
**  *
* COPY  PORTKERN   *
* COPY  PORTDMH*
* COPY  TASKANCH   *
* COPY  SESSVTAM   *
* COPY  SESSSOKT   *
** *
* EJECT *
* IFGRPL AM=VTAM  *
* EJECT*
* ISTUSFBC   *
* EJECT  *
* IFGACB AM=VTAM *
* EJECT  *
* IFGEXLST AM=VTAM*
* EJECT  *
* ISTDNIB*
* ISTDBIND   *
**   *
*WORKAREA DSECT  *
*WORKNAME DSCL8  *
*SAVEAREA DS18F  *
*SAVERC   DSF *
*SAVEANCH DSF*
**   *
*VTAMRETC DSF *
***
*CALLPLST DS0F*
*CALLPRM1 DSF *
*CALLPRM2 DSF *
*CALLPRM3 DSF *
*CALLPRM4 DSF *
*CALLPRM5 DSF *
**   *
*WORKLEN  EQU   *-WORKAREA*
**   *
*WORKREG  EQU   R3   *
*KERNREG  EQU   R4   *
*ANCHREG  EQU   R5*
*DMHREG   EQU   R6  *
*VTAMREG  EQU   R6  *
*RPLREG   EQU   R7  *
*NIBREG   EQU   R8  *
*ACBREG   EQU   R9  *
**  *
*PORTDSPI CSECT *
*PORTDSPI AMODE 31  *
*PORTDSPI RMODE ANY *
* STM   R14,R12,12(R13) SAVE REGISTERS  *
* LRR12,R15 ESTABLISH BASE  *
* USING PORTDSPI,R12SET ADDRESSIBILITY  *
* B START   *
**  *
* DCCL9'PORTDSPI' 

Re: GTTERM assistance

2022-11-02 Thread Tony Harminc
On Wed, 2 Nov 2022 at 04:44, Seymour J Metz  wrote:

Doesn't Communications Controller for Linux (CCL) still support SDLC and
> SNA on the pipe?
>

I don't follow this area closely, but my impression was that CCL was long
gone. Is it still available?


> In practical terms, I'm confident that most SNA traffic these days is
> TN3270.
>

Agreed.

Is anybody still using APPC?
>

There are apps out there, but surely nobody is developing or enhancing
them.

Tony H.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GTTERM assistance

2022-11-02 Thread Seymour J Metz
It needs a section on native VTAM, although TSO full screen is more common.


From: IBM Mainframe Discussion List  on behalf of 
Brian Chapman 
Sent: Wednesday, November 2, 2022 9:23 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

All,

Thank you for the feedback.

I've been following the excellent write up by Greg Price (3270 Extended
Data Stream (prycroft6.com.au)
<https://secure-web.cisco.com/1WZEPCCYXKqBdsucqeNnsw8E-h41UZ2VAZi5lBj-4WWkpLJorRuT9M1qsFuB1_yt4DG9kVNASgvB4Rzwb2SGOycKSBNlrxpW3e81gXmOCSDI3nFxaLYe52NOP7LU7Y3VqRFXoiE2Ctsthj70zJFc7o5rZ2SW-qt32kVYqKU9LPI0mnX3YC94PzO1ZahfpqqfyrWEdCUeP-3puGW324nhDDWbj4S209ehG4ta3FnS9zZ3zPCThcdjA_Fzwxbsi3uGEhNSUDrcX2HMB2nvB944APk8xdtMGEeJrOlhqh5to_u1RxtZjlU_lRaXj5cE1--MX2CknfCJSM9OfBoP6-iUp-YFDoHJVzKj-ppF0s8DmVXNgYWzWr2GHph5JGAE9grDGsapoR2xO-3XFv6MJfyzINyUT3PW83b0TZL6fAD0PDaRNpjy1OVbFBkM7NR_iqIIq/https%3A%2F%2Fwww.prycroft6.com.au%2Fmisc%2F3270eds.html>)
 for understanding 3270
datasteams. This write up and Tommy Sprinkle's (3270 Data Stream
Programming (tommysprinkle.com)
<http://secure-web.cisco.com/16Bl2u5_kSIC1iVeoCGORYvnwPeXAoUKN76AQl53wy-_Q9_ZFdeVtrUH4NEFzwyApskfJCk664mU9rLloocl3fRI3gA6btmQqEcfKGzyG1egL0bU4tp2ELquUECG5Gpx-78FhvmaqQSe6klzMGZWkHAZVli7P0N5hFY2G-Pp_9n1_P5A8CTfAbahRvxRw0gDPIdCLeKuECN60JDqwJItzMRiyIrRttvp9sv_2pvw95RM7UOp6AuglqUrO9GDYYUaNkBO9oaMuHDS_DSuWDmzfa9KAZbvvQ99wZNM0wza2tFkfmJzdiNxOj9cmhnRkLKrZ5RfU0Pqp6UdzbInAgZGr9L4NFZIxUC-qn4U3Wnix9temytzuXnTTe1xit2ERyznBcjJ5qNPFpkHDThJGKMfo-1uK94HfUHnJwjSqD7ca6HAq_WfwhGpoMvLD5XE10cDO/http%3A%2F%2Fwww.tommysprinkle.com%2Fmvs%2FP3270%2Fstart.htm>)
 are a gold mine.

I was following his coding example for checking if the terminal accepts a
Query, but I mistakenly overlooked the fact that this is only for TSO. I
planned to add the GTTERM early in the process of establishing the VTAM
terminal to determine if Read Partition - Query is acceptable. For a VTAM
application, is it safe to assume that all connecting terminals accept Read
Partition - Query?

1. Check for a 3270 terminal:
 GTSIZE   Determine terminal screen dimensions
 LTR   R0,R0  3270 screen?
 BZLINEMODE   No, cannot do full screen 3270 I/O

2. Check if Read Partition (Query) is allowed:
 GTTERM PRMSZE=PRIMSIZE,ALTSZE=ALTSIZE,ATTRIB=TERMATTR
 LTR   R15,R15Did GTTERM work?
 BZNOQUERYNo, VTAM must be pre-ACF/VTAM
 TMTERMATTR+3,X'01'   Query allowed?
 BNO   NOQUERYNo
   ...
   ...
PRIMSIZE DCAL1(0,0)   Primary screen size
ALTSIZE  DCAL1(0,0)   Alternate screen size
TERMATTR DCF'0'   Terminal attributes

3. Activate VTAM full screen mode without input data stream editing:
 STFSMODE ON,NOEDIT=YES

4. Issue Read Partition (Query):
 LAR1,RESETAID
 LAR0,L'RESETAID
 ICM   R1,8,=X'0B'Load TPUT FULLSCR,WAIT,HOLD flags
 TPUT  (1),(0),R  Reset the Attention IDentifier
 TPG   QUERY,L'QUERY,NOEDIT,WAIT   Issue Query
   ...
   ...
RESETAID DCX'27F5C3'  Escape, Erase/Write, WCC for resetting AID and
MDTs
QUERYDCX'F3000501FF02'Read Partition structured field



Thank you,

Brian Chapman


On Wed, Nov 2, 2022 at 4:36 AM Seymour J Metz  wrote:

> Yes, GTTERM is TSO only. For a direct VTAM application, you need to send a
> Read Partition - Query and parse the query reply.
>
> AFAIK, GTTERM is one of the macros where you don't need to initialize the
> parameter list.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Michael Stein [m...@zlvfc.com]
> Sent: Tuesday, November 1, 2022 7:27 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: GTTERM assistance
>
> > Any assistance would be greatly appreciated.
> >
> > I am working on a SNA interface for a batch framework. This is mostly
> just
> > a massive learning exercise that will likely never be utilized, but I
> have
> > learned SO much while working on this project (currently 6 years in the
> > making).
>
> I'm confused about what this is part of.  Is this a TSO program
> or something else (saying SNA? VTAM APPL?).
>
> I ask that because as far as I know GTTERM is TSO only.  But
> you got return code 0 so perhaps the GTTERM is being issued
> from TSO.
>
> > The address space accepts terminals with MOD2 terminals and everything
>
> "Terminals" plural.  A TSO session with more than one?
>
> > I check register 15 after the SVC, and it is zero. But the SVC parameter
> > val

Re: GTTERM assistance

2022-11-02 Thread Michael Stein
On Wed, Nov 02, 2022 at 09:23:59AM -0400, Brian Chapman wrote:
> I was following his coding example for checking if the terminal accepts a
> Query, but I mistakenly overlooked the fact that this is only for TSO. I
> planned to add the GTTERM early in the process of establishing the VTAM
> terminal to determine if Read Partition - Query is acceptable. For a VTAM
> application, is it safe to assume that all connecting terminals accept Read
> Partition - Query?

In my mind, it's not "correct" to assume that all 3270s accept Read
Partition Query, however it might be that today (as opposed to the
decades ago when I was doing this).  On the other hand, there still
might be some TCP/IP connected 3270 simulator programs which don't
support Read Partition Query.

You haven't shown any VTAM code, but there should be some part of the
original VTAM session establishment which provides information on 
the other end of the VTAM session to be.  In addition to checking
that the LU (VTAM logical unit) connecting is some sort of 3270, there is
somewhere a bit which says if it supports Read Partition Query.

This information about the device at a minimum includes the primary
and secondary screen sizes, as well as a bit about Read Partition Query
support.

You've seen the following sections?:

https://www.ibm.com/docs/en/zos/2.4.0?topic=programming-establishing-terminating-sessions-logical-units

https://www.ibm.com/docs/en/zos/2.4.0?topic=units-establishing-parameters-sessions

This might also help:

https://www.ibm.com/docs/en/zos/2.1.0?topic=programming-3270-information-display-system

https://www.ibm.com/docs/en/zos/2.1.0?topic=terminals-session-parameter
. mentions query support

So you need to keep in mind that there are different protocol levels
in your communications:

 a. VTAM (accepting a connection fron a LU, setting or accepting
VTAM session parameters, sending/receiving data etc)

 b. device commands (not 3270 data stream).  For a local 3270 this
was the CCW opcode, for remote the codes were different:
write local x'01', remote x'F1'
VTAM uses the remote codes (and translates them to local if
the target is a local 3270).

 c. the 3270 data stream

I believe all the following are TSO macros..
>  GTSIZE   Determine terminal screen dimensions
>  GTTERM PRMSZE=PRIMSIZE,ALTSZE=ALTSIZE,ATTRIB=TERMATTR
>  STFSMODE ON,NOEDIT=YES

Once you are connected to the 3270, the Read Partition is just
"normal" (from VTAM's point of view) communication with the LU/device.

> 4. Issue Read Partition (Query):

But TPUT and TPG are TSO macros.

>  TPUT  (1),(0),R  Reset the Attention IDentifier
>  TPG   QUERY,L'QUERY,NOEDIT,WAIT   Issue Query

The escape indicates that the next byte is the device command (pseudo-CCW
opcode) so this is level (b) info while the following bytes are 3270 data
stream.  The F5 below after the 27 is the remote code for erase write.
VTAM will translate this if needed for local 3270s.

> RESETAID DCX'27F5C3'  Escape, Erase/Write, WCC for resetting AID and
> MDTs

Hum... perhaps the F3 is level (b) and the escape isn't needed?

> QUERYDCX'F3000501FF02'Read Partition structured field

PS: All the mention of TSO/VTAM has lost the idea that there was
at one time TSO/TCAM which also supported the TSO 3270 related
macro calls.  So those are really TSO macros and VTAM just happens
how the connection is made inside of TSO.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GTTERM assistance

2022-11-02 Thread Seymour J Metz
There is a bit in the BIND image that tells you whether extended data streams 
are supported. You can also get the primary and alternate screen size there if 
those are the only data that you need. I pretty much always want to use 
extended highlighting, so BIND isn't enough for me.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Brian Chapman [bchapma...@gmail.com]
Sent: Wednesday, November 2, 2022 9:23 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

All,

Thank you for the feedback.

I've been following the excellent write up by Greg Price (3270 Extended
Data Stream (prycroft6.com.au)
<https://secure-web.cisco.com/1WZEPCCYXKqBdsucqeNnsw8E-h41UZ2VAZi5lBj-4WWkpLJorRuT9M1qsFuB1_yt4DG9kVNASgvB4Rzwb2SGOycKSBNlrxpW3e81gXmOCSDI3nFxaLYe52NOP7LU7Y3VqRFXoiE2Ctsthj70zJFc7o5rZ2SW-qt32kVYqKU9LPI0mnX3YC94PzO1ZahfpqqfyrWEdCUeP-3puGW324nhDDWbj4S209ehG4ta3FnS9zZ3zPCThcdjA_Fzwxbsi3uGEhNSUDrcX2HMB2nvB944APk8xdtMGEeJrOlhqh5to_u1RxtZjlU_lRaXj5cE1--MX2CknfCJSM9OfBoP6-iUp-YFDoHJVzKj-ppF0s8DmVXNgYWzWr2GHph5JGAE9grDGsapoR2xO-3XFv6MJfyzINyUT3PW83b0TZL6fAD0PDaRNpjy1OVbFBkM7NR_iqIIq/https%3A%2F%2Fwww.prycroft6.com.au%2Fmisc%2F3270eds.html>)
 for understanding 3270
datasteams. This write up and Tommy Sprinkle's (3270 Data Stream
Programming (tommysprinkle.com)
<http://secure-web.cisco.com/16Bl2u5_kSIC1iVeoCGORYvnwPeXAoUKN76AQl53wy-_Q9_ZFdeVtrUH4NEFzwyApskfJCk664mU9rLloocl3fRI3gA6btmQqEcfKGzyG1egL0bU4tp2ELquUECG5Gpx-78FhvmaqQSe6klzMGZWkHAZVli7P0N5hFY2G-Pp_9n1_P5A8CTfAbahRvxRw0gDPIdCLeKuECN60JDqwJItzMRiyIrRttvp9sv_2pvw95RM7UOp6AuglqUrO9GDYYUaNkBO9oaMuHDS_DSuWDmzfa9KAZbvvQ99wZNM0wza2tFkfmJzdiNxOj9cmhnRkLKrZ5RfU0Pqp6UdzbInAgZGr9L4NFZIxUC-qn4U3Wnix9temytzuXnTTe1xit2ERyznBcjJ5qNPFpkHDThJGKMfo-1uK94HfUHnJwjSqD7ca6HAq_WfwhGpoMvLD5XE10cDO/http%3A%2F%2Fwww.tommysprinkle.com%2Fmvs%2FP3270%2Fstart.htm>)
 are a gold mine.

I was following his coding example for checking if the terminal accepts a
Query, but I mistakenly overlooked the fact that this is only for TSO. I
planned to add the GTTERM early in the process of establishing the VTAM
terminal to determine if Read Partition - Query is acceptable. For a VTAM
application, is it safe to assume that all connecting terminals accept Read
Partition - Query?

1. Check for a 3270 terminal:
 GTSIZE   Determine terminal screen dimensions
 LTR   R0,R0  3270 screen?
 BZLINEMODE   No, cannot do full screen 3270 I/O

2. Check if Read Partition (Query) is allowed:
 GTTERM PRMSZE=PRIMSIZE,ALTSZE=ALTSIZE,ATTRIB=TERMATTR
 LTR   R15,R15Did GTTERM work?
 BZNOQUERYNo, VTAM must be pre-ACF/VTAM
 TMTERMATTR+3,X'01'   Query allowed?
 BNO   NOQUERYNo
   ...
   ...
PRIMSIZE DCAL1(0,0)   Primary screen size
ALTSIZE  DCAL1(0,0)   Alternate screen size
TERMATTR DCF'0'   Terminal attributes

3. Activate VTAM full screen mode without input data stream editing:
 STFSMODE ON,NOEDIT=YES

4. Issue Read Partition (Query):
 LAR1,RESETAID
 LAR0,L'RESETAID
 ICM   R1,8,=X'0B'Load TPUT FULLSCR,WAIT,HOLD flags
 TPUT  (1),(0),R  Reset the Attention IDentifier
 TPG   QUERY,L'QUERY,NOEDIT,WAIT   Issue Query
   ...
   ...
RESETAID DCX'27F5C3'  Escape, Erase/Write, WCC for resetting AID and
MDTs
QUERYDCX'F3000501FF02'Read Partition structured field



Thank you,

Brian Chapman


On Wed, Nov 2, 2022 at 4:36 AM Seymour J Metz  wrote:

> Yes, GTTERM is TSO only. For a direct VTAM application, you need to send a
> Read Partition - Query and parse the query reply.
>
> AFAIK, GTTERM is one of the macros where you don't need to initialize the
> parameter list.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Michael Stein [m...@zlvfc.com]
> Sent: Tuesday, November 1, 2022 7:27 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: GTTERM assistance
>
> > Any assistance would be greatly appreciated.
> >
> > I am working on a SNA interface for a batch framework. This is mostly
> just
> > a massive learning exercise that will likely never be utilized, but I
> have
> > learned SO much while working on this project (currently 6 years in the
> > making).
>
> I'm confused about what this is part of.  Is this a TSO program
> or something else (saying SNA? VTAM APPL?).
>
> I ask that because as far as I know GTTERM is TSO only.  But
> you got re

Re: GTTERM assistance

2022-11-02 Thread Brian Chapman
Michael,

I really appreciate the critiques. I agree that some of my comments are
misleading and need to be updated. I like the suggestion for MVCL.

I was not aware of the potential hazards with register 2. Using register 2
as a save register when acquiring a DSA is very common in all of my code.
I'll be more judicious with my usage of this register.

For the register equates, I've found myself reassigning register usages
often and having equates like "SESSREG  EQU   R5" have made that really
easy in the past. If I find that register 6 aligns more easily with a
particular instruction (MVCL for example), then updating the equate for
SESSREG is much easier than performing CHANGE ALL commands and
inadvertently changing a field name, literal, or some other string.



Thank you,

Brian Chapman


On Tue, Nov 1, 2022 at 7:28 PM Michael Stein  wrote:

> > Any assistance would be greatly appreciated.
> >
> > I am working on a SNA interface for a batch framework. This is mostly
> just
> > a massive learning exercise that will likely never be utilized, but I
> have
> > learned SO much while working on this project (currently 6 years in the
> > making).
>
> I'm confused about what this is part of.  Is this a TSO program
> or something else (saying SNA? VTAM APPL?).
>
> I ask that because as far as I know GTTERM is TSO only.  But
> you got return code 0 so perhaps the GTTERM is being issued
> from TSO.
>
> > The address space accepts terminals with MOD2 terminals and everything
>
> "Terminals" plural.  A TSO session with more than one?
>
> > I check register 15 after the SVC, and it is zero. But the SVC parameter
> > values are still zero.
>
> When using MF=L and MF=E macro forms, usually it's necessary to copy
> an MF=L list into the DSECT area before using the MF=E form...
>
> This is not true for all macros, but perhaps for GTTERM.
>
> So somewhere in the source should be a GTTERM MF=L and then it should
> be copied (MVC) into GTTLIST in the DSECT before issuing the GTTERM
> MF=(E,GTTLIST).  I'd suggest looking at the full expansion of the GTTERM
> (both MF=L and MF=E) to see if this is needed.
>
> Other points:
>
> > WORKREG  EQU   R3
> > SESSREG  EQU   R5
>
> I've only used 16 registers R0->R15.  You can do what you want but I'd
> be very careful that additional register equates didn't result in some
> duplicate register usage.  I saw some IBM source which had:
>
>   R15   EQU  R9
>
> I'd prefer better comments, or when trivial, no comment.   As an
> example:
>
> >  LRR2,R1   SAVE REGISTER 2
>
> This appears backwards, saving R1 in R2.   Also R2 is a problematic
> register as some hardware instructions alter it without it being specified
> (TRT translate and test at least).  I'd be careful when I used it and
> treat it as a bit less temporary than R0, R1, R14, R15.
>
> More comments on comments (& register usage):
>
> >  LRR6,WORKREG  LOAD REGISTER
> >  LAR8,0SET DUMMY FROM ADDRESS
> >  XRR9,R9   SET PADDING TO LOW VALUES
> >  MVCL  R6,R8   INITIALIZE AREA
>
> I'd suggest something like:
>
>LRR6,WORKREG  @ workarea to clear, len in R7
>SRR15,R15
>MVCL  R6,R14
>
> The contents of R14 don't matter for the MVCL as the length in R15 is zero.
>
> --
> 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: GTTERM assistance

2022-11-02 Thread Brian Chapman
All,

Thank you for the feedback.

I've been following the excellent write up by Greg Price (3270 Extended
Data Stream (prycroft6.com.au)
<https://www.prycroft6.com.au/misc/3270eds.html>) for understanding 3270
datasteams. This write up and Tommy Sprinkle's (3270 Data Stream
Programming (tommysprinkle.com)
<http://www.tommysprinkle.com/mvs/P3270/start.htm>) are a gold mine.

I was following his coding example for checking if the terminal accepts a
Query, but I mistakenly overlooked the fact that this is only for TSO. I
planned to add the GTTERM early in the process of establishing the VTAM
terminal to determine if Read Partition - Query is acceptable. For a VTAM
application, is it safe to assume that all connecting terminals accept Read
Partition - Query?

1. Check for a 3270 terminal:
 GTSIZE   Determine terminal screen dimensions
 LTR   R0,R0  3270 screen?
 BZLINEMODE   No, cannot do full screen 3270 I/O

2. Check if Read Partition (Query) is allowed:
 GTTERM PRMSZE=PRIMSIZE,ALTSZE=ALTSIZE,ATTRIB=TERMATTR
 LTR   R15,R15Did GTTERM work?
 BZNOQUERYNo, VTAM must be pre-ACF/VTAM
 TMTERMATTR+3,X'01'   Query allowed?
 BNO   NOQUERYNo
   ...
   ...
PRIMSIZE DCAL1(0,0)   Primary screen size
ALTSIZE  DCAL1(0,0)   Alternate screen size
TERMATTR DCF'0'   Terminal attributes

3. Activate VTAM full screen mode without input data stream editing:
 STFSMODE ON,NOEDIT=YES

4. Issue Read Partition (Query):
 LAR1,RESETAID
 LAR0,L'RESETAID
 ICM   R1,8,=X'0B'Load TPUT FULLSCR,WAIT,HOLD flags
 TPUT  (1),(0),R  Reset the Attention IDentifier
 TPG   QUERY,L'QUERY,NOEDIT,WAIT   Issue Query
   ...
   ...
RESETAID DCX'27F5C3'  Escape, Erase/Write, WCC for resetting AID and
MDTs
QUERYDCX'F3000501FF02'Read Partition structured field



Thank you,

Brian Chapman


On Wed, Nov 2, 2022 at 4:36 AM Seymour J Metz  wrote:

> Yes, GTTERM is TSO only. For a direct VTAM application, you need to send a
> Read Partition - Query and parse the query reply.
>
> AFAIK, GTTERM is one of the macros where you don't need to initialize the
> parameter list.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Michael Stein [m...@zlvfc.com]
> Sent: Tuesday, November 1, 2022 7:27 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: GTTERM assistance
>
> > Any assistance would be greatly appreciated.
> >
> > I am working on a SNA interface for a batch framework. This is mostly
> just
> > a massive learning exercise that will likely never be utilized, but I
> have
> > learned SO much while working on this project (currently 6 years in the
> > making).
>
> I'm confused about what this is part of.  Is this a TSO program
> or something else (saying SNA? VTAM APPL?).
>
> I ask that because as far as I know GTTERM is TSO only.  But
> you got return code 0 so perhaps the GTTERM is being issued
> from TSO.
>
> > The address space accepts terminals with MOD2 terminals and everything
>
> "Terminals" plural.  A TSO session with more than one?
>
> > I check register 15 after the SVC, and it is zero. But the SVC parameter
> > values are still zero.
>
> When using MF=L and MF=E macro forms, usually it's necessary to copy
> an MF=L list into the DSECT area before using the MF=E form...
>
> This is not true for all macros, but perhaps for GTTERM.
>
> So somewhere in the source should be a GTTERM MF=L and then it should
> be copied (MVC) into GTTLIST in the DSECT before issuing the GTTERM
> MF=(E,GTTLIST).  I'd suggest looking at the full expansion of the GTTERM
> (both MF=L and MF=E) to see if this is needed.
>
> Other points:
>
> > WORKREG  EQU   R3
> > SESSREG  EQU   R5
>
> I've only used 16 registers R0->R15.  You can do what you want but I'd
> be very careful that additional register equates didn't result in some
> duplicate register usage.  I saw some IBM source which had:
>
>   R15   EQU  R9
>
> I'd prefer better comments, or when trivial, no comment.   As an
> example:
>
> >  LRR2,R1   SAVE REGISTER 2
>
> This appears backwards, saving R1 in R2.   Also R2 is a problematic
> register as some hardware instructions alter it without it being specified
> (TRT translate and test at least).  I'd be careful w

Re: GTTERM assistance

2022-11-02 Thread Seymour J Metz
Doesn't Communications Controller for Linux (CCL) still support SDLC and SNA on 
the pipe?

In practical terms, I'm confident that most SNA traffic these days is TN3270.

Is anybody still using APPC?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Tony Harminc [t...@harminc.net]
Sent: Tuesday, November 1, 2022 10:56 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

On Tue, 1 Nov 2022 at 17:16, Colin Paice  wrote:

> I think I read that IBM was going to drop SNA in a future release os z/OS ,
> if so would it be wise to continue down this path?
>

I can't imagine that IBM is going to "drop SNA" any time soon - too much
still depends on it, and it's hard to see the upside. They might as well
drop JCL or TSO. Anything that talks to a 3270 (except local non-SNA
channel-attached) is using SNA. What they could do is to write a purely TCP
version of TCAS, and slide it in the same way TSO/VTAM existed in parallel
with TSO TCAM 40-ish years ago. But this would still have a bunch of the
SNA attributes to it.

What has for all practical purposes already been dropped is "SNA on the
wire". There are no more Front End Processors (3705 and descendants) , and
I haven't seen an actual LAN Channel Station (LCS) or even an emulation of
one for many years. I think the newer (OSA) interfaces till support SNA,
but is anyone using them that way?

So how does SNA traffic get onto a network in the modern world? I think the
only practical answer is encapsulating it in IP traffic, and I think that
means Enterprise Extender and such.

In any case, there's nothing wrong with writing SNA programs for fun. The
OP said nothing about marketing it.

Tony H.

--
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: GTTERM assistance

2022-11-02 Thread Seymour J Metz
Yes, GTTERM is TSO only. For a direct VTAM application, you need to send a Read 
Partition - Query and parse the query reply.

AFAIK, GTTERM is one of the macros where you don't need to initialize the 
parameter list.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Michael Stein [m...@zlvfc.com]
Sent: Tuesday, November 1, 2022 7:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

> Any assistance would be greatly appreciated.
>
> I am working on a SNA interface for a batch framework. This is mostly just
> a massive learning exercise that will likely never be utilized, but I have
> learned SO much while working on this project (currently 6 years in the
> making).

I'm confused about what this is part of.  Is this a TSO program
or something else (saying SNA? VTAM APPL?).

I ask that because as far as I know GTTERM is TSO only.  But
you got return code 0 so perhaps the GTTERM is being issued
from TSO.

> The address space accepts terminals with MOD2 terminals and everything

"Terminals" plural.  A TSO session with more than one?

> I check register 15 after the SVC, and it is zero. But the SVC parameter
> values are still zero.

When using MF=L and MF=E macro forms, usually it's necessary to copy
an MF=L list into the DSECT area before using the MF=E form...

This is not true for all macros, but perhaps for GTTERM.

So somewhere in the source should be a GTTERM MF=L and then it should
be copied (MVC) into GTTLIST in the DSECT before issuing the GTTERM
MF=(E,GTTLIST).  I'd suggest looking at the full expansion of the GTTERM
(both MF=L and MF=E) to see if this is needed.

Other points:

> WORKREG  EQU   R3
> SESSREG  EQU   R5

I've only used 16 registers R0->R15.  You can do what you want but I'd
be very careful that additional register equates didn't result in some
duplicate register usage.  I saw some IBM source which had:

  R15   EQU  R9

I'd prefer better comments, or when trivial, no comment.   As an
example:

>  LRR2,R1   SAVE REGISTER 2

This appears backwards, saving R1 in R2.   Also R2 is a problematic
register as some hardware instructions alter it without it being specified
(TRT translate and test at least).  I'd be careful when I used it and
treat it as a bit less temporary than R0, R1, R14, R15.

More comments on comments (& register usage):

>  LRR6,WORKREG  LOAD REGISTER
>  LAR8,0SET DUMMY FROM ADDRESS
>  XRR9,R9   SET PADDING TO LOW VALUES
>  MVCL  R6,R8   INITIALIZE AREA

I'd suggest something like:

   LRR6,WORKREG  @ workarea to clear, len in R7
   SRR15,R15
   MVCL  R6,R14

The contents of R14 don't matter for the MVCL as the length in R15 is zero.

--
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: GTTERM assistance

2022-11-01 Thread Tony Harminc
On Tue, 1 Nov 2022 at 17:16, Colin Paice  wrote:

> I think I read that IBM was going to drop SNA in a future release os z/OS ,
> if so would it be wise to continue down this path?
>

I can't imagine that IBM is going to "drop SNA" any time soon - too much
still depends on it, and it's hard to see the upside. They might as well
drop JCL or TSO. Anything that talks to a 3270 (except local non-SNA
channel-attached) is using SNA. What they could do is to write a purely TCP
version of TCAS, and slide it in the same way TSO/VTAM existed in parallel
with TSO TCAM 40-ish years ago. But this would still have a bunch of the
SNA attributes to it.

What has for all practical purposes already been dropped is "SNA on the
wire". There are no more Front End Processors (3705 and descendants) , and
I haven't seen an actual LAN Channel Station (LCS) or even an emulation of
one for many years. I think the newer (OSA) interfaces till support SNA,
but is anyone using them that way?

So how does SNA traffic get onto a network in the modern world? I think the
only practical answer is encapsulating it in IP traffic, and I think that
means Enterprise Extender and such.

In any case, there's nothing wrong with writing SNA programs for fun. The
OP said nothing about marketing it.

Tony H.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GTTERM assistance

2022-11-01 Thread Michael Stein
> Any assistance would be greatly appreciated.
>
> I am working on a SNA interface for a batch framework. This is mostly just
> a massive learning exercise that will likely never be utilized, but I have
> learned SO much while working on this project (currently 6 years in the
> making).

I'm confused about what this is part of.  Is this a TSO program
or something else (saying SNA? VTAM APPL?).  

I ask that because as far as I know GTTERM is TSO only.  But
you got return code 0 so perhaps the GTTERM is being issued
from TSO.
 
> The address space accepts terminals with MOD2 terminals and everything

"Terminals" plural.  A TSO session with more than one?

> I check register 15 after the SVC, and it is zero. But the SVC parameter
> values are still zero.

When using MF=L and MF=E macro forms, usually it's necessary to copy
an MF=L list into the DSECT area before using the MF=E form...

This is not true for all macros, but perhaps for GTTERM.

So somewhere in the source should be a GTTERM MF=L and then it should
be copied (MVC) into GTTLIST in the DSECT before issuing the GTTERM
MF=(E,GTTLIST).  I'd suggest looking at the full expansion of the GTTERM
(both MF=L and MF=E) to see if this is needed.

Other points:

> WORKREG  EQU   R3
> SESSREG  EQU   R5

I've only used 16 registers R0->R15.  You can do what you want but I'd
be very careful that additional register equates didn't result in some
duplicate register usage.  I saw some IBM source which had:

  R15   EQU  R9

I'd prefer better comments, or when trivial, no comment.   As an
example:

>  LRR2,R1   SAVE REGISTER 2

This appears backwards, saving R1 in R2.   Also R2 is a problematic
register as some hardware instructions alter it without it being specified
(TRT translate and test at least).  I'd be careful when I used it and
treat it as a bit less temporary than R0, R1, R14, R15.

More comments on comments (& register usage):
 
>  LRR6,WORKREG  LOAD REGISTER
>  LAR8,0SET DUMMY FROM ADDRESS
>  XRR9,R9   SET PADDING TO LOW VALUES
>  MVCL  R6,R8   INITIALIZE AREA

I'd suggest something like:

   LRR6,WORKREG  @ workarea to clear, len in R7
   SRR15,R15
   MVCL  R6,R14

The contents of R14 don't matter for the MVCL as the length in R15 is zero.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: GTTERM assistance

2022-11-01 Thread Seymour J Metz
Te MF=L would be in place of the other MF=L, not in addition to it.

Also, check the forward chain.


From: IBM Mainframe Discussion List  on behalf of 
Brian Chapman 
Sent: Tuesday, November 1, 2022 4:13 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: GTTERM assistance

Shmuel,

All I see is that your save area code is bad

Thanks. I'm not sure how that 64 bit save area code got stuck in there.

What's in SESSBLK?

SESSBLK is just a user control block with the 'session' variables. The
values for SESSPRI and SESSALT and SESSATTR are still zero after the SVC
call.

I would probably have written something like

GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
   MF=(E,GTTLIST)

for documentation, but AFAIK that wouldn't affect the length.

I'm not sure I understand. I get an assembly error with "Previously defined
symbol' when I re-use the GTTLIST label.


Thank you,

Brian Chapman


On Tue, Nov 1, 2022 at 3:42 PM Seymour J Metz  wrote:

> All I see is that your save area code is bad, but that shouldn't affect
> the returned values from GTTERM. What's in SESSBLK?
>
> I would probably have written something like
>
> GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
>MF=(E,GTTLIST)
>
> for documentation, but AFAIK that wouldn't affect the length.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Brian Chapman [bchapma...@gmail.com]
> Sent: Tuesday, November 1, 2022 2:45 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: GTTERM assistance
>
> Hello all,
>
> Any assistance would be greatly appreciated.
>
> I am working on a SNA interface for a batch framework. This is mostly just
> a massive learning exercise that will likely never be utilized, but I have
> learned SO much while working on this project (currently 6 years in the
> making).
>
> The address space accepts terminals with MOD2 terminals and everything
> displays great. However, I would like to support larger terminal sizes. My
> first hurdle is GTTERM. I understand that my program should be in  RMODE24
> and AMODE24. The program is assembled with AMODE 31, but performs a SAM24
> and SAM31 before and after the SVC call. The dynamic storage area for the
> program is also acquired below the line.
>
> I check register 15 after the SVC, and it is zero. But the SVC parameter
> values are still zero.
>
> Here is my source:
>
>  REGEQU
>  COPY  SESSBLK
> *
> WORKAREA DSECT
> WORKNAME DSCL8
> SAVEAREA DS18F
> SAVERC   DSF
> SAVEPARM DSF
> *
> GTTLIST  GTTERM MF=L
> *
> WORKLEN  EQU   *-WORKAREA
> *
> WORKREG  EQU   R3
> SESSREG  EQU   R5
> *
> PORTTC04 CSECT
> PORTTC04 AMODE 31
> PORTTC04 RMODE 24
>  STM   R14,R12,12(R13) SAVE REGISTERS
>  LRR12,R15 ESTABLISH BASE
>  USING PORTTC04,R12*
>  B START
> *
>  DCCL9'PORTTC04'
>  DCCL9'&SYSDATC'
>  DCCL5'&SYSTIME'
> *
> STARTDS0H
>  LRR2,R1   SAVE REGISTER 2
>  LHI   R7,WORKLEN  LOAD WORK AREA LENGTH
>  GETMAIN RU,LV=(R7),LOC=BELOW
>  LRWORKREG,R1  *
>  USING WORKAREA,WORKREGSET ADDRESSIBILITY
> *
>  LRR6,WORKREG  LOAD REGISTER
>  LAR8,0SET DUMMY FROM ADDRESS
>  XRR9,R9   SET PADDING TO LOW VALUES
>  MVCL  R6,R8   INITIALIZE AREA
> *
>  STR13,SAVEAREA+4  CHAIN CALLER'S SAVEAREA ADDRESS
>  LAR13,SAVEAREA
>  STR13,SAVEAREA+8  SAVE CURRENT SAVEAREA ADDRESS
>  MVC   SAVEAREA(4),=CL4'F4SA'
>  MVC   WORKNAME(8),=CL8'PORTTC04'
> *
> GETLINK  DS0H
>  LRR1,R2   RESTORE REGISTER 2
>  STR1,SAVEPARM
>  LTSESSREG,4(R1)   GET ADDRESS OF SESSBLK
>  BZBADLINK NO LINKAGE PASSED
>  USING SESSBLK,SESSREG SET ADDRESSIBILITY
> *
> GETTERM  DS0H
>  SAM24
> *
>  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
>MF=(E,GTTLIST)
> *
>  ABEND 91,DUMP
>  SAM31
> *
>  LTR   R15,R15
>  BNZ   BADRC
> *
>  STR15,SESSATTR+4
> *
>  B   

Re: GTTERM assistance

2022-11-01 Thread Colin Paice
I think I read that IBM was going to drop SNA in a future release os z/OS ,
if so would it be wise to continue down this path?
Colin

On Tue, 1 Nov 2022 at 20:14, Brian Chapman  wrote:

> Shmuel,
>
> All I see is that your save area code is bad
>
> Thanks. I'm not sure how that 64 bit save area code got stuck in there.
>
> What's in SESSBLK?
>
> SESSBLK is just a user control block with the 'session' variables. The
> values for SESSPRI and SESSALT and SESSATTR are still zero after the SVC
> call.
>
> I would probably have written something like
>
> GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
>MF=(E,GTTLIST)
>
> for documentation, but AFAIK that wouldn't affect the length.
>
> I'm not sure I understand. I get an assembly error with "Previously defined
> symbol' when I re-use the GTTLIST label.
>
>
> Thank you,
>
> Brian Chapman
>
>
> On Tue, Nov 1, 2022 at 3:42 PM Seymour J Metz  wrote:
>
> > All I see is that your save area code is bad, but that shouldn't affect
> > the returned values from GTTERM. What's in SESSBLK?
> >
> > I would probably have written something like
> >
> > GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
> >MF=(E,GTTLIST)
> >
> > for documentation, but AFAIK that wouldn't affect the length.
> >
> >
> > --
> > Shmuel (Seymour J.) Metz
> > http://mason.gmu.edu/~smetz3
> >
> > ________
> > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> > of Brian Chapman [bchapma...@gmail.com]
> > Sent: Tuesday, November 1, 2022 2:45 PM
> > To: IBM-MAIN@LISTSERV.UA.EDU
> > Subject: GTTERM assistance
> >
> > Hello all,
> >
> > Any assistance would be greatly appreciated.
> >
> > I am working on a SNA interface for a batch framework. This is mostly
> just
> > a massive learning exercise that will likely never be utilized, but I
> have
> > learned SO much while working on this project (currently 6 years in the
> > making).
> >
> > The address space accepts terminals with MOD2 terminals and everything
> > displays great. However, I would like to support larger terminal sizes.
> My
> > first hurdle is GTTERM. I understand that my program should be in
> RMODE24
> > and AMODE24. The program is assembled with AMODE 31, but performs a SAM24
> > and SAM31 before and after the SVC call. The dynamic storage area for the
> > program is also acquired below the line.
> >
> > I check register 15 after the SVC, and it is zero. But the SVC parameter
> > values are still zero.
> >
> > Here is my source:
> >
> >  REGEQU
> >  COPY  SESSBLK
> > *
> > WORKAREA DSECT
> > WORKNAME DSCL8
> > SAVEAREA DS18F
> > SAVERC   DSF
> > SAVEPARM DSF
> > *
> > GTTLIST  GTTERM MF=L
> > *
> > WORKLEN  EQU   *-WORKAREA
> > *
> > WORKREG  EQU   R3
> > SESSREG  EQU   R5
> > *
> > PORTTC04 CSECT
> > PORTTC04 AMODE 31
> > PORTTC04 RMODE 24
> >  STM   R14,R12,12(R13) SAVE REGISTERS
> >  LRR12,R15 ESTABLISH BASE
> >  USING PORTTC04,R12*
> >  B START
> > *
> >  DCCL9'PORTTC04'
> >  DCCL9'&SYSDATC'
> >  DCCL5'&SYSTIME'
> > *
> > STARTDS0H
> >  LRR2,R1   SAVE REGISTER 2
> >  LHI   R7,WORKLEN  LOAD WORK AREA LENGTH
> >  GETMAIN RU,LV=(R7),LOC=BELOW
> >  LRWORKREG,R1  *
> >  USING WORKAREA,WORKREGSET ADDRESSIBILITY
> > *
> >  LRR6,WORKREG  LOAD REGISTER
> >  LAR8,0SET DUMMY FROM ADDRESS
> >  XRR9,R9   SET PADDING TO LOW VALUES
> >  MVCL  R6,R8   INITIALIZE AREA
> > *
> >  STR13,SAVEAREA+4  CHAIN CALLER'S SAVEAREA ADDRESS
> >  LAR13,SAVEAREA
> >  STR13,SAVEAREA+8  SAVE CURRENT SAVEAREA ADDRESS
> >  MVC   SAVEAREA(4),=CL4'F4SA'
> >  MVC   WORKNAME(8),=CL8'PORTTC04'
> > *
> > GETLINK  DS0H
> >  LRR1,R2   RESTORE REGISTER 2
> >  STR1,SAVEPARM
> >  LTSESSREG,4(R1)   GET ADD

Re: GTTERM assistance

2022-11-01 Thread Brian Chapman
Shmuel,

All I see is that your save area code is bad

Thanks. I'm not sure how that 64 bit save area code got stuck in there.

What's in SESSBLK?

SESSBLK is just a user control block with the 'session' variables. The
values for SESSPRI and SESSALT and SESSATTR are still zero after the SVC
call.

I would probably have written something like

GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
   MF=(E,GTTLIST)

for documentation, but AFAIK that wouldn't affect the length.

I'm not sure I understand. I get an assembly error with "Previously defined
symbol' when I re-use the GTTLIST label.


Thank you,

Brian Chapman


On Tue, Nov 1, 2022 at 3:42 PM Seymour J Metz  wrote:

> All I see is that your save area code is bad, but that shouldn't affect
> the returned values from GTTERM. What's in SESSBLK?
>
> I would probably have written something like
>
> GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
>MF=(E,GTTLIST)
>
> for documentation, but AFAIK that wouldn't affect the length.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Brian Chapman [bchapma...@gmail.com]
> Sent: Tuesday, November 1, 2022 2:45 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: GTTERM assistance
>
> Hello all,
>
> Any assistance would be greatly appreciated.
>
> I am working on a SNA interface for a batch framework. This is mostly just
> a massive learning exercise that will likely never be utilized, but I have
> learned SO much while working on this project (currently 6 years in the
> making).
>
> The address space accepts terminals with MOD2 terminals and everything
> displays great. However, I would like to support larger terminal sizes. My
> first hurdle is GTTERM. I understand that my program should be in  RMODE24
> and AMODE24. The program is assembled with AMODE 31, but performs a SAM24
> and SAM31 before and after the SVC call. The dynamic storage area for the
> program is also acquired below the line.
>
> I check register 15 after the SVC, and it is zero. But the SVC parameter
> values are still zero.
>
> Here is my source:
>
>  REGEQU
>  COPY  SESSBLK
> *
> WORKAREA DSECT
> WORKNAME DSCL8
> SAVEAREA DS18F
> SAVERC   DSF
> SAVEPARM DSF
> *
> GTTLIST  GTTERM MF=L
> *
> WORKLEN  EQU   *-WORKAREA
> *
> WORKREG  EQU   R3
> SESSREG  EQU   R5
> *
> PORTTC04 CSECT
> PORTTC04 AMODE 31
> PORTTC04 RMODE 24
>  STM   R14,R12,12(R13) SAVE REGISTERS
>  LRR12,R15 ESTABLISH BASE
>  USING PORTTC04,R12*
>  B START
> *
>  DCCL9'PORTTC04'
>  DCCL9'&SYSDATC'
>  DCCL5'&SYSTIME'
> *
> STARTDS0H
>  LRR2,R1   SAVE REGISTER 2
>  LHI   R7,WORKLEN  LOAD WORK AREA LENGTH
>  GETMAIN RU,LV=(R7),LOC=BELOW
>  LRWORKREG,R1  *
>  USING WORKAREA,WORKREGSET ADDRESSIBILITY
> *
>  LRR6,WORKREG  LOAD REGISTER
>  LAR8,0SET DUMMY FROM ADDRESS
>  XRR9,R9   SET PADDING TO LOW VALUES
>  MVCL  R6,R8   INITIALIZE AREA
> *
>  STR13,SAVEAREA+4  CHAIN CALLER'S SAVEAREA ADDRESS
>  LAR13,SAVEAREA
>  STR13,SAVEAREA+8  SAVE CURRENT SAVEAREA ADDRESS
>  MVC   SAVEAREA(4),=CL4'F4SA'
>  MVC   WORKNAME(8),=CL8'PORTTC04'
> *
> GETLINK  DS0H
>  LRR1,R2   RESTORE REGISTER 2
>  STR1,SAVEPARM
>  LTSESSREG,4(R1)   GET ADDRESS OF SESSBLK
>  BZBADLINK NO LINKAGE PASSED
>  USING SESSBLK,SESSREG SET ADDRESSIBILITY
> *
> GETTERM  DS0H
>  SAM24
> *
>  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
>MF=(E,GTTLIST)
> *
>  ABEND 91,DUMP
>  SAM31
> *
>  LTR   R15,R15
>  BNZ   BADRC
> *
>  STR15,SESSATTR+4
> *
>  B RETURN
> *
> BADRCDS0H
>  WTO   'PORTTC04 BAD GTTERM RC'
>  MVHI  SAVERC,16   SET BAD RETURN CODE
>  ABEND 98,DUMP
> *
> BADLINK  DS0H
>  WTO   'PORTTC04 INVALID LINKAGE PARAMETERS'
>  MVHI  SAVERC,16 

Re: GTTERM assistance

2022-11-01 Thread Seymour J Metz
All I see is that your save area code is bad, but that shouldn't affect the 
returned values from GTTERM. What's in SESSBLK? 

I would probably have written something like

GTTLIST  GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
   MF=(E,GTTLIST)

for documentation, but AFAIK that wouldn't affect the length.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Brian Chapman [bchapma...@gmail.com]
Sent: Tuesday, November 1, 2022 2:45 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: GTTERM assistance

Hello all,

Any assistance would be greatly appreciated.

I am working on a SNA interface for a batch framework. This is mostly just
a massive learning exercise that will likely never be utilized, but I have
learned SO much while working on this project (currently 6 years in the
making).

The address space accepts terminals with MOD2 terminals and everything
displays great. However, I would like to support larger terminal sizes. My
first hurdle is GTTERM. I understand that my program should be in  RMODE24
and AMODE24. The program is assembled with AMODE 31, but performs a SAM24
and SAM31 before and after the SVC call. The dynamic storage area for the
program is also acquired below the line.

I check register 15 after the SVC, and it is zero. But the SVC parameter
values are still zero.

Here is my source:

 REGEQU
 COPY  SESSBLK
*
WORKAREA DSECT
WORKNAME DSCL8
SAVEAREA DS18F
SAVERC   DSF
SAVEPARM DSF
*
GTTLIST  GTTERM MF=L
*
WORKLEN  EQU   *-WORKAREA
*
WORKREG  EQU   R3
SESSREG  EQU   R5
*
PORTTC04 CSECT
PORTTC04 AMODE 31
PORTTC04 RMODE 24
 STM   R14,R12,12(R13) SAVE REGISTERS
 LRR12,R15 ESTABLISH BASE
 USING PORTTC04,R12*
 B START
*
 DCCL9'PORTTC04'
 DCCL9'&SYSDATC'
 DCCL5'&SYSTIME'
*
STARTDS0H
 LRR2,R1   SAVE REGISTER 2
 LHI   R7,WORKLEN  LOAD WORK AREA LENGTH
 GETMAIN RU,LV=(R7),LOC=BELOW
 LRWORKREG,R1  *
 USING WORKAREA,WORKREGSET ADDRESSIBILITY
*
 LRR6,WORKREG  LOAD REGISTER
 LAR8,0SET DUMMY FROM ADDRESS
 XRR9,R9   SET PADDING TO LOW VALUES
 MVCL  R6,R8   INITIALIZE AREA
*
 STR13,SAVEAREA+4  CHAIN CALLER'S SAVEAREA ADDRESS
 LAR13,SAVEAREA
 STR13,SAVEAREA+8  SAVE CURRENT SAVEAREA ADDRESS
 MVC   SAVEAREA(4),=CL4'F4SA'
 MVC   WORKNAME(8),=CL8'PORTTC04'
*
GETLINK  DS0H
 LRR1,R2   RESTORE REGISTER 2
 STR1,SAVEPARM
 LTSESSREG,4(R1)   GET ADDRESS OF SESSBLK
 BZBADLINK NO LINKAGE PASSED
 USING SESSBLK,SESSREG SET ADDRESSIBILITY
*
GETTERM  DS0H
 SAM24
*
 GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
   MF=(E,GTTLIST)
*
 ABEND 91,DUMP
 SAM31
*
 LTR   R15,R15
 BNZ   BADRC
*
 STR15,SESSATTR+4
*
 B RETURN
*
BADRCDS0H
 WTO   'PORTTC04 BAD GTTERM RC'
 MVHI  SAVERC,16   SET BAD RETURN CODE
 ABEND 98,DUMP
*
BADLINK  DS0H
 WTO   'PORTTC04 INVALID LINKAGE PARAMETERS'
 MVHI  SAVERC,16   SET BAD RETURN CODE
 ABEND 99,DUMP
*
RETURN   DS0H
 L R13,SAVEAREA+4  RESTORE R13
 L R2,SAVERC   LOAD RC
*
 LHI   R0,WORKLEN  LOAD WORK AREA LENGTH
 FREEMAIN RU,LV=(R0),A=(WORKREG)
*
 LRR15,R2  LOAD RC FROM R2
 L R14,12(R13) RESTORE R14
 LMR0,R12,20(R13)  RESTORE R0-R12 (RETAIN R15)
 BRR14 RETURN TO CALLER
*
 LTORG
*
 END

I added the ABEND 91 instruction to produce a dump. Register 3 contains the
SVC plist.

The SESSBLK contains the SESSPRI, SESSALT, and SESSATTR fields (addressed
by register 5).

Here are the dump contents:

Program PORTTC04 issued an SVC 13 (ABEND) code U0091

at address _7A5C, offset B4 in Program PORTTC04



Registers when request issued.

0 _8000 1 _805B 2 _000943C8 3 _
0002CF48
4 _362BC048 5 _0002CBF0 6 _B5D08928 7
_B5D08A28
8 _ 9 _ A _40404040 B
_
C _800079A8 D _0002CF50 E _B5FA5C56 F
_


Last Instruction: SVC  13  ABEND

   Instruction has no operands



PSW when request issued: 078D1

GTTERM assistance

2022-11-01 Thread Brian Chapman
Hello all,

Any assistance would be greatly appreciated.

I am working on a SNA interface for a batch framework. This is mostly just
a massive learning exercise that will likely never be utilized, but I have
learned SO much while working on this project (currently 6 years in the
making).

The address space accepts terminals with MOD2 terminals and everything
displays great. However, I would like to support larger terminal sizes. My
first hurdle is GTTERM. I understand that my program should be in  RMODE24
and AMODE24. The program is assembled with AMODE 31, but performs a SAM24
and SAM31 before and after the SVC call. The dynamic storage area for the
program is also acquired below the line.

I check register 15 after the SVC, and it is zero. But the SVC parameter
values are still zero.

Here is my source:

 REGEQU
 COPY  SESSBLK
*
WORKAREA DSECT
WORKNAME DSCL8
SAVEAREA DS18F
SAVERC   DSF
SAVEPARM DSF
*
GTTLIST  GTTERM MF=L
*
WORKLEN  EQU   *-WORKAREA
*
WORKREG  EQU   R3
SESSREG  EQU   R5
*
PORTTC04 CSECT
PORTTC04 AMODE 31
PORTTC04 RMODE 24
 STM   R14,R12,12(R13) SAVE REGISTERS
 LRR12,R15 ESTABLISH BASE
 USING PORTTC04,R12*
 B START
*
 DCCL9'PORTTC04'
 DCCL9'&SYSDATC'
 DCCL5'&SYSTIME'
*
STARTDS0H
 LRR2,R1   SAVE REGISTER 2
 LHI   R7,WORKLEN  LOAD WORK AREA LENGTH
 GETMAIN RU,LV=(R7),LOC=BELOW
 LRWORKREG,R1  *
 USING WORKAREA,WORKREGSET ADDRESSIBILITY
*
 LRR6,WORKREG  LOAD REGISTER
 LAR8,0SET DUMMY FROM ADDRESS
 XRR9,R9   SET PADDING TO LOW VALUES
 MVCL  R6,R8   INITIALIZE AREA
*
 STR13,SAVEAREA+4  CHAIN CALLER'S SAVEAREA ADDRESS
 LAR13,SAVEAREA
 STR13,SAVEAREA+8  SAVE CURRENT SAVEAREA ADDRESS
 MVC   SAVEAREA(4),=CL4'F4SA'
 MVC   WORKNAME(8),=CL8'PORTTC04'
*
GETLINK  DS0H
 LRR1,R2   RESTORE REGISTER 2
 STR1,SAVEPARM
 LTSESSREG,4(R1)   GET ADDRESS OF SESSBLK
 BZBADLINK NO LINKAGE PASSED
 USING SESSBLK,SESSREG SET ADDRESSIBILITY
*
GETTERM  DS0H
 SAM24
*
 GTTERM PRMSZE=SESSPRI,ALTSZE=SESSALT,ATTRIB=SESSATTR, *
   MF=(E,GTTLIST)
*
 ABEND 91,DUMP
 SAM31
*
 LTR   R15,R15
 BNZ   BADRC
*
 STR15,SESSATTR+4
*
 B RETURN
*
BADRCDS0H
 WTO   'PORTTC04 BAD GTTERM RC'
 MVHI  SAVERC,16   SET BAD RETURN CODE
 ABEND 98,DUMP
*
BADLINK  DS0H
 WTO   'PORTTC04 INVALID LINKAGE PARAMETERS'
 MVHI  SAVERC,16   SET BAD RETURN CODE
 ABEND 99,DUMP
*
RETURN   DS0H
 L R13,SAVEAREA+4  RESTORE R13
 L R2,SAVERC   LOAD RC
*
 LHI   R0,WORKLEN  LOAD WORK AREA LENGTH
 FREEMAIN RU,LV=(R0),A=(WORKREG)
*
 LRR15,R2  LOAD RC FROM R2
 L R14,12(R13) RESTORE R14
 LMR0,R12,20(R13)  RESTORE R0-R12 (RETAIN R15)
 BRR14 RETURN TO CALLER
*
 LTORG
*
 END

I added the ABEND 91 instruction to produce a dump. Register 3 contains the
SVC plist.

The SESSBLK contains the SESSPRI, SESSALT, and SESSATTR fields (addressed
by register 5).

Here are the dump contents:

Program PORTTC04 issued an SVC 13 (ABEND) code U0091

at address _7A5C, offset B4 in Program PORTTC04



Registers when request issued.

0 _8000 1 _805B 2 _000943C8 3 _
0002CF48
4 _362BC048 5 _0002CBF0 6 _B5D08928 7
_B5D08A28
8 _ 9 _ A _40404040 B
_
C _800079A8 D _0002CF50 E _B5FA5C56 F
_


Last Instruction: SVC  13  ABEND

   Instruction has no operands



PSW when request issued: 078D1000 7A5E

   PER-Mask . . . . . . . . . . OFF

   DAT Mode . . . . . . . . . . ON

   I/O Mask . . . . . . . . . . ON

   External Mask. . . . . . . . ON

   PSW Key. . . . . . . . . . . 8

   EC Mode. . . . . . . . . . . ON

   Machine-Check Mask . . . . . ON

   Wait State . . . . . . . . . OFF

   Problem State. . . . . . . . ON

   Address Space Control. . . . Primary ASC Mode
   Condition Code . . . . . . . 1
   Program Mask . . . . . . . . 0
   Addressing Mode. . . . . . . 24 bit
   Instruction Address. . . . . 007A5E

The program's dynamic storage area:

Address  Offset from _0002C000Origin STORAGE 0001
0002CF48 000F48 D7D6D9E3 E3C3F0F4 C6F4E2C1 000945C0 *PORTTC04F4SA.. {* R3
0002CF58 000F58 0002CF50  0