$COUNT returns the current number of iterations of the referenced FOR FIRST, FOR EACH, or LOOP construct.
This function has the following format:
$COUNT(label)
label The 1‑ to 15‑character label of a FOR EACH or LOOP construct.
Example
<<DEPT>> FOR EACH WORKER
WHERE EMP‑DEPT = 'J'
: number and list the
: names of all workers
: in department 'J'
MOVE $COUNT(DEPT) TO WCOUNT
LIST WCOUNT, EMP‑NAME
ENDFOR
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|