VM2000 returns information on the analysis of the command entered and on the execution of the command in a command return code. This command return code can be compared with a return code in a program and allows to react appropriately to specific errors.
The command return code comprises three parts:
The maincode, a message code that can be specified with the
HELP-MSG-INFORMATION
command in order to obtain detailed information.Subcode 1, which assigns the error situation to an error class that indicates how serious an error is.
Subcode 2, which can contain supplementary information (a value other than zero).
Command return codes which can be returned by a VM2000 command on execution form part of the command description. In each case, a table follows the command description showing subcode 1, subcode 2, the main code and the meaning. VM2000 knows the following general return codes:
(SC2) | Main code | Meaning |
0 | CMD0001 | Command successfully executed |
ERROR-MECHANISM=*SPIN-OFF-COMPATIBLE
(SET-/MODIFY-PROCEDURE-OPTIONS
), VM2000 information commands do not trigger the spin-off mechanism.Command return codes in a user task
When VM2000 commands are input via a privileged user task, the command return code is stored in standardized S variables and can be analyzed with the built-in functions of SDF-P-BASYS - MAINCODE
, SUBCODE1
and SUBCODE2
, see the “Commands“ manual [13].
Command return codes via $VMCONS or at a BS2000 console
With command input via $VMCONS or from a BS2000 console, the command name and the command return code are output as inserts of the standard termination message NBR0740
(guaranteed message), e.g.
NBR0740 COMMAND COMPLETED 'ADD-VM-DEVICES';
(RESULT: SC2=000, SC1=000, MC=CMD0001); DATE: <date>
Commands, operands and operand values which are not supported
Some of the VM2000 commands, operands and operand values have no meaning on certain Server Units and are not supported on them, see also paragraph “Notational conventions” in section "VM2000 commands". If they are entered despite this, they are rejected by VM2000 with a message and a return code.
Entry | Message | Return code |
---|---|---|
Command | VMS3011 | 0, 64, VMS9004 |
Operand | VMS3012 | 0, 64, VMS9004 |
Operand value | VMS3032 | 0, 64, VMS9004 |