Syntax
GS statusParameters
status
Indicates the error status.
This must be a string-primitive variable, with a minimum length of 5.
Description
The GS command option directs the error status of its associated logic command to a specified variable, instead of the Glb.Status built-in segment attribute.
The variable is set to Glb.Spaces before the associated logic statement is executed. The variable is assigned the result after the execution of the associated logic statement or completion of the logic loop created by the associated logic statement.
Valid associated logic commands are:
Notes:
The GS cosmmand option has an additional effect when specified in association with the Move logic command. Refer to Move for more information.
When not used on MCP-based systems in some computation commands (such as Add, Multiply, Subtract, Divide and Compute) and an overflow occurs, the System or Report could abnormally terminate.
Example
Determine Every Stock (Product) GS SDStock
: Logic
Determine Every Inven (Product) GS SDInven
: Logic
End
DoWhen SDInven = "*****"
Message Attention "No record read on Inven profile"
End
End
DoWhen SDStock = "*****"
Message Attention "No record read on Stock profile"
EndExit
Multiply Qty CostPr Giving TCost GS CostChk
DoWhen CostChk = "*****"
Message Error "Quantity beyond stated budget"
EndExit