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

COUNTER

COUNTER returns a CHARACTER string of length 5 containing a decimal number. The returned number is 00001 for the first invocation, and is incremented by one on each successive invocation.

Read syntax diagramSkip visual syntax diagram>>-COUNTER-----------------------------------------------------><
 

If COUNTER is invoked 99999 times, the next time it is invoked, a diagnostic message is issued and 00000 is returned. The next invocation after that is treated as the first.

The COUNTER built-in function can be used to generate unique names, or for counting purposes.


Terms of use | Feedback

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