janak vyas
Technical User
Code:
CREATE CURSOR tmp (RD N(18))
INDEX ON RD TAG MAIN CANDIDATE
SET ORDER TO
RAND(-1)
LOCAL i, j
j = 29
ON ERROR ErrHand(@j)
FOR i = 1 TO 30 && Just do 100k for now
INSERT INTO tmp (RD) VALUES (RAND()*j+1)
NEXT
ON ERROR
PROCEDURE ErrHand(j)
if j>=30
else
j=j*1.05
endif
RETRY
ENDPROC
what does this procedure does ? How is the loop working ? what role does CANDIDATE has? What does TAG does ?