skip to main content

Environment Division : CONFIGURATION Section : SPECIAL-NAMES Paragraph

SPECIAL-NAMES Paragraph
The SPECIAL-NAMES Paragraph contains definitions to be used by the program. The meaning of each definition is described below.
General format
      [ OFF STATUS IS Condition-Name-2 ] ] ...
    [ ALPHABET Alphabet-Name-1 IS { { Literal-1 [ { {THROUGHLiteral-2    } ] } ... } ] ...
    [ CLASS Class-Name-1 IS { Literal-4 [ {THROUGHLiteral-5 } ... ] ] ...
    [ CONSOLE IS CRT ]
    [ CRT STATUS IS Crt-Status ]
    [ CURRENCY SIGN IS Literal-6 ]
    [ DECIMAL-POINT IS COMMA ] 
    [ CURSOR IS cursor-name ]  
    [ EVENT OBJECT IS Class-Name-2 ]
    [ EVENT SOURCE IS Object-Reference ]
    [ EVENT STATUS IS Event-Status ]
    [ SCREEN CONTROL IS Screen-Control ]
    [ SYMBOLIC CHARACTERS {Symbolic-Character} ... [{IS } ] {Literal-7} ... ]. ]
    [ ENVIRONMENT-NAME IS Mnemonic-Name ]
    [ ENVIRONMENT-VALUE IS Mnemonic-Name ]
    [ NUMERIC SIGN IS TRAILING SEPARATE ]
    [ CSP IS Name ]
    [ C01 IS Name ]    [ C02 IS Name ]  ...  [ C12 IS Name ]
    [ SYSIN IS SystemName ]
    [ SYSOUT IS SystemName ]
    [ SYSERR IS SystemName ]
    [ SYSOUT-FLUSH IS SystemName ]
    [ SYSERR IS SystemName ]
    [ { SYSLST  } IS SystemName ]
      { SYSLIST }
Syntax rules
1.
Switch-Name can be one of the following:
a.
b.
SWITCH followed by a Letter from "A" to "Z" (bounded by quotation marks)
c.
2.
Alphabet-Name-1, Alphabet-Name-2, Class-Name-1, Class-Name-2, Condition-Name-1, Condition-Name-2, Event-Status, Mnemonic-Name, Object-Reference, Screen-Control and Symbolic-Character are User-defined words, as defined in the Definitions section in the Preface of this document.
3.
Literal-1, Literal-2, Literal-3, Literal-4, Literal-5, Literal-6 and Literal-7 are Literals, as defined in the Definitions section in the Preface of this document.
4.
Crt-Status is an unsigned integer Numeric Data Itemor a group Data Item.
5.
Class-Name-2 is a Data Item that must refer to a class for object handling.
6.
Object-Reference is a Data Item that must refer to a class.
7.
Event-Status is a Data Item whose structure must match the structure of the data item event-status defined in iscrt.def.
8.
Screen-Control is a Data Item whose structure must match the structure of the data item screen-control defined in iscrt.def.
General Rules
1.
Mnemonic-Name can be used in the SET Statement to alter the status of Switch-Name.
2.
Condition-Name-1 and Condition-Name-2 can be used in a conditional expression to test the status of Switch-Name. Condition-Name-1 is true when Switch-Name status is ON, Condition-Name-2 it is OFF.
3.
a.
b.
4.
if Literal-1 is specified, Alphabet-Name-1 will refer to a collating sequence.
a.
b.
When Literals here specified are Integers, they represent the ordinal number of a character within the native character set
c.
When they are Nonnumeric Literals, each character in the literal, starting with the leftmost character, is assigned successive ascending positions in the collating sequence being specified
d.
e.
If the THROUGH phrase is specified, the set of contiguous characters in the native character set beginning with the character specified by the value of Literal-1, and ending with the character specified by the value of Literal-2, is assigned a successive ascending position in the collating sequence being specified. In addition, the set of contiguous characters specified by a given THROUGH phrase may specify characters of the native character set in either ascending or descending sequence.
f.
If the ALSO phrase is specified, the characters of the native character set specified by the value of Literal-1 and Literal-3 are assigned to the same ordinal position in the collating sequence being specified or in the character code set that is used to represent the data. If Alphabet-Name-1 is referenced in a SYMBOLIC CHARACTERS clause, only Literal-1 is used to represent the character in the native character set.
5.
The character that has the highest ordinal position in the program collating sequence is associated with the figurative constant HIGH-VALUE, except when this figurative constant is specified as a literal in the SPECIAL-NAMES paragraph. If more than one character has the highest position in the program collating sequence, the last character specified is associated with the figurative constant HIGH-VALUE.
6.
The character that has the lowest ordinal position in the program collating sequence is associated with the figurative constant LOW-VALUE, except when this figurative constant is specified as a literal in the SPECIAL-NAMES paragraph. If more than one character has the lowest position in the program collating sequence, the first character specified is associated with the figurative constant LOW-VALUE.
7.
When specified as literals in the SPECIAL-NAMES paragraph, the figurative constants HIGH-VALUE and LOW-VALUE are associated with those characters having the highest and lowest positions, respectively, in the native collating sequence.
8.
When the CLASS phrase is specified, Class-Name-1 consists if the exclusive set of characters defined by Literal-4 and, optionally, Literal-5.
a.
If Literal-4 and Literal-5 are Integers, they represent the ordinal number of a character within the native character set.
b.
If the THROUGH phrase is specified, the contiguous characters in the native character set beginning with the character specified by the value of Literal-4, and ending with the character specified by the value of Literal-5, are included in the set of characters identified by Class-Name-1. In addition, the contiguous characters specified by a given THROUGH phrase may specify characters of the native character set in either ascending or descending sequence.
9.
When the CONSOLE phrase is specified, all ANSI-style DISPLAY Statements will send information to the screen instead of sending them to the default output channel.
10.
When the CRT STATUS phrase is specified, the value of the data item identified by Crt-Status will be updated with the last Exception or Termination value. If Crt-Status is defined as a group Data Item, it must have the following structure.
The first two fields are set as follows:
If CRT-KEY-1 is "1", then CRT-KEY-2 contains the exception key value of the key that was pressed.
The third character always contains the same value that is returned by the CONTROL KEY phrase of the ACCEPT statement, if this value is in the range of 0 to 255. This is the same value returned when Crt-Status refers to a numeric data item instead of a group item.
When CRT-KEY-1 is set to "0", a normal termination has occurred. Any other value indicates an exception condition.
11.
When the CURRENCY phrase is specified, Literal-6 represents the currency symbol to be used in the PICTURE clause, in place of the default "$". The literal must be nonnumeric and is limited to a single character. It may be any character from the native character set except one of the following:
a.
b.
c.
 
If Literal-6 is of class national, the associated currency symbol may be used only to define a numeric-edited item with usage national. However in some cases non-national currency symbol can be correctly displayed even when used with plain usage display items, whether the OS uses an 8-bit codepage and the currency character is included in it.
12.
When the DECIMAL-POINT phrase is specified, the functions of comma and period are exchanged in the character-string of the PICTURE clause and in numeric literals.
13.
When the Cursor phrase is specified, the numeric data-item specified after this clause contains the cursor position on the screen. It works on both character-based and graphical screens. cursor-name can be a four or six character data-term. When it is 4 characters long, then the first two digits represent the line number, while the last two digits the column number. When it is 6 characters long, then the first three digits represent the line number, while the last three digits the column number.
14.
When the EVENT OBJECT phrase is specified, Class-Name-2 identifies the class that will handle events. Currently, only references to "java.util.EventObject" are accepted.
15.
When the EVENT SOURCE phrase is specified, Object-Reference identifies the object that fired the event. Currently, only references to "com.iscobol.gui.server.CobolGUIJavaBean" are accepted.
16.
When the EVENT STATUS phrase is specified, the data item identified by event-status will be used for event handling. Refer to the Event handling section of the for further details.
17.
When the SCREEN CONTROL phrase is specified, the data item identified by screen-control will be used for handling the ACCEPT Statements. Refer to the Embedded Procedures section of the for further details.
18.
When the SYMBOLIC phrase is specified, Symbolic-Character defines a figurative constant representing Literal-7.
19.
If Literal-7 is an Integer, it represents the ordinal number of a character within the native character set.
20.
When the IN phrase is specified, and Literal-7 is an Integer, it represent the ordinal number of a character within the character set identified by Alphabet-Name-2.
21.
22.
SCREEN CONTROL
23.
01  screen-control is special-names screen control.
    03  accept-control                           pic 9.
    03  control-value                            pic 999.
    03  control-handle                           handle.
    03  control-id                               pic xx comp-x.
After the last statement of an Embedded Procedure has been executed, the value of accept-control is evaluated and the program behaves as explained below. This means that the programmer can influence the program behavior changing the value of accept-control.
The control that has the same index set in control-value is activated. [A]
The ACCEPT Statement terminates and the termination value set in control-value is assigned to the special register CRT STATUS.
The ACCEPT Statement terminates and the exception value set in control-value is assigned to the special register CRT STATUS. This is the most common way to simulate that a Function key has been pressed.
The control that has the same ID set in control-id is activated. [B] If more controls have the same ID, one of them is activated arbitrarily. If control-id is invalid, then the focus is moved on the control whose ID is the nearest in a range of 1000 in both directions; if no control with a near ID is found in the range of 1000, then the focus is moved on the first control in the tab order.
[A][B]If the control is either invisible, disabled or protected, then the next enabled control in the screen tab order is activated. If the control doesn’t exist, then the ACCEPT terminates with the crt status set to zero.
 
The value of accept-control is evaluated also before every ACCEPT of the screen. This means that the programmer can influence the program behavior changing the value of accept-control. The rules listed above are applied, with the following difference:
 
[A]If the control is invisible, disabled, protected or doesn't exist, then the first enabled control whose tab order is the nearest to control-value is activated.
[B]If the control is invisible, disabled, protected or doesn't exist, then the first enabled control whose ID is the nearest to control-id is activated. If there are two controls whose ID value has the same distance to the requested ID, then the control with higher ID is activated.
 
Example
       WORKING-STORAGE SECTION.
       copy "iscrt.def".
       77  key-status special-names crt status pic 9(5).
       SCREEN SECTION.
       01  Screen-1.
           03 Ef-1 entry-field line 2col 2id 101 after MOVE-CURSOR.
           03 Ef-2 entry-field line 4col 2id 102.
           03 Ef-3 entry-field line 6col 2id 103 enabled 0.
           03 Ef-4 entry-field line 8col 2id 501.
       PROCEDURE DIVISION.
           display Screen-1.
           accept  Screen-1 until key-status = 27
           move 103 to control-id.
           move 4   to accept-control.
Running the above program, when the cursor is on Ef-1,
EVENT STATUS
24.
01  event-status is special-names event status.
    03  event-type                               pic x(4comp-x.
    03  event-window-handle                      handle of window.
    03  event-control-handle                     handle.
    03  event-control-id                         pic xx comp-x.
    03  event-data-1                             signed-short.
    03  event-data-2                             signed-long.
    03  event-action                             pic x comp-x.
After the last statement of an Event Procedure has been executed, the value of event-action is evaluated and the program behaves as explained below. This means that the programmer can influence the program’s behavior by changing the value of event-action. Symbolic names listed below are defined in "isgui.def".
See Controls Reference for additional information about the EVENT-ACTION behavior in each control event.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left