Thanks all for your suggestions. In the hope of helping a future Googler, here
is "How to Use GTTERM from an AMODE 31 Program." I don't claim this method is
novel or optimal, just that it works.
BTW, I am using the GTTERM now primarily for the other information it returns
like the IP address. I get the terminal name from ACEETRID.
I built a "model" GTTERM. This is assembled like a constant, not in the line of
executable code.
GTTERMmdl EQU *
GTTERM PRMSZE=(R2), TERMSIZE, mandatory +
TERMID=(R4) TERMWORK
BSM 0,R11 Return in 31-bit mode
GTTERMmdl_len EQU *-GTTERMmdl
The module already had a GETMAIN for a save area and other (small) reentrant
storage. I changed the GETMAIN to LOC=BELOW and added the following to the
reentrant storage:
DS 0H Align
GTTERMarea DS XL(GTTERMmdl_len) GTTERM moved here
TERMSIZE DS H GTTERM terminal size
TERMWORK DS CL39 GTTERM return area
In the executable code, I move the "model" GTTERM into the GETMAIN area and
BASSM to it
MVC GTTERMarea,GTTERMmdl
MVC TERMWORK(6),=C'CODEPG'
LA R2,TERMSIZE
LA R4,TERMWORK
LA R15,GTTERMarea
BASSM R11,R15
I have not done extensive testing but this does all seem to work.
Charles
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN