Quote:
> I'm seeking all information I can find on the rules for 88 level
> usage. Unfortunately, my text is poor and my instructor inadequate.
> Any help or reference would be GREATLY appreciated. Thanks for reading
> this, and thanks in advance for any help.
88 condition-name VALUES ARE literal-1.
88 condition-name VALUE IS literal-1, literal-2,..., literal-n.
88 condition-name VALUES ARE literal-1 THRU literal-2.
This format associates a value, values, and/or range(s) of values with a
condition-name. Each such condition-name requires a separate level-88
condition-name-1
Is a user-specified name that associates a value with a conditional
variable. If the associated conditional variable requires subscripts
or indexes, each procedural reference to the condition-name must be
subscripted or indexed as required for the conditional variable.
Condition-name-1 is tested procedurally in condition-name conditions
(see "Conditional Expressions").
literal-1
When literal-1 is specified alone, the condition-name is associated
with a single value.
literal-1 THROUGH literal-2
The condition-name is associated with at least one range of values.
Whenever the THROUGH phrase is used, literal-1 must be less than
literal-2.
In the VALUE clause of a data description entry (Format 2), all the
literals specified in the VALUE clause must be DBCS literals if the
associated conditional variable is a DBCS data item. The figurative
constants SPACE and SPACES can be used as DBCS literals.
The range of DBCS literals specified for the THROUGH phrase is based on
the binary collating sequence of the hexadecimal values of the DBCS
characters.
Rules for Condition-Name Values:
The VALUE clause is required in a condition-name entry, and must be
the only clause in the entry. Each condition-name entry is associated
with a preceding conditional variable. Thus, every level-88 entry
must always be preceded either by the entry for the conditional
variable, or by another level-88 entry when several condition-names
apply to one conditional variable. Each such level-88 entry
implicitly has the PICTURE characteristics of the conditional
variable.
The keywords THROUGH and THRU are equivalent.
The condition-name entries associated with a particular conditional
variable must immediately follow the conditional variable entry. The
conditional variable can be any elementary data description entry
except another condition-name, a RENAMES clause (level-66 item), or an
item with USAGE IS INDEX.
The conditional variable cannot be an item described as USAGE IS
POINTER.
A condition-name can be associated with a group item data description
entry. In this case:
- The condition-name value must be specified as a nonnumeric literal
or figurative constant.
- The size of the condition-name value must not exceed the sum of
the sizes of all the elementary items within the group.
- No element within the group can contain a JUSTIFIED or
SYNCHRONIZED clause.
- No USAGE other than DISPLAY can be specified within the group.
USAGE other than USAGE IS DISPLAY can be specified within the
group.
Condition-names can be specified both at the group level and at
subordinate levels within the group.
The relation test implied by the definition of a condition-name at the
group level is performed in accordance with the rules for comparison
of nonnumeric operands, regardless of the nature of elementary items
within the group.
The VALUE clause is allowed for internal floating-point data items.
The VALUE clause is allowed for DBCS data items. Relation tests for
DBCS data items are performed according to the rules for comparison of
DBCS items. These rules can be found in "Comparing DBCS Operands".
A space, a separator comma, or a separator semicolon, must separate
successive operands.
Each entry must end with a separator period.
The type of literal in a condition-name entry must be consistent with
the data type of its conditional variable. In the following example:
- CITY-COUNTY-INFO, COUNTY-NO, and CITY are conditional variables.
The PICTURE associated with COUNTY-NO limits the condition-name
value to a 2-digit numeric literal.
The PICTURE associated with CITY limits the condition-name value
to a 3-character nonnumeric literal.
- The associated condition-names are level-88 entries.
Any values for the condition-names associated with
CITY-COUNTY-INFO cannot exceed 5 characters.
Because this is a group item, the literal must be nonnumeric.
05 CITY-COUNTY-INFO.
88 BRONX VALUE "03NYC".
88 BROOKLYN VALUE "24NYC".
88 MANHATTAN VALUE "31NYC".
88 QUEENS VALUE "41NYC".
88 STATEN-ISLAND VALUE "43NYC".
10 COUNTY-NO PICTURE 99.
88 DUTCHESS VALUE 14.
88 KINGS VALUE 24.
88 NEW-YORK VALUE 31.
88 RICHMOND VALUE 43.
10 CITY PICTURE X(3).
88 BUFFALO VALUE "BUF".
88 NEW-YORK-CITY VALUE "NYC".
88 POUGHKEEPSIE VALUE "POK".
05 POPULATION...
Subordinate Topics
GRUMP, Copyright ? 1995, M. Bass