Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

KILL^XUSCLEAN: Clear All but Kernel Variables

Reference Type: Supported, Category: Signon/Security, Integration Agreement: 10052


This API clears the partition of all but key variables essential to Kernel. Application programmers are allowed to use this call to clean up application variables and leave the local symbol table unchanged when returning from an option or as otherwise required by SAC Standards.

In the past, options that have called KILL^XUSCLEAN have occasionally created problems for other options that had defined software-wide variables. For example, a user might enter the top-level menu for a software application, which could have an entry action that retrieved site parameters into a local variable that is supposed to remain defined while in any menu of that software application, between options. But if the user could then reach a secondary menu option that happened to call KILL^XUSCLEAN, a side effect would be the KILLing off the previously defined software-wide variable.

KILL^XUSCLEAN now provides a way for sites and developers to work around this problem. For any menu-type option, the PROTECTED VARIABLES field in the OPTION file (#19) allows you to enter a comma-delimited list of variables to protect from being KILLed by KILL^XUSCLEAN. Once a user enters a menu subtree descendent from the protected menu, the variables are protected until the menu subtree is exited.

So, for example, to protect a software-wide variable for an entire software application, you can enter that variable in the PROTECTED VARIABLES field for the top-level menu in the software application. As long as a user does nt exit the top-level menu of the software application's menu tree, the software-wide variable will be protected from all calls to KILL^XUSCLEAN. "Up-arrow Jumps" into a menu tree also work fine, as long as the menu that has been protected is in the menu path made by the jump.



Input Parameters







VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.