ascot diagnostics

A7471

Error: No function ‘{name}’: SQL provides no ObjectScript function of that name; the statement fails when it runs

An embedded SQL statement calls a $ function that IRIS SQL does not provide. IRIS SQL provides a fixed set of ObjectScript functions, among them $EXTRACT, $FIND, $LENGTH, $PIECE, $TRANSLATE and the $LIST functions. IRIS compiles the class or routine, and the statement gets SQLCODE -12 when it runs. Use SQL’s own function instead, such as ASCII in place of $ASCII.

IRIS compiles the example.

Class Demo.SqlDollarFunctionNotFound
{

ClassMethod Code() As %Integer
{
    &sql(SELECT $ASCII('A') INTO :code) //! A7471
    Quit code
}

}

All diagnostics