DTRHELP.HLB  —  Commands Statements Clauses, SYNCHRONIZED Clause
       Causes word boundary alignment of an elementary field.

       Format

         { SYNCHRONIZED } [ LEFT ]
         { SYNC         } [ RIGHT]
         {              } [      ]

1  –  Arguments

    LEFT

       Allows compatibility with DEC COBOL record definitions. DEC
       DATATRIEVE accepts the argument but ignores the boundary
       alignment specification that the field begin at the left boundary
       of the unit of storage the field occupies.

    RIGHT

       Allows compatibility with DEC COBOL record definitions. DEC
       DATATRIEVE accepts the arguments but ignores the boundary
       alignment specification that the field end at the right boundary
       of the unit of storage the field occupies.

2  –  Example

       This example shows the difference in storage allocation a SYNC
       clause can make. A field of USAGE type LONG occupies four bytes
       of storage (the equivalent of one longword):

       DTR> DEFINE RECORD NOSYNC_REC USING
       DFN> 01 TOP.
       DFN>    03 ONE PIC X.
       DFN>    03 TWO LONG.
       DFN> ;
       [Record is 5 bytes long.]
       DTR> DEFINE RECORD SYNC_REC USING
       DFN> 01 TOP.
       DFN>    03 ONE PIC X.
       DFN>    03 TWO SYNC RIGHT LONG.
       DFN> ;
       [Record is 8 bytes long.]
       DTR>
Close Help