tot = sys.get_gtot(<cbtot>);
tot = sys.get_gtot(<CBNAME>,<cbtot>);
Or more generally
tot = sys.get_gtot([<CBNAME>,]<cbtot>);
In most cases, sys.get_gtot() will be used with one argument.
When used this way,
it will work with the current CB.
Optional arguments are allowed so that you can get grand total vals
without needing to be processing a particular CB.