HPlogo HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix G TERMINAL INFORMATION

TERMINAL COMMUNICATION AREA

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Positions 49 through 58 (relative to 1) of the VPLUS communication area (comarea) are used for terminal-related information, which includes the terminal file number, terminal type, terminal allocation and error logging, and terminal options. It is not necessary for you to access this area as VPLUS manages it automatically. However, if you need to know the MPE file number of your terminal, how to suppress messages, read data automatically, or specify a timeout value for reading keys, the comarea items described in the following paragraphs perform these functions.

Parameters

Position 49 - filen

MPE file number used to identify the terminal.

Position 56 - termoptions

Terminal control options:

bits: 0 - 8

Reserved for system use.

9 - 10

01 = Enable ENTER or function key timeout in VREADFIELDS.

00 = Disable ENTER or function key timeout in VREADFIELDS (default).

13 - 14

01 = Enable AUTOREAD in VREADFIELDS.

00 = Disable AUTOREAD in VREADFIELDS (default)

15

0 = Display mode message (default)

1 = Suppress mode message.

Normally, there is no time limit for VREADFIELDS, whether the intrinsic is terminated by ENTER or a function key. Timeouts can be enabled in applications by setting bit 10 of the termoptions item of the comarea to 1, and specifying a timeout interval in the usertime item of the comarea. When a timeout is enabled, if ENTER or a function key is not pressed within the number of seconds specified in comarea position 58, the cstatus of 160 will be returned to the comarea. At this point, control will then be passed to the statement following the VREADFIELDS call in the application.

For example, in COBOL:

INITIALIZE-COMAREA
MOVE ZERO TO COM-OPTIONS.
ADD 32 TO COM-OPTIONS.
MOVE 60 TO COM-USERTIME.

if included in the initialization section of the application will indicate that all calls to VREADFIELDS should timeout after 60 seconds. Note that an ADD instruction was used to turn on the timeout feature. All changes to the termoptions item following VOPENTERM should be careful to set only single bits, as VPLUS uses bits 0-7. A MOVE instruction will destroy the configuration of these bits.

When VREADFIELDS is terminated by a function key, VPLUS does not transmit any data entered on the screen to the user buffer. If the programmer wishes for data to be transmitted to the data buffer when a function key is pressed, the AUTOREAD feature should be enabled. The following COBOL example shows how to enable the autoread feature, and transfer data to the buffer when the function key f4 is pressed:

CALL "VREADFIELDS" USING COMAREA.
IF COM-LASTKEY = 4 THEN
ADD 2 TO COM-OPTIONS
CALL "VREADFIELDS" USING COMAREA
SUBTRACT 2 FROM COM-OPTIONS.

Note that two VREADFIELDS calls are necessary to complete the process. The first VREADFIELDS detects that a function key was pressed, the second call actually transmits the data to the data buffer. The second call to VREADFIELDS does not wait for the user to press enter, but rather sends an "ESC d" to the terminal to simulate an automatic enter. As noted above in the description of user timeouts, the COBOL SUBTRACT and ADD statements should always be used when setting bits in the termoptions item of the comarea.

The mode message is displayed on terminals not automatically configured by VPLUS. The mode message for VOPENTERM is BLOCK MODE/PAGE IS SET; for VCLOSETERM it is REMEMBER TO UNLATCH THE BLOCK MODE KEY.

Position 58 - usertime

If enabled, the value in this word is used as the number of seconds to wait for the ENTER or function key to be pressed. The maximum timeout value is 3 2,7 6 7 seconds (9.1 hours).

Position 59 - identifier

VPLUS identifier for the HP terminal model being used, as shown earlier in Table G-1 “Terminals Supported by VPLUS” in the column labeled ID.

Feedback to webmaster