Previous Topic: Action=BUILD Class=MESSAGE

Next Topic: Action=DISPLAY Class=HELP


Action=DISPLAY Class=DATA

This statement displays text in browse mode. The DISPLAY DATA function provides text browsing facilities for up to 9999 lines of text. When a user requests help, help text associated with the specified application ID and function name is displayed.

This statement has the following format:

&CONTROL SHRVARS=($ED)
-EXEC $CACAL       OPT=ACTION
                   ACTION=DISPLAY
                   CLASS=DATA
                   PARMS=‘APPL=application id
                           FUNC=function name
                           [TITLE=title]
                           [LINECNT={0 | n}]
                           [LINELEN={256 | n}]
                           [LINENUM={YES | NO}]
                           [INDENT={0 | n}]
                           [TOPEXIT={YES | NO}]
                           [MESSAGE=message]
                           [USERFUNC=function]
                           [LINETOP={1 | n}]
                           [CANCEL={YES | NO}]
                           [LMARGIN={1 | n}]
                           [RMARGIN=n]
APPL=application id

A required parameter giving the application identifier.

FUNC=function name

A required parameter indicating the function being performed.

TITLE=title

An optional parameter giving the title to be displayed at the top of the panel. The default is CAS : Text Editor.

LINECNT={0 | n}

A required parameter giving the total number of lines of text. The default is 0, and the range is 0 through 9999.

LINELEN={256 | n}

An optional parameter indicating the maximum line length. The default is 256, and the range is 1 through 256.

LINENUM={YES | NO}

An optional parameter that indicates whether to display line numbers. The default is YES.

INDENT={0 | n}

An optional parameter that indicates the number of positions to indent the text lines. The default is 0, and the range is 0 through 256 minus the value in LINELEN.

TOPEXIT={YES | NO}

An optional parameter indicating whether executing the BACKWARD command—when the display is positioned at the top of the text—ends the text display and causes control to be returned to the caller. The default is NO.

MESSAGE=message

An optional parameter specifying a message to be displayed on line 3 of the panel, on initial entry.

USERFUNC=function

An optional parameter specifying the logical function being performed (for example, Browse). If specified, the function is displayed on line 4 of the panel as Function=function. function must not be longer than eight characters.

LINETOP={1 | n}

An optional parameter specifying the number of the line to be displayed as the first line of text, on initial entry. The default is 1, and the range is 1 to the value in LINECNT.

CANCEL={YES | NO}

An optional parameter specifying whether the CANCEL command is supported. The default is NO.

LMARGIN={1 | n}

The left margin (in characters) used by the text editor. The default is 1, and the range is 1 through the value in LINELEN.

RMARGIN=n

The right margin (in characters) used by the text editor. The default is the lesser of the value in LINELEN and the logical screen width. The range is the value of LMARGIN plus 20 to the value in LINELEN.

Input Variables

This statement contains the following input variables:

&$EDFK1...&$EDFK24

The function key actions for any or all of the keys F1 to F24. Specify NOACT to inactivate and remove a function key from the function key area.

&$EDFKLAB1...&$EDFKLAB24

The labels that are displayed in the function key area (the bottom two lines of the displayed screen). Each label can be up to eight characters in length. If not specified, the label for a key defaults to the first word of the key’s action.

&$EDCOMMENTn

Contains the comment lines to be displayed (up to nine) above the text lines.

&$EDLINEnnnn

Contains the text lines to be displayed (up to 9999).

&$EDEXITCMDS=command1, command2, ...

Specifies commands that are accepted as valid exit commands. That is, if a specified command is executed, control is returned to the caller.

Return Variables

This statement contains the following return variables:

&$EDCMDEXIT

The command which was entered by the user to exit (normally EXIT).

&$EDCMDPARMS

The parameters for the exit command in &$EDCMDEXIT.

&$EDCOMMAND

The entire contents of the exit command including parameters.

&$EDLINETOP

The line number at the top of the display on exit.

&SYSMSG

System message. Contains the error message (for return code 8).

Feedback Codes

If a return code of 8 is set, then additional information is available as one of the following feedback codes, set in &$CAFDBK:

8

Processing error

10

Nesting level exceeded

Example

The following statements display the contents of &$EDLINE1 and &$EDLINE2 in two lines on a panel titled Problem Text:

&$EDLINE1 = &STR Problem text line 1
&$EDLINE2 = &STR Problem text line 2
&CONTROL SHRVARS=($ED)
-EXEC $CACALL   OPT=ACTION +
                ACTION=DISPLAY +
                CLASS=DATA +
                PARMS=‘APPL=ZPR +
                       FUNC=BROWSE +
                       TITLE=“Problem Text” +
                       LINECNT=2’