Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Programming Guide

Struct type equivalence

The following example illustrates the translation of the simple struct for tm from the C header file time.h:

Figure 56. Sample struct type equivalence
     struct tm {
         int tm_sec;
         int tm_min;
         int tm_hour;
         int tm_mday;
         int tm_mon;
         int tm_year;
         int tm_wday;
         int tm_yday;
         int tm_isdst;
     };

     define structure
       1 tm
          ,2 tm_sec   fixed bin(31)
          ,2 tm_min   fixed bin(31)
          ,2 tm_hour  fixed bin(31)
          ,2 tm_mday  fixed bin(31)
          ,2 tm_mon   fixed bin(31)
          ,2 tm_year  fixed bin(31)
          ,2 tm_wday  fixed bin(31)
          ,2 tm_yday  fixed bin(31)
          ,2 tm_isdst fixed bin(31)
        ;

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)