The value of the COL2() function is maintained on a per-program basis. If an external subroutine is called between extracting the data and use of the COL2() function, the positional data is not lost by any use of the FIELD() or LAST() function in the subroutine.
COL2() returns zero if
The field number of the last FIELD() function was beyond the end of the string
S = "A*BB*CCC*DDDD*EEEEE"
X = FIELD(S, "*", 3, 2)
N = COL2()
This program fragment extracts the string "CCC*DDDD" to variable X. The COL2() function returns 14 and assigns this to N.