11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

System and Other FunctionsWhen a new <strong>Caché</strong> process is created, its batch status is 0 (it is categorized as an interactiveprocess). The following code sets its batch status to 1 (categorized as a batch process), whichlessens its resource usage.SET flag=$ZUTIL(68,25,1)WRITE !,"Batch status--former:",flag," current:",$ZUTIL(68,25)As with all $ZUTIL(68) functions, the value returned is the previous setting value, not thenew setting.Once a process has been set in batch status, it keeps that status until it terminates, or untilyou explicitly return it to interactive status as follows:SET flag=$ZUTIL(68,25,0)WRITE !,"Batch status--former:",flag," current:",$ZUTIL(68,25)Invoking $ZUTIL(68,25) without specifying n returns the current switch setting.ParametersnThe boolean switch that controls the status of the issuing process:01Clears batch status and gives the process interactive status. The system defaultsetting is 0.Gives the process batch status.ExampleYou can employ the following sequence of commands to:• Save the current status value• Set a potentially different status• Call a routine or subroutine• Restore the original status612 <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!