This statement displays text in edit mode. The EDIT DATA function provides editing facilities for up to 9999 lines of text, each of up to 256 characters in length. 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 $CACALL OPT=ACTION
ACTION=EDIT
CLASS=DATA
PARMS=‘APPL=application id
FUNC=function name
[TITLE=title]
[LINECNT={0 | n}]
[LINELEN={256 | n}]
[MAXLINES={9999 | n}]
[EDTLINES=n]
[TOPEXIT={YES | NO}]
[MESSAGE=message]
[USERFUNC=function]
[LINETOP={1 | n}]
[LMARGIN={1 | n}]
[RMARGIN=n]’
A required parameter giving the application identifier.
A required parameter indicating the function being performed.
An optional parameter giving the title to be displayed at the top of the panel. The default is CAS : Text Editor.
A required parameter giving the number of lines of text. The default is 0, and the range is 0 through 9999.
An optional parameter indicating the maximum line length. The default is 256, and the range is 1 through 256.
An optional parameter indicating the maximum number of lines of text that can exist. The default is 9999, and the range is 1 through 9999.
An optional parameter giving the number of lines that can be edited. If specified, the first n lines can be edited. If not specified, the number of lines that can be edited defaults to the value of the LINECNT parameter—that is, all lines can be edited. The range is 0 to the value in LINECNT.
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.
An optional parameter specifying a message to be displayed on line 3 of the panel, on initial entry.
An optional parameter specifying the logical function being performed (for example, Update). If specified, the function is displayed on line 4 of the panel as Function=function. function must not be longer than eight characters.
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 through the value in LINECNT.
The left margin (in characters) used by the text editor. The default is 1, and the range is 1 through the value in LINELEN.
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.
This statement contains the following input variables:
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.
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.
Contains the comment lines to be displayed (up to nine) above the text lines.
Contains the text lines to be displayed for edit (up to 9999).
Specifies commands which are accepted as valid exit commands. That is, if a specified command is executed, control is returned to the caller.
This statement contains the following return variables:
The edited text lines.
The number of edited text lines. The value gives the number of &$EDLINEnnnn variables.
Whether any lines were modified (YES or NO).
The command that was entered by the user to exit (normally FILE or SAVE).
The parameters for the exit command in &$EDCMDEXIT.
The entire contents of the exit command including parameters.
The line number at the top of the display on exit.
System message. Contains the error message (for return code 8).
If a return code of 8 is set, then additional information is available as one of the following feedback codes, set in &$CAFDBK:
Canceled by user
Processing error
Nesting level exceeded
The following statements display the contents of &$EDLINE1 and &$EDLINE2 in two lines on a panel titled Problem Text for editing:
&$EDLINE1 = &STR Problem text line 1 &$EDLINE2 = &STR Problem text line 2 &CONTROL SHRVARS=($ED) -EXEC $CACALL OPT=ACTION + ACTION=EDIT + CLASS=DATA + PARMS=‘APPL=ZPR + FUNC=UPDATE + TITLE="Problem Text" + LINECNT=2’
| Copyright © 2008 CA. All rights reserved. |
|