Managing Memory and Data Access
16.4 Using Alignment Directives, Qualifiers, and Flags
Example 16–4 Data Map for /NOALIGNMENT
Source Listing
Data Names in Declared Order
Line
Level
Name
Location
Size
Bytes Usage
Category
-----
-----
--------
-------------
----
----- -------
--------
7
01
REC1
2
00000000
26
26
DISPLAY
Group
8
02
FLD1
2
00000000
11
11
DISPLAY
Group
9
03
FLD1-1
2
00000000
9
4
COMP
N
10
03
FLD1-2
2
00000004
7
7
DISPLAY
N
11
02
FLD2
2
0000000B
5
5
DISPLAY
AN
12
02
FLD3
2
00000010
10
10
DISPLAY
Group
13
03
FLD3-1
2
00000010
1
1
DISPLAY
AN
14
03
FLD3-2
2
00000011
9
4
COMP
N
15
03
FLD3-3
2
00000015
5
5
DISPLAY
N
Byte Layout for Example 16–4:
|REC1
|
|FLD1
|FLD2
|FLD3
|
|FLD1-1 |FLD1-2
|
|*|FLD3-2 |FLD3-3
|
|
|
|
| |
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
1
5
12
17
22
18
Begin byte number (starting with 0)
Record length is 26 bytes.
Note
The asterisk (*) designates FLD3-1. Also, no padding or filler will result,
just as with Compaq COBOL for OpenVMS VAX on OpenVMS VAX.
Example 16–5 Data Map for /ALIGNMENT, -align
Source Listing
Data Names in Declared Order
Line
Level
Name
Location
Size
Bytes Usage
Category
-----
-----
------
-----------
-----
----
------
--------
7
01
REC1
2
00000000
29
29
DISPLAY
Group
8
02
FLD1
2
00000000
11
11
DISPLAY
Group
9
03
FLD1-1
2
00000000
9
4
COMP
N
10
03
FLD1-2
2
00000004
7
7
DISPLAY
N
11
02
FLD2
2
0000000B
5
5
DISPLAY
AN
12
02
FLD3
2
00000010
13
13
DISPLAY
Group
13
03
FLD3-1
2
00000010
1
1
DISPLAY
AN
14
03
FLD3-2
2
00000014
9
4
COMP
N
15
03
FLD3-3
2
00000018
5
5
DISPLAY
N
Managing Memory and Data Access 16–11
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......