CONSOLE

#### Search Results

Search

# CONSOLE

File | 35
Statement | `FIND`, `PROCESS`
Task | Read operator console or issue console commands.

## Fields

Dictionary Field Name | F/L | Mu | DE | Remarks
--- | --- | --- | --- | ---
`ERROR-CODE` | N3 |  |  |
`ERROR-TEXT` | A58 |  |  |
`NODE` | N5 |  | D |
`NODE-NAME` | A16 |  | D |
`SYSTEM-MESSAGE-CODE` | A10 |  |  |
`FUNCTION` | A8 |  | D | Required.
`JOB-ID` | A8 |  | D | Relevant with `FUNCTION=DISPLAY`, `DIS-WTOR`.
`JOB-NAME` | A8 |  | D | Relevant with `FUNCTION=WTOR`.
`JOB-TYPE` | A6 |  | D | Relevant with `FUNCTION=DISPLAY`, `DIS-WTOR`.
`NETTO-TEXT` | A253 |  | D | Relevant with `FUNCTION=DISPLAY`, `DIS-WTOR`.
`READ-DIRECTION` | A1 |  | D | Relevant with `FUNCTION=DISPLAY`.
`RECORD-NUMBER` | N9 |  | D | Relevant with `FUNCTION=DISPLAY`.
`REPLY-FLAG` | A1 |  |  | Relevant with `FUNCTION=DISPLAY`, `DIS-WTOR`.
`REPLY-ID` | A8 |  | D | Relevant with `FUNCTION=DIS-WTOR`.
`TEXT` | A253 |  | D | Relevant for function `OP-CMD`, default length: 80 characters.
`TEXT-LENGTH` | N3 |  | D | Relevant for funciton `OP-CMD`, maximum value = 120
`TIMX` | T |  | D |
`WAIT-TIME` | B4 |  | D | Relevant with `FUNCTION=DISPLAY`.
`CONSOLE-ID` | B1 |  | D | Relevant with `FUNCTION=DISPLAY`.
`REPLY` | A80 |  |  | Relevant with `FUNCTION=WTOR`.
`RESPONSE-FLAG` | A1 |  |  |
`HOLD-FLAG` | A1 |  |  |
`DESCR-CODE-STRING` | A16 |  | D |
`ROUTE-CODE-STRING` | A28 |  | D |
`SEQUENCE-NUMBER` | A8 |  |  |
`TEXT-FLAG` | A1 |  |  |
`TIME-STAMP` | A8 |  | D | Relevant with `FUNCTION=DIS-WTOR`.

## Relevant Error Codes

Code | Text
--- | ---
530 | Access denied by Security Facility.
600 | Unknown function.
630 | Console not defined or inactive.
699 | GETVIS failed.
778 | Not APF authorized.

## Field Descriptions

Field Name | Format/Length
--- | ---
`CONSOLE-ID` | (B1)

Only relevant for the `DISPLAY` function. The identifier of the console to be displayed. If the identifier is omitted, the master console is displayed.

Field Name | Format/Length
--- | ---
`DESCR-CODE-STRING` | (A16)

Descriptor codes for the console message. Each byte of the string corresponds to one of the descriptor codes 1-16. A byte contains `1` if the corresponding descriptor code is assigned, or `0` if it is not assigned.

Field Name | Format/Length
--- | ---
`FUNCTION` | (A8)

The function to be performed. Possible values are:

Value | Explanation
--- | ---
`DISPLAY` | Display console screen image.
`DIS-WTOR` | Display pending operator replies.
`OP-CMD` | Issue operator command.
`WTO` | Write to operator.
`WTOR` | Write to operator with reply.

The default length of a command line is 80 characters. However, it can be expanded up to 120 characters if field `TEXT-LENGTH` is accordingly specified as displayed in the following sample code for function `OP-CMD`:

    PROCESS CONSOLE USING NODE = #NODE
    , FUNCTION = 'OP-CMD'
    , TEXT = #COMMAND-LINE
    , TEXT-LENGTH = 120
    GIVING ERROR-CODE ERROR-TEXT

Field Name | Format/Length
--- | ---
`HOLD-FLAG` | (A1)

Indicates if message is held by the system (has descriptor codes `1`, `2`, `3` or `11`). Possible values:

Value | Explanation
--- | ---
`N` | No
`Y` | Yes

Field Name | Format/Length
--- | ---
`JOB-ID` | (A8)

Only relevant for function `DISPLAY` and `DIS-WTOR`. Job number (TSN) of job for which the message was created.

Field Name | Format/Length
--- | ---
`JOB-NAME` | (A8)

Only relevant for function `DIS-WTOR`. The job that issued the `WTOR`.

Field Name | Format/Length
--- | ---
`JOB-TYPE` | (A6)

Only relevant for function `DISPLAY` and `DIS-WTOR`. Type of job for which message was created, if this job is still active.

Field Name | Format/Length
--- | ---
`NETTO-TEXT` | (A253)

Only relevant for function `DISPLAY` and `DIS-WTOR`. Message text without the additional information added by the operating system at the creation of the console message.

Field Name | Format/Length
--- | ---
`READ-DIRECTION` | (A1)

Only relevant for function `DISPLAY`. Direction for reading console messages. Possible values:

Value | Explanation
--- | ---
`B` | Default. Backwards (that is, towards oldest message).
`F` | Forwards (that is, towards message last received).

The starting position of `READ-DIRECTION` can be specified in the `RECORD-NUMBER` field.

Field Name | Format/Length
--- | ---
`RECORD-NUMBER` | (N9)

Only relevant for function `DISPLAY`. The number of the console message is returned in this field. If used as input (descriptor), a start position can be given. Possible values:

Value | Explanation
--- | ---
`0:` | Start with latest record.
`n:` | Start with record n.
`-n:` | Start with latest record minus n records.

If the last record + 1 is selected and the value of the field `WAIT-TIME` is greater than `0`, the system waits for the next message.

If the specified start position lies before the oldest available record, the oldest record is taken as the start position.

Field Name | Format/Length
--- | ---
`REPLY` | (A80)

Only relevant for function `WTOR`: the operator reply.

Field Name | Format/Length
--- | ---
`REPLY-FLAG` | (A1)

Only relevant for function `DISPLAY` and `DIS-WTOR`. Possible values:

Value | Explanation
--- | ---
`N` | Message requires no reply.
`Y` | Message requires a reply.

Field Name | Format/Length
--- | ---
`REPLY-ID` | (A8)

Only relevant for function `DIS-WTOR`. The identifier which must be used to reply to a write-to-operator-with-reply.

Field Name | Format/Length
--- | ---
`RESPONSE-FLAG` | (A1)

Indicates whether message text is the response to a command. Possible values:

Value | Explanation
--- | ---
N | No
Y | Yes

Field Name | Format/Length
--- | ---
`ROUTE-CODE-STRING` | (A28)

Routing codes for the console message. Each byte of the string corresponds to one of the routing codes 1 - 28. A byte contains `1` if the corresponding routing code is assigned, or `0` if it is not assigned.

Field Name | Format/Length
--- | ---
`SEQUENCE-NUMBER` | (A8)

Sequence number of the message since the last IPL.

Field Name | Format/Length
--- | ---
`TEXT` | (A253)

The command to be entered for function `OP-CMD` (operator command), default length = 80 characters.

Field Name | Format/Length
--- | ---
`TEXT-FLAG` | (A1)

Describes the type of message text. Possible values:

Value | Explanation
--- | ---
`C` | Control text (multi-line)
`D` | Data text ( " " )
`E` | End text ( " " )
`L` | Label text ( " " )
`M` | First line ( " " )
`N` | Normal text (single line)

Field Name | Format/Length
--- | ---
`TEXT-LENGTH` | (N3)

Length of field `TEXT`, maximum value = 120 characters. Note that using this field an operator command can exceed the default lenght (80 characters) up to a maximum length of 120 characters.

Field Name | Format/Length
--- | ---
`TIME-STAMP` | (A8)

Only relevant for function `DIS-WTOR`. Time stamp of the console message in format `HH:MM:SS`.

Field Name | Format/Length
--- | ---
`TIMX` | (T)

Time stamp in Natural internal format.

Field Name | Format/Length
--- | ---
`WAIT-TIME` | (B4)

Only relevant for function `DISPLAY`. Time in seconds to wait for the next message (see also the field `RECORD-NUMBER`). If no message arrives within the specified time, `ERROR-CODE 537` is issued.

Up to ten delimiter characters to be used for tokenizing the record.

## Default Order of Data Returned

Messages are returned in timestamp order (oldest to newest).

### On this page

- Fields
- Relevant Error Codes
- Field Descriptions
- Default Order of Data Returned