HP 3000 Manuals

File Section (Continued) [ Micro Focus COBOL Language Reference ] MPE/iX 5.0 Documentation


Micro Focus COBOL Language Reference

File Section (Continued) 

For MF and XOPEN only:  The BLANK WHEN ZERO Clause in the Screen Section 

Function.   

The BLANK WHEN ZERO clause causes the blanking of a screen item when its
value is zero.

General Format.   

[]
Syntax Rule. This clause is allowed only with input, output and update fields that are numeric or numeric edited. General Rules. 1. The BLANK WHEN ZERO clause causes the blanking of a screen item when its value is zero. 2. This clause has no effect when the cursor is in the field. That is, the contents of the field are always displayed, even if zero, if this is the current input field. For MF and XOPEN only: The BLINK Clause Function. The BLINK clause causes the screen item to blink when it appears on the screen. General Format.
[]
Syntax Rules. 1. The BLINK clause is allowed with any screen item. 2. If the BLINK clause is specified at group level, it applies to all suitable subordinate elementary items. General Rule. The BLINK clause causes the screen item to blink when it appears on the screen. For MF and XOPEN only: The COLUMN Clause Function. The COLUMN clause specifies the column at which the screen item starts on the screen. General Format.
[]
Syntax Rules. 1. Identifier-1 must be an unsigned numeric integer and must contain a value greater than zero and less than 256. 2. Integer-1 must be unsigned, greater than zero and less than 256. 3. For MF only: PLUS and "+" are equivalent. 4. Omitting the NUMBER option results in a default value of +1. 5. COLUMN 1 is assumed for screen descriptions which specify the LINE clause but omit the COLUMN clause. 6. The COLUMN clause can be specified with any elementary item. 7. For MF only: COL is an abbreviation for COLUMN. 8. For MF only: When the COLUMN clause is specified anywhere within the hierarchy of a SCREEN SECTION group item, then at least one of the following clauses must also be specified within the same group definition: BEEP, BELL, BLANK LINE, BALNK SCREEN, ERASE EOL, ERASE EOS, FROM, TO, USING, or VALUE. General Rules. 1. The COLUMN clause specifies the column in which the screen item is to appear on the screen in an ACCEPT or DISPLAY operation. 2. If the COLUMN clause has an identifier or an integer but does not specify PLUS, "+" or "-", the clause gives an absolute column number within the screen record. Each 01 level represents a screen record. The AT phrase of the ACCEPT and DISPLAY statements specifies the positioning of the screen record relative to the start of the display screen. If the AT phrase is not specified, then column 1 is the first column on the screen. 3. If PLUS, "+" or "-"(MF only) is specified in the COLUMN clause, then the column number within the screen record is relative to that at which the preceding screen item ends, regardless of whether or not the statement displays the preceding item on the screen. This depends on the current effective length of that item at run time, derived from its PICTURE, VALUE and SIZE clauses. The counting of column numbers restarts at a level 01 item at column 1. 4. If a screen description contains neither a LINE or COLUMN clause, and the item is not a level 01 item, COLUMN+1 is assumed. The item then starts immediately following the preceding item in the Screen Section. 5. If a COLUMN position that is specified is off the screen, wraparound is to the next (or previous) line. For MF only: The CONTROL Clause Function. The CONTROL clause allows attributes associated with a Screen Section item to be defined at run time. General Format.
[]
Syntax Rules. 1. This clause is allowed with any screen item. 2. If this clause is specified at group level, it applies to all elementary subordinate items. 3. Identifier-1 must be an alphanumeric data item. The maximum permitted size of the item is PIC X(65535). 4. Attributes specified in identifier-1 override any statically defined attributes. 5. CONTROL statements must not be nested. 6. Identifier-1 must not be subject to an OCCURS clause. 7. The PROTECT attribute may be specified only for an elementary screen description entry. General Rules. 1. The attributes which can be specified in the CONTROL clause are a subset of the screen attributes that can be specified elsewhere.
[]
2. If identifier-1 contains spaces, the statically defined attributes are used for any accept or display of the item. 3. The meaning of each of the attributes that can be specified within the CONTROL identifier-1 is defined in the following parts of this reference: a. Within the DATA DIVISION as an individual SCREEN SECTION CLAUSE * AUTO-SKIP/AUTO * BACKGROUND-COLOR/BACKGROUND-COLOUR * BELL/BEEP * BLANK LINE/SCREEN * BLINK * FOREGROUND-COLOR/FOREGROUND-COLOUR * FULL/LENGTH-CHECK * GRID * HIGHLIGHT * JUSTIFY/JUST * LEFTLINE * LOWLIGHT * OVERLINE * PROMPT * REQUIRED/EMPTY-CHECK * REVERSE-VIDEO * SECURE/NO-ECH0 * UNDERLINE * ZERO-FILL b. Within the PROCEDURE DIVISION in the ACCEPT statement General Rules: * RIGHT-JUSTIFY * TRAILING-SIGN * TRAILING c. Within this CONTROL clause discussion: * PROTECT 4. The PROTECT attribute specifies that input to an ACCEPT item is to be prevented. For MF and XOPEN only: The ERASE Clause Function. The ERASE clause clears part of the line or the screen starting at the cursor position. General Format.
[]
Syntax Rule. The ERASE clause can be specified only for elementary items. General Rules. 1. When ERASE EOL is specified, blanking begins at the line and column coordinates specified for the screen data element in whose description it is included and continues through the end of the line. 2. When ERASE EOS is specified, blanking begins at the line and column coordinates specified for the screen data element in whose description it is included and continues through the end of the screen. 3. If neither the BLANK nor the ERASE clause is specified, only the particular character positions corresponding to the screen data element are modified when the element is displayed. 4. The clause is ignored in an ACCEPT operation. For MF and XOPEN only: The FOREGROUND-COLOR Function. The FOREGROUND-COLOR clause specifies the foreground color of the screen item. General Format.
[]
Syntax Rules. 1. For MF only: FOREGROUND-COLOR and FOREGROUND-COLOUR are equivalent. 2. This clause is allowed with any screen item. 3. If this clause is specified at group level, it applies to all elementary subordinate items. 4. Integer-1 must be a value from 0 to 7. General Rules. 1. This clause is available for use only with a color screen. 2. Integer-1 or identifier-1 specifies the foreground color of the screen item. The colors and their corresponding values are: 0 black 1 blue 2 green 3 cyan 4 red 5 magenta 6 brown or yellow 7 white 3. If this clause is not specified, the foreground color defaults to white. 4. If a screen description contains a BLANK SCREEN clause, and either contains a FOREGROUND-COLOR clause or is subordinate to one that does, then when the screen item is displayed by a DISPLAY statement the specified color becomes the default foreground color. It remains the default foreground color until either another screen item with this combination of options is displayed (whether in the same DISPLAY statement or another), or a Format 3 DISPLAY statement with both options is executed. 5. If the HIGHLIGHT clause is also specified, foreground colors are brightened and lightened; for example on some hardware, black can become grey and brown can become yellow. However, this does not apply to the BLANK SCREEN clause. 6. Identifier-1 must be an unsigned numeric integer and should contain a value between 0 and 7. Any value higher than 7 will be divided by 8 and the remainder used as the color value. 7. Identifier-1 must not be subject to OCCURS clauses. 8. Whether a value of 6 in integer-1 or identifier-1 produces brown or yellow depends on the terminal hardware. For MF and XOPEN only: The FROM Clause Function. The FROM clause identifies the source of data for display. General Format.
[]
Syntax Rules. 1. The FROM clause, when used with the TO clause, is equivalent to the USING clause, both specifying the same identifier. It must not be used with the USING clause. 2. The identifier in the FROM clause can be qualified. If no OCCURS clause applies to the screen item, this identifier can be subscripted or indexed. It must be defined in the File, Working-Storage, Local-Storage, (MF only) or Linkage Section of the program. General Rules. Executing a DISPLAY statement on a screen item whose description includes a FROM clause moves data from the associated data item to the screen item, and then displays the screen item on the screen. For MF and XOPEN only: The FULL Clause Function. The FULL clause specifies that the operator must either leave the screen item completely empty or fill it entirely with data. General Format.
[]
Syntax Rules. 1. The FULL clause is valid only in input and update fields and group items. 2. If this clause is specified at group level, it applies to all suitable subordinate elementary items. 3. For MF only: FULL and LENGTH-CHECK are equivalent. General Rules. 1. The FULL clause is effective 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 operation. Until this clause is satisfied, terminator keystrokes are rejected. If the item is fixed format numeric edited, the cursor is repositioned to the decimal point position. 2. If the screen item is alphanumeric, in order to satisfy this clause either the entire item must contain only spaces or prompt characters, or both the first and last character positions must contain non-space, non-prompt characters. 3. If the screen item is free format numeric or free format numeric edited, then to satisfy the clause, either the resultant value must be zero, or both the first and last character positions must contain non-space, non-prompt characters. 4. If the screen item is fixed format numeric edited, then to satisfy the clause either the value must be zero or there must be no digit positions in which zero-suppression has taken effect. 5. The FULL clause has no effect on fixed format numeric or on numeric edited screen items that have no zero-suppression positions. 6. For update fields, the FULL clause can be satisfied by initial data as well as operator-keyed data. 7. The FULL clause cannot be effective if a function key is used to terminate the ACCEPT operation. (See your COBOL System Reference for details of configuration options.) 8. An error message can be configured for display on the screen if the FULL clause is not satisfied. (See your COBOL System Reference for details of configuration options.) For MF only: The GRID Clause Function. The GRID clause causes each character of the screen item to have a vertical line on its left-hand side when the item appears on the screen. Each line is within the character-position. General Format.
[]
Syntax Rules. 1. The GRID clause can be used with any screen item. 2. If the GRID 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 characters with vertical left-hand lines it has no effect. General Rule. The GRID clause causes each character of the screen item to have a vertical line on its left-hand side when the item appears on the screen. Each line is within the character-position. For MF and XOPEN only: The HIGHLIGHT Clause Function. The HIGHLIGHT clause causes the screen item to appear in high intensity mode when it appears on the screen. General Format.
[]
Syntax Rules. 1. This clause is valid for input, output, update or literal fields. 2. If the HIGHLIGHT clause is specified at group level, it applies to all suitable subordinate elementary items. General Rule. If the FOREGROUND-COLOR clause is also specified, the HIGHLIGHT clause causes the foreground colors to become brighter and lighter; for example on some hardware, black can become grey and brown can become yellow. However, this does not apply to the BLANK SCREEN clauses. For MF and XOPEN only: The JUSTIFIED Clause in the Screen Section Function. The JUSTIFIED clause specifies non-standard positioning of data within a screen item when data is either moved to it or entered into it. General Format.
[]
Syntax Rules. 1. JUST is an abbreviation for JUSTIFIED. 2. The JUSTIFIED clause is allowed only with input, output and update fields. General Rules. 1. If the screen item is an output or update field, when data is moved to it from the sending item, the JUSTIFIED clause is applied according to the normal rules for MOVE. 2. If the screen item is an input or update field, when the accepting of data into it has terminated, the JUSTIFIED clause causes the data entered to be moved right by the number of character positions occupied by prompt characters, and the left of the field to be padded with spaces. This is done before the data is moved to the receiving item. This does not occur if data is not entered. 3. If the screen item has a SECURE clause, the effect on the data is the same as it would be without the SECURE clause, but this effect does not appear on the screen. For MF only: The LEFTLINE Clause Function. The LEFTLINE clause causes the leftmost character of the screen item to have a vertical line on its left-hand side when the item appears on the screen. The line is within the character- position. General Format.
[]
Syntax Rules. 1. The LEFTLINE clause can be used with any screen item. 2. If the LEFTLINE 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 characters with vertical left-hand lines it has no effect. General Rule. The LEFTLINE clause causes the leftmost character of the screen item to have a vertical line on its left-hand side when the item appears on the screen. The line is within the character-position. For MF and XOPEN only: The LINE Clause Function. The LINE clause specifies the line at which the screen item starts on the screen. General Format.
[]
Syntax Rules. 1. Identifier-1 must be an unsigned numeric integer and must contain a value greater than zero and less than 256. 2. Integer-1 must be unsigned, greater than zero and less than 256. 3. For MF only: PLUS and "+" are equivalent. 4. Omitting the NUMBER option results in a default value of +1. 5. The current line is assumed for screen descriptions which omit the LINE clause. 6. The LINE clause can be specified with any elementary item. 7. For MF only: When the LINE clause is specified anywhere within the hierarchy of a SCREEN SECTION group item, then at least one of the following clauses must also be specified within the same group definition: BEEP, BELL, BLANK LINE, BLANK SCREEN, ERASE EOL, REASE EOS, FROM, TO, USING, or VALUE. General Rules. 1. The LINE clause specifies the line on which the screen item is to appear on the screen in an ACCEPT or DISPLAY operation. 2. If the LINE clause has an identifier-1 or an integer-1 but does not specify PLUS, "+" or "-" (MF only), the clause gives an absolute line number within the screen record. Each 01 level represents a screen record. The AT phrase of the ACCEPT and DISPLAY statements specifies the positioning of the start of the screen record relative to the start of the display screen. If the AT phrase is not specified, then line 1 is the first line on the screen. 3. If PLUS, ,"+" or "-" (For MF only) is specified in the LINE clause, then the line number is relative to that at which the preceding screen item ends, regardless of whether or not the statement displays the preceding item on the screen. This depends on the current effective length of that item at run time, derived from its PICTURE, VALUE and SIZE clauses. The counting of line numbers restarts at a level 01 item at line 1. 4. If a Screen Description contains neither a LINE or COLUMN clause, and the item is not a level 01 item, COLUMN +1 is assumed. The item then starts immediately following the preceding item in the screen section. 5. If a LINE position that is specified is off the screen, the ACCEPT or DISPLAY is truncated. 6. If PLUS, "+" or "-" (MF only) is specified in the LINE clause, and an ACCEPT or DISPLAY statement referencing the Screen Section item includes the AT LINE NUMBER phrase, the line number at which this item is presented is the sum or difference of the two numbers.


MPE/iX 5.0 Documentation