General
Application areas: | Requesting and accessing lists and tables; see "Requesting and accessing lists and tables"Input/output; see "Input/output" |
Macro type: | Type O; see "O-type macros" |
The description applies to VTSU V13.3A
Macro description
The DCSTA macro (Data Communication STation Attributes) supports the TSTAT macro. DCSTA is used to generate receiving fields or symbolic field names (DSECT) for the information supplied by the TSTAT macro.
Macro format and description of operands
[name] DCSTA |
D / C [,prefix] ,TYPE=TCHAR / PHDIM / LIDIM / VDT[YP] / EDOPT / OFLOW / STNAM / PRNAM / ALL / MONCS / PERPH / BASIC |
name
Becomes the symbolic name for the first DS statement in the macro expansion if the C operand is specified (the length attribute is zero).
If the D operand is specified, the “name” operand specifies the name of the dummy section (DSECT).
If the “name” operand is omitted, the system forms a name from the valid prefix (see the “prefix” operand) and the operand value for TYPE.
C
A storage area with symbolic addresses is generated. In the TSTAT call, this area may be specified as receiving field. No CSECT statement is generated.
D
A dummy section (DSECT) is generated together with a DSECT statement. The symbolic name generated can be used to address a receiving field previously defined for the TSTAT macro.
prefix
The prefix may consist of 1 to 3 characters, which are to appear at the beginning of the generated field names. The specified prefix replaces the characters “STA”, the default value for the field name prefix.
TYPE=
Specifies which receiving field or which field names are to be generated:
TCHAR
Requests data terminal characteristics.
PHDIM
Requests physical data terminal characteristics.
LIDIM
Requests logical data terminal characteristics.
VDT[YP]
Requests logical data terminal type.
EDOPT
Static edit options.
OFLOW
Requests overflow control type values.
STNAM
Requests data terminal name.
PRNAM
Requests processor name.
ALL
Requests information from TCHAR to PRNAM.
MONCS
Description of monitor and character sets.
PERPH
Requests connected peripherals.
BASIC
Basic information on the data terminal.
Functional description
If the TSTAT macro is used to request information, the receiving field may be defined either explicitly or with the DCSTA C,... macro. If the receiving field has been explicitly defined, the DCSTA D,... macro may be used to generate a dummy section (DSECT), i.e. an address structure for the receiving field, by means of a USING statement. In order to interrogate bit values, the DCSTA macro generates symbolic constants with which the field contents may be compared.
The field names which DCSTA generates by default may be seen in the macro expansion in the example. All of them start with the letters STA. Any string may be selected to replace these characters.
The start addresses of the receiving fields generated by the DCSTA C,... macro must be specified in the TSTAT macro.
The default start addresses are as follows:
STATCHARSTASTNAMSTAPHDIMSTAPRNAMSTALIDIMSTAALLSTAVDTSTAMONCSSTAEDOPTSTAPERPHSTAOFLOWSTABASIC
Return information and error flags
R15:
+---------------+ | | | | | | | | | | | |a|a| +---------------+
A return code relating to the execution of the macro DCSTA is transferred in the rightmost byte of register R15.
Return code | Meaning |
X'00' | Normal termination |
X'04' | Unrecoverable error |
X'08' | Error in the operand list |
X'0C' | No participant data terminal available |
X'10' | Length of the receiving field is too short: only part of the information was given when |
X'14' | The desired information is (partly) not available |
Description of the transferred information: see the following pages
TCHAR:Physical type (area length: 8 bytes)
Byte | Symb. name | Meaning |
0 | STAPTTYP | Partner type: (STADCAMP) - Partner is a DCAM program |
1 | STADVTYP | Device type, e.g.: (STAD1000) - T1000 Printer Terminal |
2 | STATCHR2 | Character set: (STATC2EX) - Second character set available |
3 | STATCHR3 | Device options at the data display terminal: (STATC3H1) - |
4 | STATCHR4 | Data display terminal functions (STATC4CO) - 4 colors |
5 | STATTCHRS | Information from the status message (STATTCSDT) - German keyboard connected |
6 | STACTRLU | Type of printer controller when the data terminal is a printer, |
7 | STACHCAD | Channel address of the central hardcopy unit |
Notes
The 9749 Data Display Terminal can be generated as a separate device type in the PDN. However, for application programs, it is always displayed as the 9750 Data Display Terminal when the TSTAT macro is used.
The 9758 M4 Data Display Terminal can be generated in the PDN as the 9755 or 9763 Data Display Terminal. However, for application programs, it is always displayed as the 9755 Data Display Terminal when the TSTAT macro is used.
PHDIM:Physical attributes (area length: 8 bytes)
Byte | Symb. name | Meaning |
0-1 | STALLEN | Physical line length |
2-3 | STANOLIN | Physical line number |
4-5 | STAMAXDB | Maximum physical device buffer, i.e. maximum number of characters |
6-7 | - | Reserved |
Bit 215 = 1 means in each case: value is not available.
LIDIM:Logical attributes (line mode) (area length: 8 bytes)
Byte | Symb. name | Meaning |
0-1 | STALLLEN | Number of characters per physical line in line mode, where ' NL' in the |
2-3 | STALNOLN | Number of physical lines which can be output in line mode without the |
4-5 | STALMAXB | Number of characters which can be sent in a message in line mode |
6-7 | - | reserved |
Bit 215 = 1 means in each case: value is not available.
VDT[YP]:Logical type (area length: 8 bytes)
Byte | Symb. name | Meaning |
0 | STAVDT | Logical device type: (STALINCP) - Lines/page data terminal (LINE MODE) versions of operating system (COMP MODE) (STAFYSCP) - Physical data terminal support (PHYS MODE) |
1 | STAVDTPR | Logical device protocol: (STATD810) - 810 Protocol |
2-7 | - | reserved |
EDOPT:Static edit options (area length: 8 bytes)
The symbolic operands of the WRTRD macro are used for representation.
Byte | Symb. name | Meaning |
0 | STASEWR1 | Output edit byte 1 (STAWR1MM) - Mask for output edit mode (STAWR1CD) (STAWR1LE) (STAWR1RE) (STAWR1HO) (STAWR1PT) (STAWR1HC) |
1 | STASEWR2 | Output edit byte 2 (STAWR2HD) (STAWR2NO) (STAWR2EX) (STAWR2ET) (STAWR2BL) (STAWR2TP) (STAWR2IM) (STAWR2PN) |
2 | STASERD1 | Input edit byte 1 (STARD1MM) - Mask for input edit mode (STARD1CD) (STARD1LE) (STARD1BS) (STARD1PT) (STARD1LC) (STARD1HD) |
3 | STASERD2 | Input edit byte 2 (STARD2FC) (STARD2IC) (STARD2CF) (STARD2EX) |
4-7 | - | reserved |
OFLOW:Control for screen overflow (area length: 8 bytes)
Byte | Symb. name | Meaning |
0 | STAOFLOW | Type of overflow control: (STAOFCTM) Waiting time with n seconds (hexadecimal input) according (STAOFCAK) overflow occurs (STAOFCTL) (STAOFPGM) (seeTCHNG macro, MODIFY-TERMINAL-OPTIONS |
1 | STAOFTIM | Waiting time (hexadecimal input in seconds). |
2 - 7 | - | reserved |
STNAM:Name of the terminal, as specified in the PDN (area length: 8 bytes)
Byte | Symb. name | Meaning |
0-7 | STASTNAM | Name of the terminal |
PRNAM:Name of the server to which the terminal is connected, as specified in the RDF generation (area length: 8 bytes)
Byte | Symb. name | Meaning |
0-7 | STAPRNAM | Name of the server |
ALL
The symbolic addresses of the table fields are defined as above. The subarea sequence is as follows:
TCHAR, PHDIM, LIDIM, VDTYP, EDOPT, OFLOW, STNAM, PRNAM
Note
If TYPE=ALL is specified, the area size is 64 bytes. TYPE=ALL does not include MONCS, PERPH and BASIC.
MONCS: Description of monitor and character sets (area length: at least 14 bytes)
Information is supplied in the status message from the data terminal, when this is available, otherwise default values are assumed.
Byte | Symb. name | Meaning |
0 | STAMOCPR | Status message from the terminal (STAMOCY) - Status message available. The following data is taken |
1 | STAMOTYP | Terminal monitor type (STAMONO) - Data terminal with a monochrome screen |
2 | STAFAT | Field attributes (STAFATY) - Field attributes can be used |
3 | - | reserved |
4 | STADIM1 | Screen size 24 lines x 80 characters (STADIMY) - Format is supported (can be addressed with DIM) |
5 | STADIM2 | Screen size 32 lines x 80 characters (STADIMY) - Format is supported (addressable with DIM) |
6 | STADIM3 | Screen size 43 lines x 80 characters (STADIMY) - Format is supported (addressable with DIM) |
7 | STADIM4 | Screen size 27 lines x 132 characters (STADIMY) - Format is supported (addressable with DIM) |
8-11 | - | reserved |
12-13 | STACSNO | Number of addressable character sets |
14 | STACS0T | Character set type 0 (STACSSIN) - Loadable monochrome character set |
15 | STACSOS | Character set status 0 (STACSNLO) - Character set can be loaded |
16 | STACS1T | Character set type 1 (STACSSIN) - Loadable monochrome character set |
17 | STACS1S | Character set status 1 (STACSNLO) - Character set can be loaded(STACSDSS) - Character |
18 | STACS2T | Character set type 2 (STACSSIN) - Loadable monochrome character set |
19 | STACS2S | Character set status 2 (STACSNLO) - Character set can be loaded |
20 | STACS3T | Character set type 3 (STACSSIN) - Loadable monochrome character set |
21 | STACS3S | Character set status 3 (STACSNLO) - Character set can be loaded |
22 | STACS4T | Character set type 4 (STACSSIN) - Loadable monochrome character set |
23 | STACS4S | Character set status 4 (STACSSIN) - Loadable monochrome character set |
24 | STACS5T | Character set type 5 (STACSNLO) - Character set can be loaded |
25 | STACS5S | Character set status 5 (STACSNLO) - Character set can be loaded |
26 | STACS6T | Character set type 6 (STACSSIN) - Loadable monochrome character set |
27 | STACS6S | Character set status 6 (STACSNLO) - Character set can be loaded |
28 | STACS7T | Character set type 7 (STACSSIN) - Loadable monochrome character set |
29 | STACS7S | Character set status 7 (STACSNLO) - Character set can be loaded |
Bytes 14-29 are omitted when the length of the status area is inadequate, without giving a return code. Information on character sets is only given when the character sets can be addressed via bytes 12-13.
PERPH: Connected peripherals (area length: 8 bytes)
Information is given in the status message from the data terminal, when this is available, otherwise it is supplied from the generation.
Byte | Symb. name | Meaning |
0 | STAPERPR | Status of the terminal (STAPERY) - Status message from the data terminal available |
1-2 | - | reserved |
3 | STALOCHC | Local hardcopy unit (STALHCY) - Local hardcopy unit connected |
4-5 | - | reserved |
6 | STAIDCAR | ID card reader (STAIDCY) - ID card reader connected |
7 | STACKT | Chipcard terminal (STACKTY) - Chipcard terminal connected |
BASIC: Basic information on the data terminal (area length: 24 bytes)
Information is given in the status message from the data terminal, when this is available, otherwise it is supplied from the generation or VTSU-B default values are assumed.
If you specify a length greater than 24 and less than 33 bytes, information is only returned for bytes 0-23.
If you specify a length of 33 bytes, information is only returned for bytes 0-32. If XHCS is not loaded or if the terminal does not support extended character sets, no information is supplied on the terminal type and the extended standard name.
If you specify a length greater than 33 bytes and less than 52 bytes and the data display terminal works in 8-bit mode, the first byte of this area is set to X'00'. The information received is truncated because the specified area is too small.
If you specify a length of 52 bytes, information is returned only for bytes 0-51. Bytes that are not required are set to X'00'. No information is provided for printers.
If you specify a length of 60 bytes, information is returned for bytes 0-59. Bytes that are not required are set to X'00'.
If you specify a length of 64 bytes, the information returned is complete (bytes 0-63). Bytes that are not required are set to X'00'.
Byte | Symb. name | Meaning |
0 | STAINFO | Terminal status (STAINFOY) - Status message from the terminal is available |
1 | STAINFP | Status from the terminal (STAINFPY) - Status message from the terminal possible |
2-9 | STAPTNA | Printable data terminal type TYP00 - Unknown data terminal type |
10 | STAHCOPY | Local hardcopy unit (STABLHCY) - Local hardcopy unit connected |
11 | STAIDCR | ID card reader (STAIDCRY) - ID card reader connected |
12 | STACOL | Number of colors on the data terminal (STACOLNO) - No colors |
13-15 | - | reserved |
16-19 | STALINES | Physical number of lines printable (decimal) |
20-23 | STACOLUM | Physical number of characters per line printable (decimal) |
24 | STATTYPE | Terminal type (STATYPE7) - Terminal can work in 7-bit mode only. |
25-32 | STACURCH | Extended standard name. The value is returned only if the data display |
33 | STACCSNN | Number of 8-bit character sets supported (STATRINF) - X' 00' and STATYPE8 simultaneously: the length of the |
34 | STACSS1 | 1st supported character set |
35 | STACSS2 | 2nd supported character set |
36 | STACSS3 | 3rd supported character set |
37 | STACSS4 | 4th supported character set |
38 | STACSS5 | 5th supported character set |
39 | STACSS6 | 6th supported character set |
40 | STACSS7 | 7th supported character set |
41 | STACSS8 | 8th supported character set |
42 | STACSS9 | 9th supported character set |
43 | STACSS10 | 10th supported character set |
44 | STACSS11 | 11th supported character set |
45 | STACSS12 | 12th supported character set |
46 | STACSS13 | 13th supported character set |
47 | STACSS14 | 14th supported character set |
48 | STACSS15 | 15th supported character set |
49 | STACSS16 | 16th supported character set |
50-51 | - | Reserved |
52-59 | STAACTCH | Name of the extended character set activated. The name is returned only |
60 | STARMODE | Physical read mode (STARMODM) - Only modified fields are read. |
61 | STALLECH | Logical line-end symbol for data display terminals without equivalent |
62 | STASUBCH | Substitute symbol for characters that are not X' 40' and are not logical |
63 | STAPERHC | Permanent hardcopy (STAPERHY) - All output messages for a data display terminal are |
If less than 16 different variants are supported in STACCSn (bytes 34-49), the remaining variant numbers (16-n) are set to X'00'.
Examples see TSTAT macro.