Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

COUNTER( ) Count function calls

&pagelevel(3)&pagelevel

Domain: Task-specific counter

The COUNTER( ) function keeps track of the number of times COUNTER( ) is called in the current task. The counter is incremented by 1 each time COUNTER( ) is called.

Format

COUNTER( )


Result type

INTEGER (<integer 1 .. 2147483647>)

Input parameters

None

Result

Maximum ten-digit number

Error message

SDP0304  OVERFLOW; NUMBER OUT OF RANGE

Example

/FOR I = *COUNTER(FROM = 2, TO = 28, INCREMENT = 2)
/   A = COUNTER()
/END-FOR
/SHOW-VARIABLE A
A = 14