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'' *
* DCCL5'' *
***
*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 (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=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=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