SET ENTER

Read syntax diagramSkip visual syntax diagram SET ENTer 1BEFOREAFTERONLYIGNORE2stringNULLKEYCOPYKEYTABKEY
Notes:
  • 1 Refer to the BEFORE operand description for the default.
  • 2 If string is not specified, ENTER is undefined.

Purpose

Use the ENTER option to define a meaning for the keyboard ENTER or to remove the meaning associated with ENTER.

Operands

BEFORE
specifies the key definition is executed before the contents of the command line. BEFORE is the default for SET ENTER, unless the string begins with ? or =. For these two strings, ONLY is the default.
AFTER
specifies the key definition is executed after the contents of the command line.
ONLY
specifies only the key definition is executed, thereby ignoring the command line.
IGNORE
specifies the key definition is ignored when you enter something on the command line, thereby only executing the command line.
string
is any XEDIT subcommand or macro (including CP, CMS, or EXEC), which is executed when you press ENTER. If string is null, ENTER is undefined.
NULLKEY
When you press ENTER, blank characters are changed to nulls on the field of the screen that contains the cursor. If the cursor is on a prefix area, blanks are changed to nulls on the file line with which that prefix area is associated.
COPYKEY
When you press ENTER, the exact content of the virtual screen is copied into the printer spool.
TABKEY
When you press ENTER, the cursor is moved into the next tab column, as defined in the SET TABS subcommand.

Initial Setting

ENTER IGNORE COMMAND CURSOR CMDLINE 1 PRIORITY 30

Usage Notes

  1. When you use ENTER set to COPYKEY, you should close the printer at the end of the editing session. If an error occurs in printing the screen, no copy is placed in the printer and only severe error messages are issued.
  2. When you press ENTER set to TABKEY, COPYKEY, or NULLKEY, no screen changes are processed, including the command line, and the keywords BEFORE, AFTER, ONLY, and IGNORE have no effect. A PA/PF key would have to be used to process the command line or to change the ENTER key definition.
  3. ONLY as part of the ENTER key setting should be used with extreme care, because the command line is not processed. A PA/PF key would have to be used to process the command line or to change the ENTER key definition.
  4. When the ENTER key is pressed, the ENTER key definition, the contents of the command line, or both are placed on the console stack in the order described in “Using READ CMDLINE” of READ. Thus if BEFORE is specified, execution of the ENTER key definition may alter or suppress execution of the command line by altering the contents of the stack; similarly, if AFTER is specified, execution of the command line may alter or suppress execution of the ENTER key definition.

Examples

In the following example, setting the priority to 5 prevents the cursor from moving to the command line if you are in the file area when you press ENTER.

set enter ignore command cursor cmdline 1 priority 5

Messages and Return Codes

520E
Invalid operand: operand [RC=5]
545E
Missing operand(s) [RC=5]

where return codes are:

0
Normal
5
Invalid or missing(s) operand
6
Subcommand rejected in the profile due to LOAD error, or QUIT subcommand has been issued in a macro called from the last file in the ring