%SYSTEM.OBJ
abstract class %SYSTEM.OBJ extends %SYSTEM.Help
The %SYSTEM.OBJ class provides an interface for managing objects.You can use it via the special $system object:
Do $system.OBJ.Load("MyFile.xml","ck")
Many methods in this class use the qspec argument, which is a list of flags or qualifiers. See System Flags and Qualifiers.
Method Inventory
- CloseObjects()
- Compile()
- CompileAll()
- CompileAllNamespaces()
- CompileInfoClass()
- CompileInfoClose()
- CompileInfoExecute()
- CompileInfoFetch()
- CompileInfoFetchRows()
- CompileList()
- CompilePackage()
- CompileProject()
- Delete()
- DeleteAll()
- DeletePackage()
- DeleteProject()
- DisplayError()
- Dump()
- Export()
- ExportAllClasses()
- ExportAllClassesIndividual()
- ExportAllClassesToStream()
- ExportCPP()
- ExportDynCPP()
- ExportJava()
- ExportJavaPackage()
- ExportODL()
- ExportPackage()
- ExportPackageToStream()
- ExportPattern()
- ExportPatternToStream()
- ExportToStream()
- ExportUDL()
- GenerateEmbedded()
- GetClassList()
- GetConcurrencyMode()
- GetDependencies()
- GetMPPOption()
- GetPackageList()
- GetQualifiers()
- GetTransactionMode()
- ImportDir()
- IsUpToDate()
- IsValidClassname()
- Load()
- LoadDir()
- LoadLanguage()
- LoadStream()
- MakeClassDeployed()
- New()
- ObjectListClose()
- ObjectListExecute()
- ObjectListFetch()
- Open()
- OpenId()
- RebuildExtentIndex()
- RebuildExtentIndexOne()
- RedirectBindSrvUserOutput()
- SaveObjects()
- SetConcurrencyMode()
- SetFlags()
- SetMPPOption()
- SetQualifiers()
- SetTransactionMode()
- ShowClasses()
- ShowFlags()
- ShowMacros()
- ShowObjects()
- ShowQualifiers()
- ShowReferences()
- UnCompile()
- UpdateConfigParam()
- Upgrade()
- UpgradeAll()
- ValidateIndices()
- Version()
Methods
Compiles the class classes, which can be a single class, a comma separated list, a subscripted
array of class names. You can also use ? or * wild cards and if you
wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*,'User.T*".
If recurse is true then do not output the intial 'compiling'
message or the compile report as this is being called inside another compile loop.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()'
and 'Do $system.OBJ.ShowFlags()'.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.
Parameters
Name | Description |
---|---|
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
The return value is a %Status value indicating success or failure. |
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. Note that while /mapped=0 qualifier applies to the pattern passed in by only searching the default routine database, however any compile is done in the current namespace. So it is possible a routine/class found with /mapped=0 may not be visible in the current namespace or may be a different version if there are complicated package mappings.
Parameters
Name | Description |
---|---|
package |
You can pass one or more comma separated packages in package argument. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
The return value is a %Status value indicating success or failure. |
Parameters
Name | Description |
---|---|
project |
The name of the package to be compiled. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
The return value is a %Status value indicating success or failure. |
Delete the definition of class classes from this namespace which can be a single class, a comma separated list, a subscripted
array of class names. You can also use ? or * wild cards and if you
wish to exclude items pass ' before the item name which also supports wild card, e.g. "User.*,'User.T*".
If the class to delete is persistent
include the 'e' flag or '/deleteextent' qualifier to delete the extent data
and extent metadata. Refer to %ExtentMgr.Util for more information
on extent metadata.
Parameters
Name | Description |
---|---|
classes |
The class, a comma separated list of classes or a subscripted array of class names. Wild cards may be specified. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
The return value is a %Status value indicating success or failure. |
Parameters
Name | Description |
---|---|
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. |
The return value is a %Status value indicating success or failure. |
Parameters
Name | Description |
---|---|
package |
You can pass one or more comma separated packages in package argument. If package is '*' then all classes are deleted. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. |
The return value is a %Status value indicating success or failure. |
Parameters
Name | Description |
---|---|
project |
The name of the project to delete. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. |
The return value is a %Status value indicating success or failure. |
Write the in-memory state of a object referred to by oref to the console (the current device).
Set person = ##class(Person).%OpenId(22) Do $system.OBJ.Dump(person)
Parameters
Name | Description |
---|---|
items |
The items to export. Each of the items must have a type determined by an extension selected from the following list of basic types, additional types are supported under the abstract routine interface so this list is not exhaustive.
|
filename |
If the output filename is empty, matching items will be exported to the current device. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
Charset |
The character set to use for this export. If not specified then the default is 'utf-8'. |
The return value is a %Status value indicating success or failure. |
|
This function will loop through all the classes exporting them
to the file filename. It will restrict which classes are
exported based on the qspec
Parameters
Name | Description |
---|---|
filename |
The file where exported data will be placed. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
Charset |
The character set to use for this export. If not specified then the default is 'utf-8'. |
The return value is a %Status value indicating success or failure. |
|
This function will loop through all the classes exporting each one as an individual XML file
named after the classname to the directory dirname. If you specify a Package then
it will only export this package. If SubDir is true then it will export sub-packages as subdirectories.
Parameters
Name | Description |
---|---|
dirname |
The directory where exported files will be placed. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
Charset |
The character set to use for this export. If not specified then the default is 'utf-8'. |
Package |
If you specify a Package then it will only export this package. |
Subdir |
If SubDir is true then it will export sub-packages as subdirectories. |
The return value is a %Status value indicating success or failure. |
|
This function will loop through all the classes exporting them to a stream. It will restrict which classes are exported based on the qspec
Parameters
Name | Description |
---|---|
stream |
If stream is passed in then the data is appended to this stream. If it is null when called it will create a stream and return this. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
Charset |
The character set to use for this export. If not specified then the default is 'utf-8'. |
The return value is a %Status value indicating success or failure. |
|
Export class classname to C++ files in directory dirname.
Export class classname to a JAVA file in directory dirname.
Search for classes in the package and export them. The search for classes respects the qspec passed. If the package is "*" then it will search for all classes in this namespace.
Export class package to a JAVA file in directory dirname.
Export class classname to ODL file with file name filename.
Export package package to an XML file with name filename.
Export package package to an XML file with name filename. If stream is passed in then the data is appended to this stream. If it is "" when called it will create a stream and return this.
If you pass a pattern of '*.cls' then all classes in this namespace will be exported,
or a pattern of 'a*.mac' will export all MAC routines that start with the letter 'a' to be
exported. If the filename ends in .gz or .gzip it will automatically gzip the file.
Parameters
Name | Description |
---|---|
pattern |
The pattern used to construct a list of items to be exported. |
filename |
If the output filename is empty, matching items will be exported to the current device. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
Charset |
The character set to use for this export. If not specified then the default is 'utf-8'. |
The return value is a %Status value indicating success or failure. |
|
If you pass a pattern of '*.cls' then all classes in this namespace will be exported,
or a pattern of 'a*.mac' will export all MAC routines that start with the letter 'a' to be
exported.
Parameters
Name | Description |
---|---|
pattern |
The pattern used to construct a list of items to be exported. |
stream |
If stream is passed in then the data is appended to this stream. If it is "" when called it will create a stream and return this. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
Charset |
The character set to use for this export. If not specified then the default is 'utf-8'. |
The return value is a %Status value indicating success or failure. |
|
Parameters
Name | Description |
---|---|
items |
The items to export. Each of the items must have a type determined by an extension selected from the following list of basic types, additional types are supported under the abstract routine interface so this list is not exhaustive.
|
stream |
The stream in which to place exported items. |
qspec |
qspec is a list of flags and qualifiers that can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. If you pass qualifier '/recursive=1' then it will also export any related, e.g. include files included by a class or a superclass, the idea being that this will be a compilable set of items. If the filename ends in .gz or .gzip then it will automatically gzip the file. |
errorlog |
errorlog is an array of the %Status error values encountered during the execution of this method. Each status value is in the format returned by $system.Status.DecomposeStatus. |
Charset |
The character set to use for this export. Note that if you pass in a Charset and also pass in a character stream we will not use the Charset unless the stream is a file character stream. The reason for this is a character stream deals with characters so Charset is only about binary representations of character data. In this specific case of a file character stream we will set the TranslateTable on the file stream to the Charset. |
The return value is a %Status value indicating success or failure. |
Export document itemname to file filename in UDL format.
Search for classes in this namespace and put their names into the local array items. qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'. The search for classes respects the qspec passed. It uses the following qualifiers
- /application=1/0 - Include application classes
- /system=1/0 - Include system classes (ones with class attribute 'system' set to something other than zero)
- /percent=1/0 - Include percent classes
- /mapped=1/0 - Include classes mapped from other databases or just classes in default databases
------------------------------------------------------------------------------- Method: GetMPPOption Definition: This method returns the current value for the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName' Options: The following is a list of currently supported Macro Pre-Processor Configuration Settings Options: optionName Description ------------------------- ----------------------------------- MPPParsingMode - The MPP's Parsing Mode {1 | 2} MacroMaxRecursionNoArg - The maximum allowed sub-string repetitions between $$$MACRO references (without arguments) of the same name {3...n} MacroMaxRecursionGotArg - The maximum allowed sub-string repetitions between $$$MACRO(...) references (with arguments) of the same name {10...n} ALL Get all 'optionName' values Notes: - See the 'SetMPPOption(...)' method for specific details about each of the 'optionName' values Invocation: This method can be invoked in the following ways: ObjectScript: $SYSTEM.OBJ.GetMPPOption(...) SQL: N/A Examples: The following examples shows the use of this method: #1 Get the current value for the 'MPPParsingMode' option of the Macro Pre-Processor Configuration Settings set optVal=$SYSTEM.OBJ.GetMPPOption("MPPParsingMode",.tSC) Data Storage: ^%SYS("MPP","Parsing") & ^%SYS("MPP","MacroRecursion") Parameters: optionName - The Pre-Processor (MPP) Configuration Settings 'option' name. The following is a list of currently supported Macro Pre-Processor Configuration Settings Options: - MPPParsingMode - MacroMaxRecursionNoArg - MacroMaxRecursionGotArg - ALL (Get all 'optionName' values) tSC - A Pass By Reference (PBR) parameter which returns the status from the invocation of this method getGloValue - 0 = Don't retrieve the value from the System-Global [DEFAULT] 1 = Retrieve the value from the System-Global NOTE: This parameter should be used for internal purposes only! RETURN Value: The current value of the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName'. NOTE: If 'optionName' is passed the value "ALL", then return a $LIST(...) of a $LIST(...) of the following values for each of the valid 'optionName' values: $LIST($LIST(optionName,optionValue,tSC),...) -------------------------------------------------------------------------------
Search for classes in the package and put their names into the local array items. If the package is "*" then it will return for all classes in this namespace. It uses the qualfier in qspec /includesubpackages to determine if it searches inside a package to subpackages or not. qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()' and 'Do $system.OBJ.ShowFlags()'.
This will import all files found in a directory using the Load() method so it should be
able to detect most common formats. If you pass it the compile flag ('c'), after loading it will also compile
all these items. The other flags are the same as found in Load() except for the dir
which is the directory to load and the recurse which determines if this will look into subdirectories or not.
You can limit the items it will import by specifying a wildcards value. For example '*.xml' will only import
files that end in XML.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()'
and 'Do $system.OBJ.ShowFlags()'.
- 0 - Check timestamps on class, so even if a description was modified this will show the class as out of date
- 1 - Ignore changes to descriptions in checking up to date status, this is the default and is what the class compiler typically uses.
- 2 - Ignore changes to descriptions and method code in checking up to date status, this is useful to see if the class has 'structurally' changed in a way that would require a class referencing this via SQL to be recompiled
Load, and optionally compile (if 'c' flag is present), class definitions, CSP pages, routines, or globals from the
file file. file may be a list of files to load separated with '*' symbols.
You can import files exported in XML format, %RO format, CDL format, UDL format, %GOF, and CSR/CSP files.
A comma separated list of the items it loaded is returned in loadedlist. If the list is too long to fit
in the variable, it is terminated with '...'. Items loaded are always returned as subscripts of the loadedlist array.
If you pass listonly as true then it will not
import anything but just list the items that exist in file.
If selecteditems is defined then this will contain either a comma separated list
of items to import or a single subscripted array. It will only import items that are in this list from the file
provided, so this provides a way to limit which items get imported.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()'
and 'Do $system.OBJ.ShowFlags()'.
When loading a %RO file the description variable will be filled in
with the description from the %RO file if there is one present.
errorlog is an array of the %Status return
values from this call, in the format returned by $system.Status.DecomposeStatus.
The displayname is normally not provided. If present
it changes the 'load file XYZ' name from the filename to the displayname. This is useful when loading a stream where the
stream filename is not the name of the file the user knows from a client system and we want to present a meaningful name.
If the filename ends in .gzip or .gz then we ungzip this file before loading it.
Load and optionally compile (if 'c' flag is present) all class definitions within
directory dir, this includes all .XML files.
If the recurse is true then it will include subdirectories.
Returns a comma separated list of the items it loaded in loadedlist and the same
data also as loadedlist(name)="" in case the comma list is more than 32k. Note that this will
only compile classes found in these XML files and no other types. If you want to be able to compile
anything use the ImportDir().
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()'
and 'Do $system.OBJ.ShowFlags()'.
Load and, optionally compile (if 'c' flag is present), class definitions, CSP pages, routines or globals from the
stream stream. Returns an array of the items
it loaded in loadedlist. If you pass listonly as true then it will not
import anything but just list the items that exist in the stream that you supply.
If selecteditems is defined then this will contain a comma separated list
of items to import (or a single subscripted array). It will only import items that are in this list from the stream
provided, so this provides a way to limit which items get imported.
qspec is a list of flags or qualifiers which can be displayed with 'Do $system.OBJ.ShowQualifiers()'
and 'Do $system.OBJ.ShowFlags()'.
Create a new object instance of type ClassName and return a reference (OREF) to it.
Using this method, you can dynamically create objects, that is you can determine what type of object to create at run-time.
For example:
Set obj = $System.OBJ.New("Person")
Load persistent object instance of type ClassName and with OID value oid from disk and return a reference (OREF) to it.
For example:
Set person = $System.OBJ.Open("Person",oid)
Load persistent object instance of type ClassName and with ID value id from disk and return a reference (OREF) to it.
For example:
Set person = $System.OBJ.OpenId("Person",22)
The Extent Index is an index on all persistent classes that are runnable in the current namespace. It is currently used by %BuildIndices, %KillExtent, and the %FindGUID utility function in %Library.GUID. Other uses may be added at a later time.
The index is maintained in the globals database in the current namespace. If the globals database in the current namespace is readonly then an error will be returned. The class compiler automatically maintains this index for classes compiled in the namespace. Classes mapped from other namespaces are not automatically added to or removed from the index when mapping changes or changes to the class runtime occur in the original namespace. Such changes must be updated in the local namespace's extent index by running a utility function. There are two functions, this function will rebuild the index completely and RebuildExtentIndexOne() will rebuild the index entries for only the specified class.
This function returns a status value indicating success or failure.
Parameters
Name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
updateMode |
If zero then the extent index is purged and rebuilt completely. Otherwise, the existing index is checked against existing defintions and only changed classes are rebuilt. |
||||||||
lockMode |
Specifies the type of locking to be used while modifying the index. If the requested locks cannot be obtained then an error is reported to the caller.
|
||||||||
The return value is a %Status value indicating success or failure. |
This function updates the extent index for the specified class in the current namespace. If the globals database in the current namespace is readonly then an error will be returned. Call this function to rebuild the extent index for a single class in the current namespace. Refer to RebuildExtentIndex() for more information.
This function returns a status value indicating success or failure.
Parameters
Name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
className |
The name of the class to be indexed. |
||||||||
lockMode |
Specifies the type of locking to be used. If the requested locks cannot be obtained then an error is reported to the caller.
|
||||||||
The return value is a %Status value indicating success or failure. |
0 | No concurrency controls |
1 | Atomic |
2 | Shared |
3 | Shared retained |
4 | Exclusive |
------------------------------------------------------------------------------- Method: SetMPPOption Definition: This method sets the specified Macro Pre-Processor (MPP) Configuration Settings 'optionName' to the specified 'optionValue'. This method also returns the original value via the PBR 'oldValue' parameter, along with the invocation status via the method's return value. Options: The following is a list of currently supported Macro Pre-Processor Configuration Settings Options: optionName/optionValue Description ------------------------- ----------------------------------- MPPParsingMode - The MPP's Parsing Mode {1 | 2} 1 - Standard Macro Pre-Processor Parsing [$$$MPPParsingModeStandard] 2 - Enhanced Macro Pre-Processor Parsing [$$$MPPParsingModeEnhanced] This mode supports $$$MACRO[(args)] Recursion Parsing [DEFAULT: 1 = $$$MPPParsingModeDefault] MacroMaxRecursionNoArg - The maximum allowed sub-string repetitions between $$$MACRO references (without arguments) of the same name {3...n} 3 - The minimum number to determine $$$MACRO Recursive Referencing or Self-Referencing n - This number can be increased, but should never need to be for $$$MACRO references without arguments [DEFAULT: 3 = $$$MacroMaxRecursionNoArgDefault] MacroMaxRecursionGotArg - The maximum allowed sub-string repetitions between $$$MACRO(...) references (with arguments) of the same name {10...n} 10 - The minimum number to determine $$$MACRO(...) Recursive Referencing or Self-Referencing n - This number can be increased for $$$MACRO(...) references (with arguments) that may exceed 10 nesting levels, but this should be very rare Example: $$$A($$$A($$$A(...))) [DEFAULT: 10 $$$MacroMaxRecursionGotArgDefault] Restriction: You must have the "USE" permission on the %Admin Manage Resource in order to change this MPP Configuration Setting. Notes: - Changing this MPP Configuration Setting will affect all processes immediately. - This is a system-wide setting. Invocation: This method can be invoked in the following ways: ObjectScript: $SYSTEM.OBJ.SetMPPOption(...) SQL: N/A Examples: The following examples shows the use of this method: #1 Set the 'MPPParsingMode' option of the Macro Pre-Processor to the value two (2), which specifies the use of the Enhanced Parsing to check for $$$MACRO[(args)] Recursion: set tSC=$SYSTEM.OBJ.SetMPPOption("MPPParsingMode",2,.oldVal) Data Storage: ^%SYS("MPP","Parsing") & ^%SYS("MPP","MacroRecursion") Parameters: optionName - The Pre-Processor (MPP) Configuration Settings 'option' name. The following is a list of currently supported Macro Pre-Processor Configuration Settings Options: - MPPParsingMode - MacroMaxRecursionNoArg - MacroMaxRecursionGotArg optionValue - The value to set for the specified 'optionName' oldValue - A Pass By Reference (PBR) parameter which returns the old MPP Configuration Setting value RETURN Value: The status from the invocation of this method -------------------------------------------------------------------------------
0 | No transactions used for Object filing |
1 | Use transactions for Object filing |
The optional qspec argument is a qualifier string containing any of the following options:
/detail | Show details. |
/hidden | Show hidden classes. |
/mapped | Show mapped classes. |
For example:
Do $System.OBJ.ShowClasses("/detail")
The optional qspec argument is a string containing any of the following characters:
/detail=1 | Show details. |
For example:
Do $System.OBJ.ShowObjects("/detail=1")
The list has the base $STACK level of the variable, the internal stack level (as shown by the %STACK utility), and the variable name.
Parameters:
- classname
- Name of the persistent class to validate indices for.
- idxList
- Optional. "" to check all indices, or specify a $list of index names to check. Default=""
- autoCorrect
- Optional. If true, correct any errors found. Default=0
- lockOption
- Optional. Default = 1 0 - No locking is performed at all 1 - Shared locking as each row is checked 2 - exclusive lock on entire table for duration of the run
- multiProcess
- Optional. If true, parts of %ValidateIndices will use parallel processing when possible. Default=0
- verbose
- Optional. If true, display output to the current device. Default=1. When called for a sharded class, verbose is force to 0.
- errors
- Optional. Passed by reference. Returns an array of errors found in the index(es) validated. If autoCorrect=1, this is an array of issues corrected.
Returns:
Example:
Note::
Indices may also be validated by calling the class method ##class(classname).%ValidateIndices(idxList,autoCorrect,lockOption,verbose).
There is one main difference between validating indices through $SYSTEM.OBJ.ValidateIndices() and ##class(classname).%ValidateIndices().
$SYSTEM.OBJ.ValidateIndices() will validate the indices for a table, and it will also validate any indices in collection child tables for that table.
When using ##class(classname).%ValidateIndices(), collection child table indices must be checked with separate calls.
Also, when calling $SYSTEM.OBJ.ValidateIndices(), multiProcess default is 0. When calling ##class(classname).%ValidateIndices(), multiProcess default is 1.
Queries
- 0 - Time class was compiled (default)
- 1 - Classname
- 2 - InterSystems IRIS version