PICTURE FROM TO and USING Clauses

These Screen Section clauses describe the format, storage, and action of a screen data field.

General Format

[ {PICTURE} IS picture-string  ]
  {PIC    }

[ [ FROM out-item ] [ TO in-item ]  ]
[       USING update-item           ]

Syntax Rules

  1. See IS EXTERNAL-FORM Clause for rules for the Screen Section PICTURE clause.
  2. If the PICTURE clause is specified, then a VALUE clause may not be specified.
  3. out-item is a literal or an identifier referencing a data item in the File, Working-Storage, or Linkage sections. out-item may be subscripted and reference modified.
  4. in-item and update-item are identifiers referencing data items in the File, Working-Storage, or Linkage sections. These items may be subscripted and reference modified.
  5. in-item, out-item and update-item must be such that a MOVE specified between them and the screen entry is legal according to the rules of the MOVE statement.

General Rules

  1. Because of the difficulty in viewing the internal storage of certain classes of numeric items, you should avoid using the picture symbol V in a screen entry. If you use the picture symbol S, you should also specify the SIGN SEPARATE clause. Alternately, you can use a numeric edited screen entry to display these types of data items in a sensible format.
  2. A screen entry specifying the FROM phrase is an output field. A screen entry specifying the TO phrase is an input field. A screen entry specifying both the FROM and TO phrases is an update field.
  3. A screen entry with the USING phrase is equivalent to a screen entry specifying both the FROM and TO phrases referencing the same data item.
  4. When a DISPLAY verb executes, each output and update field referenced is sent to the screen. When this occurs, each out-item and update-item is first moved to the corresponding screen entry using the standard rules of the MOVE statement. These fields are then displayed on the user's screen.
  5. Input fields are initialized when a DISPLAY verb executes. Numeric and numeric-edited fields have ZERO moved to them, all other fields have SPACES moved to them. These moves occur using the standard rules of the MOVE statement. The appearance of input fields on the screen when a DISPLAY verb executes is configurable by various runtime options. Note that the screen entry is initialized; the corresponding in-item or update-item is not.
  6. When an ACCEPT verb executes, each input and update field referenced is input by the user. After the user is done, each screen entry is moved to the corresponding in-item or update-item using the standard rules of the MOVE statement.
  7. If the PICTURE phrase is omitted, then the screen entry derives its PICTURE from the in-item, out-item, or update-item specified. The derived PICTURE is identical to the PICTURE for the specified item. If both in-item and out-item are specified, then the PICTURE is derived from out-item. Note that only the PICTURE is derived; other clauses such as the SIGN clause are not inherited.