Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

Example

  dcl Dayname (7) char(9) var static nonasgn init( 'Sunday',
                                                   'Monday',
                                                   'Tuesday',
                                                   'Wednesday',
                                                   'Thursday',
                                                   'Friday',
                                                   'Saturday');
  dcl Jul4_1776_Secs float bin(53);
  dcl Age_Tot_Secs pic 'Z,ZZZ,ZZZ,ZZZ,ZZ9';

  Jul4_1776_Secs = secs('17760704','YYYYMMDD');     /* seconds */
  Age_Tot_Secs   = secs() - Jul4_1776_Secs;   /* seconds since */
  display ('USA became independent on ' ||
            dayname(weekday(secstodays(Jul4_1776_Secs))) ||
           ', July 4, 1776 and at this very moment it has been ' ||
           Age_Tot_Secs, ||     ' seconds.');

Terms of use | Feedback

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