Console
This chapter describes the features and components of the Base console component.
1. Overview
The system console (or console) is a terminal that displays messages from the system kernel to the system administrator and accepts system management commands from the keyboard.
The OpenFrame console was designed to support the DISPLAY and REPLY commands used in PL/I. Currently, the console also supports the DISPLAY UPON CONSOLE and ACCEPT FROM CONSOLE commands supported in COBOL. Currently, the console is also used in OpenFrame/OSC for the system administrator to monitor the system.
2. Console Components and Functions
The following are the OpenFrame console components.
Component | Description |
---|---|
Program |
Application programs or online services written in PL/I or COBOL. |
tconmgr |
Virtual console device. |
ofrcmsvr |
Console server that manages and displays console messages. |
2.1. DISPLAY
The DISPLAY function supports the PL/I command DISPLAY and the COBOL command DISPLAY UPON CONSOLE that display messages to the console screen.
The following diagram illustrates the DISPLAY process.
-
The DISPLAY process for a program is as follows:
-
The program sends a DISPLAY message to ofrcmsvr.
-
ofrcmsvr writes the DISPLAY message to a file.
-
ofrcmsvr sends the message to the tconmgr that is currently connected.
-
ofrcmsvr returns an acknowledgment to the requesting program.
-
-
The DISPLAY process for tconmgr is as follows:
-
tconmgr notifies ofrcmsvr that it is now connected.
-
ofrcmsvr returns an acknowledgment. After the acknowledgment, tconmgr displays messages from ofrcmsvr by periodically checking for incoming messages.
-
2.2. ACCEPT
The ACCEPT function supports the PL/I command REPLY and the COBOL command ACCEPT FROM CONSOLE.
-
The ACCEPT process for a program is as follows:
-
The program sends an ACCEPT message to ofrcmsvr.
-
ofrcmsvr writes the ACCEPT message to a file.
-
ofrcmsvr sends the ACCEPT message to the currently connected tconmgr and waits for a response from tconmgr before sending an acknowledgment to the requesting program. The requesting program also waits until it receives the ACCEPT message from ofrcmsvr (③ in the figure).
-
-
The DISPLAY process for tconmgr is as follows:
-
tconmgr notifies ofrcmsvr of a successful connection.
-
ofrcmsvr returns an acknowledgment. After the acknowledgment, tconmgr displays messages from ofrcmsvr by periodically checking for incoming messages.
-
3. tconmgr
The tconmgr tool is a virtual OpenFrame console program which corresponds to a mainframe console. Execute tconmgr to see a console message of the user-preferred ID.
Usage
The tconmgr tool can be invoked as follows:
$ tconmgr [CONSOLE_ID]
-
Input Parameters
Parameter Description CONSOLE_ID
Specifies a number from 0 to 99. OpenFrame currently uses only 0, and if CONSOLE_ID is not specified, 0 is specified by default. All messages of the output parameter list are also displayed as 0.
-
Output Parameters
The following is output to the first part of a message. Each parameter is delimited with a semicolon(;), and all the parameters are enclosed by squared brackets([ ]).
Parameter Description Msg Source
Specifies the message source such as COBOL and TCONMGR.
Date Time
Specifies the date and time when the message is created. (Format: YYYYMMDD_HHMMSS)
Length
Specifies the length of the message.
Console ID
Specifies the console ID of the message source. Currently, only zero is printed.
User
Specifies generally the JOBID of the message source, or user name if no JOBID. If the message source is TCONMGR, the JOBID of the response target is displayed.
Process ID
Specifies the Unix PID of the message source. If the message source is TCONMGR, the Unix PID of the response target is displayed.
Examples
The following example, a general flow of a console, shows how an application sends a message to a console or requests a response.
IDENTIFICATION DIVISION … ENVIRONMENT DIVISION … DATA DIVISION … WORKING-STORAGE SECTION. 03 BUFFER PIC X(10). PROCEDURE DIVISION. A SECTION. DISPLAY “CONSOLE DISPLAY TEST” UPON CONSOLE. ACCEPT BUFFER FROM CONSOLE. EXIT. STOP RUN
DISPLAY and ACCEPT are executed as follows:
-
Execute DISPLAY with the following command.
DISPLAY “CONSOLE_DISPLAY_TEST” UPON CONSOLE.
The message "CONSOLE_DISPLAY_TEST" will be displayed to a console.
Result of DISPLAY -
Execute ACCEPT with the following command.
ACCEPT BUFFER FROM CONSOLE.
The message "Accept request received!!!" will be displayed.
Result of ACCEPT -
The user can respond to the message with the REPLY command, 'R'. Execute 'R', and a new page displaying a list of messages requesting a response will appear. The user can respond to the message by choosing a desired number.
Result of REPLY -
If selecting 0 from the message list and responding to the message with an 'OK' message, the following screen will be displayed.
After Executing OK (1) -
Then a message that tconmgr responded to the message will be displayed, as follows.
After Executing OK (2)
If closing tconmgr, the contents will be removed from the screen. To search for the previous contents, use a HISTORY command with 'H', as follows.
If executing 'H', a new screen will appear, and previous contents will be searched with the following conditions.
Item | Description |
---|---|
Process ID |
UNIX PID |
User |
Generally the JOBID of the message source, or different name if no JOBID. |
Msg Source |
Message source such as COBOL and TCONMGR. |
Date |
Date when the message is created. If no data is entered, any contents created on the day are searched. |
Time |
Time when the message is created. Only the messages created after the specified time are searched. |
For instance, if searching data with Process ID, 5169, the following screen will be displayed.