Xgetchar
This function extracts the Nth character of a CHAR or CLOB variable. This function runs much faster than the usual functions such as mid$
or seg$
when managing large CLOB data.
EXTRACTED_CHARACTER=Xgetchar(CLOB_SOURCE,POSITION)
Clbfile
or a Char
declaration.Integer
declaration.Clbfile
or a Char
declaration.# Find the 10th character in a CLOBLocal Clbfile PI_CHAR(0)Local Char CHAR10PI_CHAR=num$(pi) : # contains "3.14158265358979323846264338328"CHAR10=Xgetchar(PI_CHAR,10) : # Returns "5"