Written by

Solution Architect at Zorgi
Question Lorenzo Scalese · Jun 14, 2023

How to know if a class is not up to date

Hello!

I would like to find all classes not up to date in a namespace programmatically.

With IRIS Studio, we can see the single "+", but I don't know how to do that with a script.

Set sql = "SELECT ID, Name FROM %Dictionary.ClassDefinition WHERE NOT ID %STARTSWITH ?"Set params($Increment(params)) = "%"Set tResult = ##class(%SQL.Statement).%ExecDirect(, sql, params...)

If (tResult.%SQLCODE'=0)&&(tResult.%SQLCODE'=100) Set sc = $$$ERROR($$$SQLError, tResult.%SQLCODE, tResult.%Message) Quit sc

While tResult.%Next() {
    // if class not up to date ??
}

Does anyone have an idea?

Thank you!

Product version: IRIS 2022.3
$ZV: IRIS for Windows (x86-64) 2022.3 (Build 606U) Mon Jan 30 2023 09:08:55 EST

Comments

Lorenzo Scalese · Jun 14, 2023

Finally, I found the solution : 

$SYSTEM.OBJ.IsUpToDate("classname")
0