Managing Memory And Data Access; Managing Memory Granularity - Compaq COBOL AAQ2G1FTK User Manual

Compaq computer accessories user manual
Table of Contents

Advertisement

Managing Memory and Data Access

16.1 Managing Memory Granularity

granularity for best performance if you are sure the processes never make
concurrent updates within the same aligned quadword.
To successfully use byte/word granularity, you need to consider at least four
important restrictions:
An EV56 or higher CPU is necessary for byte/word granularity.
LIBOTS.EXE support for byte/word granularity is necessary if PIC X support
is needed. However, LIBOTS.EXE Version 1.3 on OpenVMS Alpha Version
7.1 does not support byte/word granularity.
Use of PIC 9 COMP-3 (PACKED numerics) and PIC 9 (DISPLAY numerics)
should be restricted, because they do not have byte/word granularity support.
You need to evaluate any NONGRNACC diagnostics as potentional sources of
incorrect data update. These warnings contain critical information and must
not be ignored.
You should avoid the use of /GRANULARITY=BYTE unless all of these
requirements are met.
In the following example (which is OpenVMS specific), the warnings at lines 16,
17, and 18 must be heeded. If this application is run on a CPU that supports
byte/word granularity, the warning at line 16 (PIC X) indicates that the move will
not produce byte granularity unless it is run on a system with a LIBOTS.EXE
version that supports byte/word granularity. The warnings at line 17 (PIC 9
display numeric) and line 18 (PIC 9 COMP-3 packed numeric) indicate that these
moves will not produce byte granularity.
$ cobol c3484/granularity=byte/list=sys$output
C3484
1 identification division.
2 program-id. c3484.
3 environment division.
4 data division.
5 working-storage section.
6 01 w1.
7 03
8 03
9 03
10 03
11 03
12 05
13 procedure division.
14 0. move 1
15 move 2
16 move "c" to a3.
........1
%COBOL-W-NONGRNACC, (1) Unable to generate code for requested granularity
17 move 4
........1
%COBOL-W-NONGRNACC, (1) Unable to generate code for requested granularity
18 move 5
........1
%COBOL-W-NONGRNACC, (1) Unable to generate code for requested granularity
16–2 Managing Memory and Data Access
Source Listing
5-JUN-1999 07:37:22 Compaq COBOL V2.6-1060 Page 1
a1
pic 9(9) comp.
a2
pic 9(4) comp.
a3
pic x(9).
a4
pic 9(9).
w2 occurs 3 times.
a5 pic 9(18) comp-3.
to a1.
to a2.
to a4.
to a5(2).

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COBOL AAQ2G1FTK and is the answer not in the manual?

Questions and answers

Table of Contents