11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

System and Other Functions$ZUTIL(18)Sets undefined variable handling for the current process.$ZUTIL(18,n)$ZU(18,n)ParametersnOptional — A numeric code that determines how <strong>Caché</strong> treats an undefinedvariable. If you omit n, $ZUTIL(18) returns the current value without changing it.DescriptionUse $ZUTIL(18) to define how undefined variables are to be handled in the current process.The value you specify for n determines the behavior of <strong>Caché</strong> when it encounters an undefinedvariable. Setting n changes this behavior for local, process-private global, and global variables;it has no effect on special variables.By default, if a process makes reference to an undefined variable it produces an error. This system-wide default behavior is configurable. Go to the System ManagementPortal, select System Configuration, select Advanced Settings, on the pull-down Categorylist select <strong>ObjectScript</strong>. View and edit the current setting of UndefVarBehavior. The defaultis 0. You can override this default system-wide by using the $ZUTIL(69,0) function.$ZUTIL(18) only affects variables invoked by the current process. $ZUTIL(69,0) onlyaffects variables invoked by subsequent processes; it does not affect the current process.You can call $ZUTIL(18) to return the current setting. When calling $ZUTIL(18,n) thevalue returned is the previous setting, not the value set by the function call.You can use the $GET function to return a default value when a specified variable is undefined.Setting $ZUTIL(18) has no effect on $GET. You can use the ZWRITE command todisplay defined variables that have a null string value; ZWRITE does not display undefinedvariables that return a null string.ParametersnA numeric code that specifies how <strong>Caché</strong> treats an undefined variable in the current process:576 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!