INPUT

Read syntax diagramSkip visual syntax diagramInput1line
Notes:
  • 1 If line is not specified, you will leave edit mode and enter input mode.

Purpose

Use the INPUT subcommand to insert a single line into a file, or, if no data line is specified, to leave edit mode and enter input mode.

Operands

line
is the input line to be entered into the file. It can contain blanks and tabs, which are converted to blanks if the SET IMAGE ON subcommand is in effect. The line is inserted after the current line, with the first character in the first tab column (only if SET IMAGE ON is in effect), and becomes the new current line. If you enter at least two blanks following the INPUT subcommand (and no additional text), a blank line is inserted into the file.

When you issue the INPUT subcommand without an operand, the screen display changes in the following ways:

  1. The phrase DMSXMD573I Input mode: appears in the message area, and Input-mode n File(s) appears in the status area of the screen.
  2. The phrase * * * Input Zone * * * appears in the command line.
  3. The prefix area disappears from the display.
  4. All file lines after the current line disappear from the display. Lines prefilled with blanks appear in their place. (You can use the SET MASK subcommand to fill this area with something other than blanks.) This blank area, between the current line and the command line, is the input zone.
  5. The cursor is placed on the first line of the input zone, which is the blank line immediately after the current line. You can then type in new lines of data in the input zone.

    Only data typed in the columns the SET VERIFY subcommand defines through the truncation column (which the SET TRUNC subcommand defines) is accepted. Data entered beyond the truncation column or outside the current SET VERIFY settings is lost.

Usage Notes

  1. When you fill up the screen but wish to stay in input mode and type in more lines, press ENTER once. The lines you typed move to the top half of the screen, and the last line you typed becomes the new current line; it is followed by blank lines. If AUTOSAVE is set for your editing session, you may receive the message, DMSXMD510I AUTOSAVED as fn ft fm, depending on the value set on the SET AUTOSAVE subcommand.
  2. When you are finished typing in data and want to return to edit mode, press ENTER twice. The last line you typed in input mode becomes the current line, the screen layout is restored, the phrase DMSXMD587I XEDIT: appears in the message area, and X E D I T n File(s) appears in the status area of the screen. (If you did not type in new lines while in input mode, you can return to edit mode by pressing ENTER once.)
  3. You can vary the size of the input zone by using the SET CURLINE subcommand to change which line on the screen is the current line. For a larger input zone, move the current line to the top of the screen; for a smaller input zone, move the current line lower on the screen.

    If you move the current line to the last available line in the file area, you cannot enter data unless you also move the command line (by using the SET CMDLINE subcommand). In general, you should leave space between the current line and the bottom of the screen for input mode.

  4. If you issue an INPUT subcommand when the current line is the End of File line, the lines are inserted after the last file line.
  5. When you use PF or PA keys in input mode, the editor automatically exits from input mode, enters edit mode to execute the subcommand associated with the PF or PA key, and returns to input mode. Therefore, you should carefully select which PF or PA keys you use in input mode. For example, if you press a PF key assigned to the FORWARD subcommand, the editor scrolls the screen forward and then returns you to input mode, but the input area will be on the next screen. In addition, some PF or PA keys are meaningless when used in input mode, for example, a PF key assigned to the ? subcommand.

    PF or PA keys particularly useful in input mode are those assigned to TABKEY, SPLTJOIN (or SPLIT and JOIN), NULLKEY, and RGTLEFT.

  6. On a typewriter terminal:
    1. Pressing RETURN causes any line typed in to be inserted into the copy of the file kept in storage.
    2. If SET IMAGE ON is in effect, tabs are converted to blanks before a line is inserted into the file.
    3. The editor interprets a line that has an escape character in column 1 (see SET ESCAPE) as an XEDIT subcommand. The subcommand is executed and input mode is reentered automatically. (You cannot use SET ESCAPE on a terminal in DISPLAY mode.)
    4. Enter a null line to leave input mode and return to edit mode.
  7. If SET HEX ON is in effect, the line can be specified in hexadecimal. For example, INPUT X'C1C2C3'.
  8. When you enter the INPUT subcommand with text specified (that is, in the form INPUT line) and SET SPILL OFF is in effect (the default), characters entered beyond the truncation column are truncated. If SET SPILL ON or SET SPILL WORD is in effect, characters entered beyond the truncation column are inserted in the file as one or more new lines, starting with the first character or word that would have gone beyond the truncation column.

    When you enter the INPUT subcommand with no text specified (that is, in the form INPUT) and input mode is entered, data is handled as described in the line operand description.

  9. If you enter the LINEND symbol while in input mode and press ENTER, your line is not entered as separate lines in the file. Instead, it is shown as a string with the LINEND symbol appearing literally.
  10. When you are at the end of file (or end of range), and you enter the INPUT subcommand, the last line of the file (or range) is displayed as the current line, even if that line is not within the defined scope.
  11. If you have defined multiple logical screens with the SET SCREEN subcommand, entering input mode causes subcommands entered on other logical screens either to:
    1. Be ignored, if the screen contains a view of the same file
    2. Remain on the command line and not execute until input mode is exited, if the screen contains a view of a different file

Messages and Return Codes

503E
{Truncated|Spilled} [RC=3]
557S
No more storage to insert lines [RC=4]
614E
Screen modifications lost. See SET FULLREAD ON to use PA keys safely [RC=8]

where return codes are:

0
Normal
3
Truncated or spilled
4
No more space available to add lines
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
8
Modifications lost because PA key pressed when message pending