MFXOPEN 

Screen Section Entry Skeleton

A Screen Description entry specifies the attributes, behavior, size and location for a referenced screen item which is accepted or displayed at run time.

The availability of screen attributes is dependent on your terminal hardware and operating system and COBOL run-time support.

MF The following are not a part of X/Open screen handling:

  • ACCEPT (Formats 3 and 5)
  • AUTO-SKIP (synonym for AUTO)
  • BEEP (synonym for BELL)
  • COL (synonym for COLUMN)
  • CONTROL
  • DISPLAY (Format 3)
  • EMPTY-CHECK (synonym for REQUIRED)
  • GRID
  • LEFTLINE
  • LENGTH-CHECK (synonym for FULL)
  • NO-ECHO (synonym for SECURE)
  • OCCURS
  • OVERLINE
  • PROMPT
  • SIZE
  • ZERO-FILL

General Format


Syntax for the general format of the Screen Section

Syntax Rules

  1. Each Screen Description entry must start with a level number from 01 through 49.
  2. Each level 01 item must have a screen-name.
  3. Screen-name must immediately follow level number and conform to the rules for user-defined names.
  4. A screen item can be referenced only in a Format 4 ACCEPT or Format 2 DISPLAY statement.
  5. Each elementary screen item must contain at least one of the following clauses: BELL, BLANK LINE, BLANK SCREEN, COLUMN, LINE, PICTURE, VALUE.
  6. The data items in the FROM, TO and USING phrases are associated with the screen item. The USING phrase is equivalent to the combination of a FROM and TO phrase, each specifying the same field.
  7. An ACCEPT can be executed on a group screen item containing screen items with FROM or VALUE phrases only if that group also contains screen items with TO or USING phrases.
  8. The clauses following screen-name can be specified in any order.
  9. A clause that appears in the description of a group screen item applies to all the elementary subordinate items in that group in whose descriptions it would be allowed.
  10. Any non-01 level screen item can have a data name, FILLER, or no name. If no name is used, then FILLER is assumed (and the item can never be explicitly referenced).
  11. If the same clause is specified more than once for the same screen item, the clause which appears at the lowest level within the hierarchy is the one which takes effect.
  12. Table 1 summarizes the screen description entry clauses available in the Screen Section for use with different types of screen fields

    MF and the WITH phrase options for use with the ACCEPT and DISPLAY statements.

    Table 1. Permitted Use of Options
    Screen Description Entry Clauses/ WITH Phrases Screen Section MF WITH Phrase
    Input Field Output Field Update Field Literal Field ACCEPT DISPLAY
    AUTO X   X   X  
    BACKGROUND-COLOR X X X X X X
    BELL X X X X X X
    BLANK X X X X   X
    BLANK WHEN ZERO X X X      
    BLINK X X X X X X
    COLUMN X X X X    
    ERASE X X X X X  
    FOREGROUND-COLOR X X X X X X
    FULL X   X   X  
    GRID X X X X X X
    HIGHLIGHT X X X X X X
    JUSTIFIED X X X      
    LEFT-JUSTIFY         X  
    LEFTLINE X X X X X X
    LINE X X X X    
    LOWLIGHT X X X X X X
    OCCURS X X X      
    OVERLINE X X X X X X
    PROMPT X   X   X  
    REQUIRED X   X   X  
    REVERSE-VIDEO X X X X X X
    RIGHT-JUSTIFY         X  
    SECURE X   X   X  
    SIGN X X X      
    SIZE X X X X X X
    SPACE-FILL         X  
    TRAILING-SIGN         X  
    UNDERLINE X X X X X X
    UPDATE         X  

    Key:

    X Clause or option allowed
    Input field Screen item whose description contains a TO phrase
    Output field Screen item whose description contains a FROM phrase
    Update field Screen item whose description contains a USING phrase
    Literal field Elementary screen item whose description contains no PICTURE clause.

General Rules

  1. Screen-name assigns a name to the screen item described in the screen description.
  2. Screen descriptions define areas on the screen. Each entry consists of a level number, an optional screen-name, and various optional clauses relating to the positioning of fields as well as to console functions.
  3. When the screen item is displayed, data is taken from the literal or data item named in the associated FROM or USING phrase. Items with the TO phrase only are treated as though FROM SPACE or FROM ZERO were specified, depending on the type of screen item.
  4. When the screen item is accepted, the data entered is moved from the screen to the data item named in the TO or USING phrase. Depending on the category of the item, conversion and de-editing are done if necessary.
  5. An input field is a screen item whose description contains a TO phrase.
  6. An output field is a screen item whose description contains a FROM phrase.
  7. An update field is a screen item whose description contains a USING phrase.
  8. A literal field is an elementary screen item whose description contains no PICTURE clause.
  9. An ACCEPT of a group screen item consists of accepting those elementary subordinate items that are input or update fields. They are accepted in the order their descriptions appear in the Screen Section at the screen positions indicated by the screen descriptions. Unless otherwise specified in the CURSOR IS clause (see the topic The Special-Names Paragraph in the chapter Environment Division), the cursor is initially positioned at the start of the first item. As the ACCEPT operation into each item is terminated, the cursor moves to the start of the next item.
  10. A DISPLAY of a group screen item consists of displaying those elementary subordinate items that are output, update or literal fields. They are displayed simultaneously at the screen positions indicated by the screen descriptions.
  11. If the length of an ACCEPT or DISPLAY screen item exceeds the length of the current line, wraparound is to the next line.
  12. If a screen item is too large to fit within the physical screen, truncation occurs at the first character that is off-screen for output fields and alphanumeric input and update fields, and at the first field that is off-screen for numeric and numeric edited input and update fields.