Previous Topic Next topic Print topic


Typedef - User Defined USAGE or Structure

The Compiler supports the following data descriptions:

 01 struct-1        TYPEDEF.
    05  part-1  pic x (20).
    05  part-2  pic x(10).
 01 USHORT  pic 9 (4)   comp-5 typedef.

which defines struct-1 and USHORT to be new usages that can be used as in the following:

 01  a.
     05  b  struct-1.
     05  x  USHORT.

which would be interpreted as if it had been coded as:

 01  a.
     05  b.
         10  part-1 pic x(20).
         10  part-2     pic x(10).
     05  x              pic 9(4) comp-5.
Previous Topic Next topic Print topic