/CALL-VM-PROCEDURE is used to start a VM2000 procedure file in which a sequence of VM2000 commands is stored.
All VM2000 commands can be used in the procedure file except the following: /CALL-VM-PROCEDURE, /BEGIN-VM-DIALOG and /END-VM-DIALOG.
The following BS2000 commands are permitted:
/STEP
prevents abortion of the procedure in the event of an error. The procedure is continued normally starting from the/STEPcommand./REMARK
allows comments logged during the command sequence to be inserted in the procedure file.
The procedure file must be cataloged as a SAM or ISAM file. It must have been generated in standard file format, i.e. with a variable record format and with BLKCTRL=DATA and a maximum record length of 2032 bytes. This format is generated by default when the editor EDT is used.
Continuation lines
If a command is longer than one line, the hyphen (-) is used as a continuation character. The hyphen can be positioned after any comma in the operand field and indicates that there is a continuation line. A hyphen may be followed only by blanks.
Each continuation line begins with a slash, followed by the rest of the operands of the command.
Commands in procedure files may have a maximum length of 300 characters, not including hyphens and fill characters (blanks).
A procedure containing commands with continuation lines can no longer be processed by means of /RUN.
Processing the VM2000 procedure file
/CALL-VM-PROCEDURE processes the commands sequentially. If one of the commands produces an error, processing will be continued with the next /STEP.
/CALL-VM-PROCEDURE can be entered only in an ADMIN dialog via $VMCONS. It can be entered not via a user task (where S or non-S procedures are available) or at a monitor system BS2000 console (where such a procedure file can be started using /RUN).
If the procedure file contains commands which are reserved for the VM2000 administrator, /CALL-VM-PROCEDURE must be entered in the ADMIN dialog with the monitor VM.
CALL-VM-PROCEDURE  | 
FILE-NAME = <filename 1..54 without-gen-vers> ,VM-IDENTIFICATION = *CURRENT / <integer 1..99> / <name 1..8> ,LIST = *YES / *NO  | 
FILE-NAME = <filename 1..54 without-gen-vers> 
File name of the procedure file.
VM-IDENTIFICATION = 
Identification of the virtual machine. The VM must already have been initialized.
VM-IDENTIFICATION = *CURRENT 
The VM identification assigned previously by means of /BEGIN-VM-DIALOG is used.
VM-IDENTIFICATION = <integer 1..99> / <name 1..8>
Identifies the virtual machine by means of a VM index or VM name.
VM-IDENTIFICATION operand is quite different to its meaning in other VM2000 commands. In all commands this operand value replaces the default (VM-IDENTIFICATION=*CURRENT or VM-IDENTIFICATION not specified) in the procedure file for which the VM-IDENTIFICATION operand is optional.In case of all commands in the procedure file where the VM-IDENTIFICATION operand is mandatory, the VM-IDENTIFICATION is not replaced.
If /CREATE-VM is used in a procedure file where no specification has been made for the VM-INDEX and VM-NAME operands, they will not be replaced.
LIST =
Defines the type of logging for procedure execution.
LIST = *YES
When the procedure is executed, procedure file commands and messages are logged to the VM terminal.
LIST = *NO
Logging of the commands and messages is suppressed. Only those messages relating to errors which occurred during processing of the procedure are output.
Command return codes
(SC2)  | Main code  | Meaning  | 
0  | CMD0001  | Command successfully executed  | 
Example of a procedure file
/REMARK TESTVM MEMORY=512 MBYTE ———————————————————————————————————————  (1)/CREATE-VM MEM=512,VM-NAME=TESTVM —————————————————————————————————————  (2)/REMARK ADD DEVICES/ADD-VM-DEVICES UNITS=(Z2,Z3,D0,D1),VM-IDENTIFICATION=TESTVM ——————————  (3)/REMARK DIALOG-STARTUP ON TESTVM/START-VM IPL-UNIT=D0,-/INFORMATION-BYTE=*DIALOG,VM-IDENTIFICATION=TESTVM ————————————————————  (4)/STEP —————————————————————————————————————————————————————————————————  (5)/REMARK  TESTVM2 MEMORY=1024 MBYTE/CREATE-VM MEM=1024,VM-NAME=TESTVM2 ———————————————————————————————————  (6)
-----------------------------------------------------------------------------------------------------------------
(1)  | Comment line  | 
(2)  | A VM with the VM name   | 
(3)  | Devices are assigned to the VM with the VM identification   | 
(4)  | The guest system on the VM is started. The command is input with a continuation line.  | 
(5)  | If any of the commands under (2), (3) or (4) cannot be executed, the procedure is continued from (5).  | 
(6)  | An additional VM with the VM name   |