HP 3000 Manuals

Data Division (cont) [ COBOL/HP-UX Language Reference for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Language Reference for the Series 700 and 800

Data Division (cont) 

Syntax Rules 

1.   The OVERLINE clause can be used with a screen item.

2.   If the OVERLINE clause is specified at group level, it applies to
     all suitable subordinate elementary items.

3.   If this clause is used on a system that does not support overlining
     it has no effect.

General Rule 

The OVERLINE clause causes every character of the screen item to have a
horizontal line above it when the item appears on the screen.
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The PICTURE Clause in the Screen Section                              |
|                                                                      |
|Function                                                              |
|                                                                      |
|The PICTURE clause describes the length, general characteristics and  |
|editing requirements of a screen item.  The FROM, TO and USING phrases|
|identify the source of data for display and the destination of data   |
|accepted.                                                             |
________________________________________________________________________

            

General Format 

	       Click here to view figure.
            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The PICTURE clause can include any standard editing characters.  |
|                                                                      |
|2.   Each PICTURE clause must contain either a FROM, TO or USING      |
|     phrase.                                                          |
|                                                                      |
|3.   PIC is an abbreviation for PICTURE.                              |
|                                                                      |
|4.   The USING phrase is equivalent to the TO and FROM phrases, both  |
|     specifying the same identifier.                                  |
|                                                                      |
|5.   The PICTURE clause is allowed only with elementary items.        |
|                                                                      |
|6.   The identifier in the FROM, TO or USING phrase can be qualified. |
|     If no OCCURS clause applies to the screen item, then this        |
|     identifier can be subscripted or indexed.  It must be defined in |
|     the File, Working-Storage, Local-Storage, (MF) or Linkage Section|
|     of the program.                                                  |
|                                                                      |
|7.   The PICTURE clause need not be the same as the PICTURE clause of |
|     the data item referenced in the FROM, TO or USING clause but it  |
|     must be such that the implied MOVE is legal.                     |
|                                                                      |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|General Rules                                                         |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The character-string describes the length and category of the    |
|     screen item.  It is used in the same way as the character-string |
|     in the PICTURE clause for a data item.                           |
|                                                                      |
|2.   Executing a DISPLAY statement on a screen item whose description |
|     includes a FROM or USING phrase moves data from the associated   |
|     data item to the screen item, and then displays the screen item  |
|     on the screen.                                                   |
|                                                                      |
|3.   Executing an ACCEPT statement on a screen item whose description |
|     includes a TO or USING phrase accepts operator-keyed data into   |
|     the screen item, and then moves that data to the associated data |
|     item.                                                            |
|                                                                      |
|4.   It is recommended that every numeric screen item either be a     |
|     numeric-edited item or contain only 9's in its PICTURE clause.   |
|     Editing and de-editing are applied as necessary when data is     |
|     moved to or from the associated data item.                       |
|                                                                      |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The PROMPT Clause                                                     |
|                                                                      |
|Function                                                              |
|                                                                      |
|The PROMPT clause causes the empty character positions in the screen  |
|item to be marked on the screen during an ACCEPT operation while      |
|the system is ready to accept operator-keyed data into that           |
|item.                                                                 |
________________________________________________________________________

            

General Format 

	       Click here to view figure.
            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   This clause is allowed only with input and update fields and with|
|     group items.                                                     |
|                                                                      |
|2.   If this clause is specified at group level, it applies to all    |
|     subordinate elementary items.                                    |
|                                                                      |
|3.   Identifier-1 must be a single-character alphabetic or            |
|     alphanumeric data item.                                          |
|                                                                      |
|4.   Identifier-1 must not be subject to an OCCURS clause.            |
|                                                                      |
|5.   Literal-1 must be a one-character nonnumeric literal or a        |
|     figurative constant.                                             |
|                                                                      |
|                                                                      |
|General Rules                                                         |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   If the CHARACTER phrase is not specified, the PROMPT clause is   |
|     documentary only.                                                |
|                                                                      |
|2.   The CHARACTER phrase specifies a prompt character to be used for |
|     marking empty character positions.  The prompt character         |
|     overrides the configured option.  (See your COBOL System         |
|     Reference for details on configuration options.)                 |
|                                                                      |
|3.   The PROMPT clause causes the prompt character to replace trailing|
|     spaces in alphanumeric or free-format numeric screen items.      |
|     It also causes the prompt character to replace leading           |
|     suppressed digit positions in fixed-format numeric-edited screen |
|     items.                                                           |
|                                                                      |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|4.   The PROMPT clause has no effect on fixed-format, non-edited      |
|     numeric screen items or numeric-edited screen items that have no |
|     zero-suppression positions.                                      |
|                                                                      |
|5.   This clause has no effect if the SECURE clause is specified.     |
|                                                                      |
|6.   The prompt characters appearing in the screen item are changed to|
|     spaces upon termination of the ACCEPT operation.                 |
|                                                                      |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The PROTECT Clause                                                    |
|                                                                      |
|Function                                                              |
|                                                                      |
|The PROTECT clause specifies that input to an ACCEPT item is to be    |
|prevented.                                                            |
|                                                                      |
|General Format                                                        |
|                                                                      |
|     PROTECT                                                          |
|                                                                      |
|Syntax Rule                                                           |
|                                                                      |
|The PROTECT clause may be specified only for an elementary screen     |
|description entry.                                                    |
|                                                                      |
|General Rule                                                          |
|                                                                      |
|The PROTECT clause specifies that input to an ACCEPT item is to be    |
|prevented.                                                            |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The REQUIRED Clause                                                   |
|                                                                      |
|Function                                                              |
|                                                                      |
|The REQUIRED clause specifies that the operator must not leave the    |
|screen item empty.                                                    |
________________________________________________________________________

            

General Format 

	       Click here to view figure.
            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The REQUIRED clause is allowed only with input and update fields |
|     and with group items.                                            |
|                                                                      |
|2.   This clause can be specified on a group screen item, in which    |
|     case it applies to all suitable elementary items which are       |
|     subordinate to that item.                                        |
|                                                                      |
|3.   REQUIRED and EMPTY-CHECK are equivalent.  (MF)                   |
|                                                                      |
|                                                                      |
|General Rules                                                         |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The REQUIRED clause takes effect during the execution of any     |
|     ACCEPT statement that causes the screen item to be accepted      |
|     provided the cursor enters the screen item at some time during   |
|     the ACCEPT. Unless this clause is satisfied, terminator          |
|     keystrokes are rejected and the cursor is repositioned to the    |
|     beginning of the item.                                           |
|                                                                      |
|2.   To satisfy this clause, alphanumeric screen items must contain at|
|     least one non-space, non-prompt character; numeric screen items  |
|     must have a non-zero value.                                      |
|                                                                      |
|3.   For update fields, the REQUIRED clause can be satisfied by       |
|     initial data as well as by operator-keyed data.                  |
|                                                                      |
|4.   The REQUIRED clause can not be effective if a function key is    |
|     used to terminate an ACCEPT operation.  (See your COBOL System   |
|     Reference for details on configuration options.)                 |
|                                                                      |
|5.   An error message can be configured for display on the screen if  |
|     the REQUIRED clause is not satisfied.  (See your COBOL System    |
|     Reference for details on configuration options.)                 |
|                                                                      |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The REVERSE-VIDEO Clause                                              |
|                                                                      |
|Function                                                              |
|                                                                      |
|The REVERSE-VIDEO clause causes the screen item to be displayed in    |
|reverse-video.                                                        |
|                                                                      |
|General Format                                                        |
|                                                                      |
|     REVERSE-VIDEO                                                    |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The REVERSE-VIDEO clause is allowed with any screen item.        |
|                                                                      |
|2.   If the REVERSE-VIDEO clause is specified at group level, it      |
|     applies to all suitable subordinate elementary items.            |
|                                                                      |
|                                                                      |
|General Rule                                                          |
|                                                                      |
|The REVERSE-VIDEO clause causes the screen item to be displayed in    |
|reverse-video.                                                        |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The SECURE Clause                                                     |
|                                                                      |
|Function                                                              |
|                                                                      |
|The SECURE clause prevents operator-keyed data from appearing on the  |
|screen.                                                               |
________________________________________________________________________

            

General Format 

	       Click here to view figure.
            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The SECURE clause is allowed only with input and update          |
|     fields.                                                          |
|                                                                      |
|2.   This clause can be specified on a group screen item, in which    |
|     case it applies to all suitable elementary items which are       |
|     subordinate to that item.                                        |
|                                                                      |
|3.   SECURE and NO-ECHO are equivalent.                               |
|                                                                      |
|                                                                      |
|General Rule                                                          |
|                                                                      |
|When the SECURE clause is specified for input fields, only spaces and |
|the cursor appear in the screen item.  For update fields, the         |
|original contents of the field will be displayed, but cannot be       |
|altered.                                                              |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The SIGN Clause in the Screen Section                                 |
|                                                                      |
|Function                                                              |
|                                                                      |
|The SIGN clause specifies the position and representation of the      |
|operational sign.                                                     |
________________________________________________________________________

            

General Format 

	       Click here to view figure.
            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The SIGN clause is allowed only with input, output and update    |
|     fields whose pictures contain the character "S".                 |
|                                                                      |
|2.   This clause is allowed only with elementary items.               |
|                                                                      |
|                                                                      |
|General Rule                                                          |
|                                                                      |
|It is recommended that the SEPARATE option be used when the SIGN      |
|clause is specified in a screen description.  If the SEPARATE option  |
|is not specified, a sign denoted by "S" in a PICTURE clause appears as|
|an overpunch.                                                         |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The SIZE Clause                                                       |
|                                                                      |
|Function                                                              |
|                                                                      |
|The SIZE clause specifies the current size of the screen item.        |
________________________________________________________________________

            

General Format 

	       Click here to view figure.
            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The SIZE clause is allowed only with elementary screen           |
|     items.                                                           |
|                                                                      |
|2.   Identifier-1 must be an unsigned numeric integer and must not be |
|     subject to an OCCURS clause.                                     |
|                                                                      |
|3.   Integer-1 must be unsigned.                                      |
|                                                                      |
|                                                                      |
|General Rules                                                         |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The SIZE clause has no effect if the size specified is           |
|     zero.                                                            |
|                                                                      |
|2.   If the SIZE clause is specified for a numeric or numeric-edited  |
|     screen item and the size specified is not zero, the screen item  |
|     is treated as though it were free-format.  This overrides the    |
|     setting of the configuration option.                             |
|                                                                      |
|3.   If the size specified in the SIZE clause is less than that       |
|     implied by the associated PICTURE or VALUE clause, only the      |
|     left-hand portion of the screen item appears on the screen.  If  |
|     the JUSTIFIED clause is present, then only the right-hand        |
|     portion of the screen item appears.  The remainder of the        |
|     screen item can be considered to contain spaces or zeros, as     |
|     appropriate.                                                     |
|                                                                      |
|4.   If the size specified in the SIZE clause is greater than         |
|     that implied by the PICTURE or VALUE clause for output or        |
|     literal fields, the screen item is padded on the right with      |
|     spaces.                                                          |
|                                                                      |
|5.   Changing the value in identifier-1 alters the effective size of  |
|     the screen item at run-time.  This can alter the screen positions|
|     of items whose descriptions follow it in the Screen Section.     |
|     (See the sections The LINE Clause and The COLUMN Clause earlier  |
|     in this chapter.)                                                |
|                                                                      |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The UNDERLINE Clause Function                                         |
|                                                                      |
|The UNDERLINE clause causes the screen item to be underlined when it  |
|appears on the screen.                                                |
|                                                                      |
|General Format                                                        |
|                                                                      |
|     UNDERLINE                                                        |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The UNDERLINE clause is allowed with any screen item.            |
|                                                                      |
|2.   If the UNDERLINE clause is specified at group level, it applies  |
|     to all suitable subordinate elementary items.                    |
|                                                                      |
|3.   This clause has no effect if your screen hardware does not       |
|     support underline.                                               |
|                                                                      |
|                                                                      |
|General Rule                                                          |
|                                                                      |
|The UNDERLINE clause causes the screen item to be underlined when it  |
|appears on the screen.                                                |
________________________________________________________________________

            
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|The VALUE Clause in the Screen Section Function                       |
|                                                                      |
|The VALUE clause specifies literal information for display on the     |
|Screen                                                                |
|                                                                      |
|General Format                                                        |
|                                                                      |
|     [VALUE IS] literal-1                                             |
|                                                                      |
|Syntax Rules                                                          |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The literal associated with the VALUE clause must be nonnumeric. |
|     It cannot be a figurative constant.                              |
|                                                                      |
|2.   The VALUE clause is allowed only with elementary items that have |
|     no PICTURE clause.                                               |
|                                                                      |
|                                                                      |
|General Rule                                                          |
|                                                                      |
|The VALUE clause specifies literal information for display on the     |
|screen.                                                               |
________________________________________________________________________

            

The ZERO-FILL Clause 
________________________________________________________________________
|(MF) (XOPEN)                                                          |
|                                                                      |
|Function                                                              |
|                                                                      |
|The ZERO-FILL clause causes trailing prompt characters to be replaced |
|by zeros instead of spaces.                                           |
|                                                                      |
|General Format                                                        |
|                                                                      |
|     ZERO-FILL                                                        |
|                                                                      |
|Syntax Rule                                                           |
|                                                                      |
|This clause is allowed only with input and update fields that are     |
|alphabetic or alphanumeric.                                           |
|                                                                      |
|General Rules                                                         |
|                                                                      |
|                                                                      |
|                                                                      |
|1.   The ZERO-FILL clause causes trailing prompt characters           |
|     to be replaced by zeros instead of spaces when data is           |
|     moved from the screen item to the receiving item.  This          |
|     occurs only if the operator enters data into the screen          |
|     item.                                                            |
|                                                                      |
|2.   If the receiving item has a JUSTIFIED clause, the ZERO-FILL      |
|     clause causes leading positions left vacant by justification to  |
|     be zero-filled.                                                  |
|                                                                      |
________________________________________________________________________

            



MPE/iX 5.0 Documentation