Previous Topic Next topic Print topic


Optimizing Data Structures

Use the TYPEDEF clause on a data structure to create a programmer-defined type definition. That definition can subsequently be referenced in the USAGE clause for other data structures.

By defining the structure once, and making sure it is properly aligned, you are ensuring consistent optimization throughout the program.

01 grp-acc-block TYPEDEF.
   03 p-title  pointer.
   03 i-code   pic x(4) comp-5.
   03 ch-state pic x(3).
   03          pic x.       *> table padded so stride = multiple of 4

01 dest-grp       grp-acc-block.
01 curr-dest-grp  grp-acc-block.
Previous Topic Next topic Print topic