i had create a store procedure in informix.
in my store procedure, i had use for loop to perform checking on character by character in one text

below is my coding : -

FOR i IN (1 TO cn_length)
IF p_docno[i] NOT MATCHES "[0123456789]" THEN
LET cn_ind = "0";

this command just look fine, but when i run this sql stmt, there are syntax error occur, thios error point to [i], after i try on many testing, i found that it cannot understand the [i], if i put 1 or 2 instand of i, no syntax error occur.

i don know whether the subscript part [i] is wrong or maybe the for loop is define wrongly. can you please help me on this matter.