CDDLHELP.HLB  —  ALIGNED  Usage Notes
   o  To satisfy hardware requirements,  some  languages  and  language
      processors   have   field   alignment   restrictions   for   data
      definitions.  The ALIGNED  clause  enables  you  to  control  the
      starting boundaries of fields you define.

   o  All fields, except BIT fields, begin by default on the first byte
      following   the   last  field.   BIT  fields  begin  on  the  bit
      immediately following  the  last  field.   You  can  modify  this
      starting position with the ALIGNED clause.

   o  The ALIGNED clause aligns fields within a record relative to  the
      start  of  the  record, not relative to virtual memory locations.
      For example, if you specify LONGWORD alignment for a field,  that
      field  does  not  necessarily  begin  on  a  longword boundary in
      memory.  Rather, the field begins some multiple of 32 bits beyond
      the  start  of  the record.  To correctly use the ALIGNED clause,
      you must know the memory alignment techniques of the language you
      use with the CDD.

   o  You should not use the ALIGNED clause in template records.   When
      CDDL stores the template record, the position of an aligned field
      is fixed within the record and is not changed when the record  is
      copied  into  another  record  definition.   Therefore, the newly
      created  field  may  not  align  properly  in  the   new   record
      definition.
Close Help