• Keine Ergebnisse gefunden

GENERAL RULE

Im Dokument Language Reference (Seite 57-61)

THE NUCLEUS

GENERAL RULE

The key word FILLER may be used to name an elementary item or'lIii:j::jin a record. Under no circumstances can a FILLER item be referred toeXpHci tly.

However, the key word FILLER may be used as a conditional variable because such use does not require explicit reference to the FILLER item but to its value.

The JUSTIFIED Clause

FUNCTION

The JUSTIFIED clause specifies non-standard positioning of data within a receiving data item.

GENERAL FORMAT

{JUSTIFIED } RIGHT JUST

Language Reference Manual 3 - 17

GENERAL FORMAT level-number

SYNTAX RULES

1. A level-number is required as the first element in each data description entry.

2. Data description entries subordinate to an FD, CD, or SO entry must have level-numbers with the values 01-49, 66 or 88. (See The File Description in Chapter 5).

3. Data description entries in the Working-Storage Section and Linkage Section must have level-numbers with the values 01-49,66, 77 or 88.

4. A level number may be a one or two digit number.

GENERAL RULES

1. The level-number 01 identifies the first entry in each record description.

2. Special level numbers have been assigned to certain entries where there is no real concept of level:

a. The level-number 77 is assigned to identify noncontiguous working storage data items, noncontiguous linkage data items, and can be used only as described by Format 1 of the data description skeleton. (See The Data Description - Complete Entry Skeleton in this chapter).

b. Level number 66 is assigned to identify RENAMES entries and can be used only as described in Format 2 of the data description skeleton earlier in this chapter.

c. Level number 88 is assigned to entries which define condition-names associated with a conditional variable and can be used only as described in Format 3 of the data description skeleton earlier in this chapter.

3. Multiple level 01 entries subordinate to any given level indicator, represent implicit redefinitions of the same area.

Language Reference Manual 3 -19

GENERAL RULES

There are five categories of data that can be described with a PICTURE clause:

alphabetic, numeric, alphanumeric, alphanumeric edited, and numeric edited.

General rules within these categories are given below:

Alphabetic Data Rules

1. Its PICTURE character-string can only contain the symbols 'A', 'B'; and 2. Its contents when represented in standard data format must be any

combination of the twenty-six (26) letters of the Roman alphabet and the space from the COBOL character set. Its length is limited only by the data division having to be less than 64K bytes long.

Numeric Data Rules

1. Its PICTURE character-string can only contain the symbols '9', 'P', 'S', and 'V'.

The number of digit positions that can be described by the PICTURE character-string must range from 1 to 18 inclusive.

2. If unsigned, the data in standard data format must be a combination of the Arabic numerals '0', '1', '2', '3', '4', '5', '6', '7', '8', and '9'; if signed, the item may also contain a '

+', '-',

or other representation of an operational sign. (see The SIGN Clause later in this chapter).

Alphanumeric Data Rules

1. Its PICTURE character-string is restricted to certain combinations of the symbols 'A', 'X', '9', and the item is treated as if the character-string contained all X's. A PICTURE character-string which contains all A's or all 9's does not define an alphanumeric item; and

2. Its contents when represented in standard data format can consist of any characters in the computer's character set. Its length is limited only by the data division having to be less than 64K bytes long.

Language Reference Manual 3 - 21

Elementary Item Size

The size of an elementary item, where size means the number of character positions occupied by the elementary item in standard data format, is determined by the number of allowable symbols that represent character positions. An integer which is enclosed in parentheses following the symbols 'A', ',', 'X', '9', 'P', 'Z', '*', 'B', 'I', '0', '+', '-', or the currency symbol indicates the number of consecutive occurrences of the symbol. Note that the following symbols may appear only once in a given PICTURE: 'S', 'V', '.', 'CR', and 'DB'.

Symbols Used

The functions of the symbols used to describe an elementary item are explained as follows:

A Each 'A' in the character-string represents a character position which can contain only a letter of the alphabet or a space.

BEach 'B' in the character-string represents a character position into which the space character will be inserted.

PEach 'P' indicates an assumed decimal scaling position and is used to specify the location of an assumed decimal point when the point is not within the number that appears in the data item. The scaling position character 'P' is not counted in the size of the data item. Scaling position characters are counted in determining the maximum number of digit positions (18) in numeric edited items or numeric items. The scaling position character 'P' can appear only to the left or right as a continuous string of 'P's within a PICTURE description;

since the scaling position character 'P' implies an assumed decimal point (to the left of 'P's if 'P's are leftmost PICTURE characters and to the right if 'P's are rightmost PICTURE characters), the assumed decimal point symbol 'V' is redundant as either the leftmost or rightmost character within such a PICTURE description. The character 'P' and the insertion character '.' (period) cannot both occur in the same PICTURE character-string. If, in any operation involving conversion of data from one form of internal representation to another, the data item being converted is described with the PICTURE character 'P', each digit position described by a 'P' is considered to contain the value zero, and the size of the data item is considered to include the digit positions so described.

Language Reference Manual 3 - 23

When the character '.' (period) appears in the character-string it is an editing symbol which represents the decimal point for alignment purposes and in addition, represents a character position into which the character '.' will be inserted. The character '.' is counted in the size of the item. For a given program the functions of the period and comma are exchanged if the clause DECIMAL-POINT IS COMMA is stated in the SPECIAL-NAMES paragraph.

In this exchange the rules for the period apply to the comma and the rules for the comma apply to the period wherever they appear in a PICTURE clause. represent the character position into which the editing sign control symbol will be placed. The symbols are mutually exclusive in anyone character-string and each character used in the symbol is counted in determining the size of the data item.

Each '*' (asterisk) in the character-string represents a leading numeric character position into which an asterisk will be placed when the contents of that position is zero. Each '*' is counted in the size of the item.

The currency symbol in the character-string represents a character position into which a currency symbol is to be placed. The currency symbol in a character-string is represented by either the currency sign or by the single character specified in the CURRENCY SIGN clause in the SPECIAL-NAMES paragraph. The currency symbol is counted in the size of the item.

Im Dokument Language Reference (Seite 57-61)