COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 51 Variable-Size Table
01 ACTIVITY-TABLE-RECORD.
03 ACTIVITY-COUNT PICTURE 99.
03 ACTIVITY-TABLE OCCURS 10 TO 20 TIMES
DEPENDING ON ACTIVITY-COUNT
INDEXED BY SAVE-INX-1
SAVE-INX-2.
05 ACTIVITY-ENTRY PICTURE 999.
Example 52 Fixed-Size Table as an Element of a Variable-Size Table
01 DISPOSAL-COMPANIES.
03 H-COUNT PICTURE 99.
03 HAULER OCCURS 1 TO 12 TIMES DEPENDING ON H-COUNT.
05 VEHICLE OCCURS 15 TIMES.
07 V-NUMBER PICTURE 9(5).
07 CAPACITY-CU-FT PICTURE 9(4).
07 SERVICE-SCHEDULE PIC X.
...
SYNCHRONIZED Clause
The SYNCHRONIZED clause forces alignment of an elementary item on the most natural computer
storage boundary. The elementary item cannot be a pointer or a national data item.
Efficiency improves if data is aligned on natural computer memory boundaries, because additional
object code is sometimes required to store or retrieve data when 2 bytes of the same word belong
to different data items. Also, when a data item is stored within 2-byte boundaries, the complexity
of code to process it can decrease.
The SYNCHRONIZED clause is usually unnecessary, because the automatic alignment is also the
most natural: each level-77 item of the Working-Storage Section and Extended-Storage Section
and each level-01 item is aligned on a physical 2 8-byte boundary. (A word is 16 bits and a
TNS/E word is 32 bits.)
Both automatic and forced alignment can cause the compiler to generate implicit FILLER data.
Usage Considerations:
• LEFT and RIGHT
The optional keywords LEFT and RIGHT have no effect in HP COBOL.
• Where You Can Use the SYNCHRONIZED Clause
You can use the SYNCHRONIZED clause only in the data description entry of an elementary
item that does not have a USAGE POINTER clause. You cannot imply or specify the
SYNCHRONIZED clause for national data items.
• DISPLAY Data Items That the SYNCHRONIZED Clause Does Not Affect
The SYNCHRONIZED clause does not affect DISPLAY items at levels other than 01 or 77.
They are composed of one or more character positions and stored as a corresponding number
Descriptions of Records (Levels 01-49) 217










