PHANTOM |
![]() ![]() ![]() |
The PHANTOM command starts execution of a verb, sentence or paragraph as a background process. This command is not available on the PDA version of QM.
Format
PHANTOM command
A new background process is started to execute the command which must be a valid verb, sentence or paragraph. The process from which the PHANTOM command was performed continues without waiting for command to be completed. A message is displayed indicating the user number associated with the phantom. The user number is also returned in @SYSTEM.RETURN.CODE. If the phantom process cannot be started, @SYSTEM.RETURN.CODE holds the negative error code.
When the background process terminates a message is queued for display immediately before the next command prompt. This message is
Phantom n : Normal termination.
where n is the user number if the process completed successfully or
Phantom n : Abnormal termination.
if the process aborted.
The phantom process will automatically create a COMO file named PHn_date_time exactly as though it had commenced with the command
COMO ON PHn_date_time
Output that would normally be directed to the display is suppressed except for recording in the COMO file. The COMO file may be switched off or redirected as desired.
Any attempt to read data from the keyboard will cause the process to abort. DATA statements may be used in the phantom to supply input that would normally be read from the keyboard.
Phantom processes may not be started within a transaction.
All QM processes, including phantoms, execute the VOC LOGIN paragraph, if it exists. To exit from the LOGIN paragraph for a phantom process, insert a line IF @TTY = 'phantom' THEN STOP at the relevant point in the paragraph. See @TTY for more details.
Example
PHANTOM BASIC BP INVOICE
This command starts a phantom process to compile the QMBasic program in record INVOICE of the BP file. |