Managing Memory and Data Access
16.4 Using Alignment Directives, Qualifiers, and Flags
Table 16–2 Alignment and Padding Order of Precedence
Compiler Directives
Command line
Qualifier and
Option
No Directive
in Effect
*DC SET
ALIGNMENT
*DC SET
PADALIGN
*DC SET
NOALIGN
(none)
None
Align
elementary
data items.
Align and pad
elementary
data items and
structures.
None
/ALIGNMENT
-align
Align
elementary
data items.
Align
elementary
data items.
Align and pad
elementary
data items and
structures.
None
/ALIGN=PAD
-align pad
Align and pad
elementary
data items and
structures.
Align
elementary
data items and
structures.
Align and pad
elementary data
items.
None
16.4.2 Nesting Alignment Directives
Alignment directives located within the source program alter the current
alignment by specifying a new alignment. This new alignment remains in effect
(except for data specified with SYNCHRONIZED, which remains unchanged)
until changed precedence, or until the beginning of the next file specified in a
comma list.
You can nest alignment directives within a program to specify different
alignments for selected sets of data. Alignment directives modify the current
alignment in the following ways:
•
A SET ALIGNMENT (or SET NOALIGNMENT) directive. At this point in
the program source the alignment specified by this directive becomes the
current alignment.
•
An END-SET ALIGNMENT directive. At this point, the immediately
preceding SET ALIGNMENT (or SET NOALIGNMENT) directive is closed.
The current alignment now becomes one of the following:
— The alignment specified by the closest previous unclosed alignment
directive
— The alignment specified by the command-line option if no previous
alignment directive exists
•
The beginning of the next file specified in a comma list (on the Compaq
COBOL command line). This event closes all of the preceding alignment
directives. The alignment specified with the command-line option becomes
the current alignment.
Example 16–1 shows an example of nested alignment directives in source code.
Managing Memory and Data Access 16–7
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......