Use the GTTERM macro instruction to determine
the primary (default) and the alternate screen sizes for a 3270 display
terminal. Use the ERASE/WRITE command (X'F5') to erase the
screen, to set the screen size mode to primary mode, and optionally
to write data to the screen. Use the ERASE/WRITE ALTERNATE command
(X'7E') to erase the screen, to set the screen size mode
to the alternate mode, and optionally to write data to the screen. Figure 1 shows the format of the GTTERM macro instruction.
Figure 1. The GTTERM macro instruction symbol GTTERM PRMSZE=addr [,ALTSZE=addr] [,MF= {L }]
[ {(E,ctraddr) }]
[,ATTRIB=addr] [,TERMID=addr]
- PRMSZE=addr
- specifies the address of a 2-byte area into which GTTERM returns
the primary row value in the high-order byte and the primary column
value in the low-order byte.
- ALTSZE=addr
- specifies the address of a 2-byte area into which GTTERM returns
the alternate row value in the high-order byte and the alternate column
value in the low-order byte.
- ATTRIB=addr
- specifies the address of a 1-word field into which GTTERM returns
terminal attributes. The contents of this field are described below:
Byte |
Setting |
Meaning |
---|
0 |
xxxx xxxx |
Reserved. |
1 |
0... .... |
The terminal does not support double-byte character set (DBCS). |
1 |
1... .... |
The terminal supports DBCS. |
1 |
.000 0000 |
American English (default). |
1 |
.000 0001 |
American English. |
1 |
.001 0001 |
Katakana. |
2 |
xxxx .... |
Reserved. |
2 |
.... 00.. |
The ASCII-7 device code identifier. |
2 |
.... 01.. |
The ASCII-8 device code identifier. |
2 |
.... ..xx |
Reserved. |
3 |
1... .... |
This is a VTAM® TSB1. |
3 |
.1.. .... |
Break features are not allowed1. |
3 |
..1. .... |
The translate table is in use1. |
3 |
...1 .... |
The default translate table is in use1. |
3 |
.... 1... |
Display in full-screen mode1. |
3 |
.... .x.. |
Reserved. |
3 |
.... ..0. |
The device supports EBCDIC code. |
3 |
.... ..1. |
The device supports ASCII code. |
3 |
.... ...0 |
The Read Partition (Query) is not supported. |
3 |
.... ...1 |
The Read Partition (Query) is supported. |
1 These bits are returned
only for VTAM applications. |
- MF=L | (E,ctrl addr)
- indicates the form of the GTTERM macro instruction.
- L
- specifies the list form.
- (E,ctrl addr)
- specifies the execute form and the address of the list form.
- TERMID=addr
- addr specifies one of the following:
- 16-byte area into which GTTERM returns the terminal name in the
first eight bytes and the network ID in the second eight bytes.
- 39-byte area with CODEPG in the first six bytes, where GTTERM
will return the terminal name, the network ID, the IP address (IPv4
or IPv6), port number, and code page (CGCSGID) information.
- 52-byte area with IPADD6 in the first six bytes, where GTTERM
will return the IP address (IPv4 or IPv6), port number, and zone identifier
if requested.
- 310-byte area with DOMIP6 in the first six bytes, where GTTERM
will return the domain name, terminal name, IP address, port number,
and zone identifier if requested.
Tip: If CODEPAGE=YES is coded in the TSOKEY00 member
of SYS1.PARMLIB, TSO/VTAM will query the terminal during the logon
process to obtain the code page information. This enables the Display
Code Page function for the client.GTTERM returns the following
when addr is a 52-byte area with IPADD6 specified in the first 6 bytes:
Offset
Dec (Hex)
|
Type |
Length
in bytes
|
Description |
---|
0(0) |
Character |
8 |
Terminal name |
8(8) |
Character |
8 |
Network ID |
16(10) |
Character |
16
4
|
IPv6 address
IPv4 address
|
32(20) |
Character |
2 |
Port number in hex |
34(22) |
Character |
1
1... ....
.1.. ....
..1. ....
...1 1111
|
Flag byte
On - indicates IPv6 address at offset 16
On - indicates IPv4 address at offset 16
On - zone id truncated
Not used
|
35(23) |
Byte |
1 |
Length of zone id at offset 36 |
36(24) |
Character |
16 |
Zone id |
This is true for all TSO with Telnet sessions. GTTERM
clears the IP address and port number area if it was not a Telnet
session.
The user program can request the return
of domain name, IP address (IPv4 or IPv6) and port number for Telnet
sessions on GTTERM macro by specifying the keyword DOMIP6 in the first
six bytes of the terminal ID area.
IPADDR and DOMAIN in the
terminal id are deprecated (they are still valid but not suggested).
If you are using IPADDR in the terminal id, and the IP address for
the tn3270 client is an IPv6 address, you will receive X'FFFFFFFF' in
the IP address field that is returned.
In this case,
addr specifies
the address of a field at least 310 bytes in length. GTTERM returns
the information as follows:
Offset
dec (Hex)
|
Type |
Length
in bytes
|
Description |
---|
0(0) |
Character |
8 |
Terminal name |
8(8) |
Character |
8 |
Network ID |
16(10) |
Character |
16
4
|
IPv6 address
IPv4 address
|
32(20) |
Character |
2 |
Port number in hex |
34(22) |
Character |
1
1... ....
0... ....
.1.. ....
..1. ....
...1 ....
.... 1111
|
Flag byte 1
On - truncated domain name
Off - complete domain name
On - Indicates IPv6 address at offset 16
On - Indicates IPv4 address at offset 16
On - Indicates zone id truncated
Not used
|
35(23) |
Character |
1 |
Flag byte 2 (not used) |
36(24) |
Character |
2 |
Length of domain name |
38(26) |
Character |
255 |
Domain name |
293(126) |
Integer |
1 |
Length of zone id |
294(127) |
Character |
16 |
Zone id |
Note: The length of the zone id will be zero if the zone
id is not available.
This is true for all TSO with Telnet
sessions. GTTERM clears the IP address, port number, and domain name
area if it was not a Telnet session.
GTTERM returns the following when addr is a 39 byte
area with CODEPG specified in the first 6 bytes.
Offset Dec (Hex)
|
Type |
Length in Bytes |
Description |
---|
0 (0) |
Character |
8 |
Terminal name |
8 (8) |
Character |
8 |
Network ID |
16 (10) |
Character |
16
4
|
IPv6 address
IPv4 address
|
32(20) |
Character |
2 |
Port number in hex |
34(22) |
Character |
1 |
Flag byte |
|
1... .... |
On - indicates IPv6 |
|
|
address at offset 16 |
|
.1.. .... |
On - indicates IPv4 |
|
|
address at offset 16 |
|
..11 1111 |
Not used |
35 (23) |
Character |
2 |
Character Set |
37 (25) |
Character |
2 |
Code Page |
Note: The terminal or emulator sets the CGCSGID values.
Consult the vendor of the terminal or emulator regarding CGCSGID value
documentation. Also see the topic of the 3174 Character Set Reference (GA27-3831)
for common CGCSGID values.
If you use the list form of the GTTERM macro, the coded parameters
expand into the parameter list shown in Table 1.
Table 1. Parameter
list expansion for the list form of GTTERMOffset dec (Hex) |
Number of bytes |
Meaning |
---|
0(0) |
4 |
Address of halfword to receive primary screen
size. |
4(4) |
4 |
Address of halfword to receive alternate screen
size. |
8(8) |
4 |
Address of word to receive Device Query supported
flag. |
12(C) |
4 |
Address of one of following: - 16-byte field to receive terminal name
- 52-byte field to receive terminal name, IP address, port number,
and zone identifier is requested
- 39-byte field to receive the terminal name, network ID, IP address
(IPv4 or IPv6), port number, and code page (CGCSGID) information.
- 310-byte field to receive terminal name, IP address, port number,
domain name, and zone identifier is requested
|
When control is returned to the user, register 15 contains one
of the following return codes:
Table 2. Return codes from
GTTERMReturn code dec (Hex) |
Meaning |
---|
0(0) |
Successful. |
4(4) |
The terminal in use does not support full screen
TPUT. |
8(8) |
The terminal in use is not a display terminal. |
12(C) |
The PRMSZE parameter, which is required, was not
specified. |