Measure Reference Manual

MEAS_SQLNAME_SCAN_
In Measure H02 and later PVUs, MEAS_SQLNAME_SCAN_ parses a fully qualified, possibly
wildcarded, ANSI SQL name in external format. This routine verifies the syntax of an ANSI SQL
name.
error := MEAS_SQLNAME_SCAN_ ( name ! i
,name_length ); ! i
error
INT
is an error code indicating the outcome of the operation. Possible error codes include:
DescriptionError Code
Successful completion.0
The specified ANSI SQL names contained syntax errors.err^badformatsqlname3239
The specified ANSI SQL name could not be parsed.err^sql^api^internal3295
name
input
STRING .EXT:ref:*
is a buffer that contains the input name to be scanned in external format. A name space keyword
is required.
name_length
input
INT:value
is the size, in bytes, of the input name.
Usage Notes
ANSI SQL objects have independent name spaces and, if identical names exist in different
name spaces, each instance of the name refers to a different object.
The name spaces used by Measure are TABLE, INDEX and MODULE. TABLE is implied by
using the keywords CATALOG, SCHEMA and TABLE. INDEX is implied by using the keyword
INDEX. MODULE is implied for SQLSTMT (in MEASCOM there is no MODULE keyword).
When calling the MEASSQLNAME_* APIs, the input ANSI SQL names must be preceded by
a name space keyword.
Example
These are a couple of simplified examples in pTAL pseudo code that call MEAS_SQLNAME_SCAN_:
STRING .EXT inbuf[0:1023] :=["table cat.sch.t"];
if (error := MEAS_SQLNAME_SCAN_ (inbuf,
15))
! handle error
else
! ANSI SQL TABLE name is OK
STRING .EXT inbuf[0:1023] :=["module cat.sch.m"];
if (error := MEAS_SQLNAME_SCAN_ (inbuf,
16))
! handle error
MEAS_SQLNAME_SCAN_ 441