Example:
GTM>DO ^%GSEL Global ^C ^C Current total of 1 global Global ^* ^S ^Y ^c ^class Current total of 5 globals Global ^-S ^S Current total of 4 globals Global ^'Y ^Y Current total of 3 globals Global ^?D ^C ^c ^class Current total of 3 globals Global ^ <RETURN> GTM>ZWRITE %ZG=3 %ZG("^C")="" %ZG("^c")="" %ZG("^class")="" GTM>
This example adds and subtracts globals from the list of selected globals. "?D" displays all globals selected. ZWRITE displays the contents of the %ZG array.
Example:
GTM>DO ^%GSEL Global ^a ^a Current total of 1 global. Global ^<RETURN> GTM>ZWRITE %ZG=1 %ZG("^a")="" GTM>DO CALL^%GSEL Global ^?d ^a Global ^iv ^iv Current total of 2 globals. Global ^<RETURN> GTM>ZWRITE %ZG=2 %ZG("^a")="" %ZG("^iv")="" GTM>
This example uses CALL^%GSEL to add to an existing %ZG array of selected globals.