Specifies the type of word boundary alignment DEC DATATRIEVE
uses when storing records in a data file associated with a record
definition. It also controls the way DEC DATATRIEVE retrieves
data from files created by user programs or other applications
software.
Format
{ MAJOR_MINOR }
ALLOCATION [IS] { ALIGNED_MAJOR_MINOR }
{ LEFT_RIGHT }
{ }
1 – Arguments
MAJOR_MINOR
Causes DEC DATATRIEVE to use MAJOR_MINOR alignment when storing
or retrieving data in a data file. MAJOR_MINOR forces word
boundary alignments according to data types for elementary fields
defined with the SYNCHRONIZED clause and forces group fields
to the maximum alignment of the elementary fields they contain.
MAJOR_MINOR is the default for DEC DATATRIEVE.
ALIGNED_MAJOR_MINOR
Causes DEC DATATRIEVE to use ALIGNED_MAJOR_MINOR alignment when
storing or retrieving data in a data file. ALIGNED_MAJOR_MINOR
forces word boundary alignments according to data types for all
elementary fields in the record and group fields to the maximum
alignment of the elementary fields they contain.
LEFT_RIGHT
Causes DEC DATATRIEVE to use LEFT_RIGHT alignment when storing or
retrieving data in a data file. LEFT_RIGHT forces word boundary
alignment for elementary fields defined as COMP, COMP_1, COMP_2,
and DATE.
2 – Example
The following example shows the use of the ALLOCATION clause with
the YACHT record:
DELETE YACHT;
REDEFINE RECORD YACHT OPTIMIZE
ALLOCATION IS LEFT_RIGHT
01 BOAT.
03 TYPE.
06 MANUFACTURER PIC X(10)
QUERY_NAME IS BUILDER.
06 MODEL PIC X(10).
03 SPECIFICATIONS
QUERY_NAME SPECS.
06 RIG PIC X(6)
VALID IF RIG CONT "SLOOP","KETCH","MS","YAWL".
06 LENGTH_OVER_ALL PIC XXX
VALID IF LOA BETWEEN 15 AND 50
QUERY_NAME IS LOA.
06 DISPLACEMENT PIC 99999
QUERY_HEADER IS "WEIGHT"
EDIT_STRING IS ZZ,ZZ9
QUERY_NAME IS DISP.
06 BEAM PIC 99 MISSING VALUE IS 0.
06 PRICE PIC 99999
MISSING VALUE IS 0
VALID IF PRICE>DISP*1.3 OR PRICE EQ 0
EDIT_STRING IS $$$,$$$.
;