Measure Reference Manual
MEAS_SQL_MAP_INIT_
In Measure H02 and later PVUs, MEAS_SQL_MAP_INIT_ initiates the SQL/MX mapping session.
This must be done if one of the following APIs is going to be used
MEAS_GETDESCINFO_
MEASLISTENAME
MEASLISTGNAME
and there is no SQL journal in the indicated Measure data file, so resolution comes from the
SQL/MX subsystem.
error := MEAS_SQL_MAP_INIT_ ( connectionInfo ); ! i,o
error
INT
is an error code indicating the outcome of the operation. Possible error codes include:
DescriptionError Code
Successful completion.0
The SQL/MX mapping session is already established for this application.err^sqlmx^map^dupconnection3297
The SQL/MX mapping session cannot be started.err^sqlmx^map^init3298
connectionInfo
input, output
INT(32) .EXT:ref:25
is allocated by the caller to be at least 100 bytes.
Usage Notes
For best efficiency, this API should be called only once per application process.
Example
This a simplified example in pTAL pseudo code to show how to use MEAS_SQL_MAP_INIT_ and
MEAS_SQL_MAP_STOP_.
int(32) .connectionInfo[0:24]; ! at least 100 bytes
! at the start of the application
! if (error := MEAS_SQL_MAP_INIT_(connectionInfo)) then
! handle error
! do work including calls to one or more of the APIs that require the
! connectionInfo argument as input unless we are analyzing a data file
! before exiting the application
! if connectionInfo[0] <> 0d then
! MEAS_SQL_MAP_STOP_(connectionInfo);
MEAS_SQL_MAP_INIT_ 437