(Contents)(Previous)(Next)

Editor Call

It is possible to call the editor from an SQL-PL routine. A vector slice or a variable must be specified as argument.

If a vector slice is specified, each component of the vector corresponds to a row of the editing area.

If a variable is specified, the text created with the editor is assigned to this variable. This text can be re-edited at any time. In particular, the text can be stored in a LONG column in the database.

With this simple call, the edit area occupies the entire screen. Therefore there are some options to determine the position (POS), size (SIZE) and keys, according to the requirements.

The option MARK positions the cursor in the specified row and column and highlights this row.

The fields of the header can be set to values by the options PROGNAME, VERSION, MODE, and HEADER (or LABEL).

The number of edited lines can be restricted with the option MAXLINES.

With the option PRINT the contents of the specified variables are printed out. The options POS, SIZE, MARK, F1, ..., F9 have no effect here.

In the case of repeated editor calls with the same SQL-PL variable, the option NOINIT causes the position of the editor window (cursor position and first row displayed) to be restored just as it was the last time the editor was left.

The position values can be kept available for two variables.

By means of the option MSG or ERROR a message can be output in the message line when the editor is called. The message of the MSG option is displayed with the attribute for INFO message and the message of the ERROR option is displayed with the attribute for error message (see SET parameters ATTR5 and ATTR6).

The following example contains some options:

With this call, the editor appears on the screen as follows:

The vector 'comment' can now be edited as desired. With the scrolling keys, the user can write beyond the vector slice specified in the call, (i.e. in this example more than 20 lines).

All the editing statements of the built-in editor are available (see the respective ADABAS User Manual).

When naming the keys care must be taken that the keys used by the editor itself are not used.

After leaving the editor the following variables are assigned:

- $EDITLINES to the number of edited lines.
- $CMD to the command line input in the editor.
- $KEY to the release key used.

Syntax:


(Contents)(Previous)(Next)