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.

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.

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.

Noncompliant Code Example

Following code will compile, but on runtime the Add method will fail with "UNDEFINED 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
}

Method is defined with ReturnType value but has QUIT or RETURN without arguments.

Noncompliant Code Example

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

Consider this code:

    Class Fubar
    {

    Property foo;

    Method m()
    {
        set i%foo("bar") = "baz"
    }

    }

This code will fail at runtime, since the foo property is not declared as MultiDimensional. It should be declared as such:

    Property foo [ Multidimensional ];

Pages