In functions $GET ($G) and $DATA ($) you can specify a multidimensional property reference as variable with the syntax obj.property.

Attempting to use $GET or $DATA on a non-multidimensional object property results in an <OBJECT DISPATCH> error.

The local variable name is invalid.

If a variable name begins with an underscore character followed by a letter, the system generates a <_CALLBACK SYNTAX> error which is not shown on development time. For example, SET x=_a.

Cannot use double quotes ("") within any SQL statement.

The class must exists.

Noncompliant Code Example

In following code, methods DoWork2 and DoWork3 expects to receive %String as argument, but receive Sample.Person and will raise a "PARAMETER error" message on runtime.

A variable is used in a expression, but was neither passed as argument nor set before.

Declare or define as argument the variable you need to use, or remove the reference to the undefined variable.

Declare the property you need to use in the class, or remove the reference to the undefined property.

Noncompliant Code Example

Following code will compile, but on runtime the Set obj.test will fail with "PROPERTY DOES NOT EXIST error" message.

Declare the method you need to invoke for the class, or remove the reference to the undefined method.

Noncompliant Code Example

Following code will compile, but on runtime the IsTest method will fail with "METHOD DOES NOT EXIST error" message.

The class must exists.

Noncompliant Code Example

Following code will raise a "CLASS NOT FOUND error" message on runtime for any call to the foo class method.

Class Sample.Foobar
{
    ClassMethod foo()
    {
        do ##class(Violated).bar() // CLASS NOT FOUND error
    }
}

Use the right number of parameters to call the function.

Noncompliant Code Example

Following code will compile, but on runtime the foo method will fail with "PARAMETER error" message.

Class Sample.Foobar
{
    ClassMethod foo(pstrArg1 As %String, pstrArgs2 As %String)
    {
        Write !,pstrArg1
        Write !,pstrArg2
    }

    ClassMethod bar()
    {
        Do ..foo(1,2,3) // PARAMETER error
    }
}

Method is defined with ReturnType value but has no QUIT or RETURN command.

Noncompliant Code Example

Following code will compile, but on runtime the foo method will fail with "COMMAND error" message.

ClassMethod foo() As %String
{
}

ClassMethod bar()
{
    #Dim str As %String = ..foo()  // Function must return a value
}

Pages