Glb.Status

Glb.Status is a read-writable built-in segment attribute that indicates the result status of some logic commands. It can be set to one of a range of values, depending upon the circumstances in which it is set. The most common values are spaces when there is no error, and five asterisks ("*****") when there is an error.

Glb.Status can be set (to a non-space value) in the following situations:

Notes:

  • Some logic commands do not automatically set Glb.Status, but it can be explicitly set using the GS command option in conjunction with those logic commands. The arithmetic logic commands, Add, Subtract, Multiply, and Divide are of this type.

  • When using arrays, do not use Glb.Status for anything other than index verification. Instead, use the GS variant of the DateConvert logic command.

Refer to the relevant logic commands for more information on the values to which Glb.Status might be set.

Initialization

Glb.Status is set to the <Glb.Spaces> built-in segment attribute before the following logic commands are executed:

Glb.Status is also set to Glb.Spaces before the Store built-in method is invoked, and when an array member with a valid index is referenced by a DoWhen logic statement.

Overwriting status values

The Glb.Status value can be changed in a DoWhen logic statement. You should exercise caution when coding complex decision logic that involves more than one logical expression.

Consider the following logic:

DoWhen Glb.Status NOT = Glb.Spaces AND
ARRAY-ITEM[INDEX] NOT = VALUE

You might be checking the result of a previous action in the first logical expression, but the test on an array variable in the second logical expression also affects Glb.Status, and overwrites the Glb.Status value that you intended to check. You might control this by ensuring that expressions are set out in the order that you expect them to be evaluated (generally left to right) and by judicious use of parentheses to control the order of evaluation.

Properties

Length = 5

Primitive = String