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

Using the '.' operator

The syntax for referring to a typed structure member using the "." operator is:

Read syntax diagramSkip visual syntax diagram>>-typed-structure-name--.--typed-structure-member-------------><
 
typed-structure-reference
Name of the declared typed structure
typed-structure-member
Name of the referenced major or minor structure member of the structure type

For example, given the structure type tm and function localtime defined as in the example on page ***, the following code obtains the system date and displays the time:

     dcl Daterec type tm;

     dcl ltime   type time_t;
     dcl ptime   handle tm;

     ltime = time( null() );
     ptime = localtime( ltime );

     Daterec = ptime => tm;

display ( edit(Daterec.Hours,'99') || ':' ||
edit(Daterec.Minutes,'99') || ':' ||
edit(Daterec.Seconds,'99'));

Terms of use | Feedback

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