Return print job to virtual printer
Component: | SPOOL |
Functional area: | Controlling spoolout job |
Domain: | SPOOL-PRINT-SERVICES |
Privileges: | STD-PROCESSING |
Function
The RETURN-JOB-TO-VIRTUAL-DEVICE command returns the current print job to the virtual device. It is executed in batch mode only.
The POST-ACTION operand determines whether the print job is canceled as a result of being returned or the status which it is assigned when it remains in the Spool&Print queues. This specification ultimately decides whether the application retains control over this print job.
When the print job remains in the keep or wait status, the ERROR-MSG operand can be used to specify that an error message is also output.
The command is part of a set of four commands which enable an application to be created in the form of an S procedure (for an example, see the OPEN-VIRTUAL-DEVICE-DIALOG command). These commands manage the dialog between a virtual device and the application which was started in batch mode as an S procedure:
OPEN-VIRTUAL-DEVICE-DIALOG
GET-JOB-FROM-VIRTUAL-DEVICE
RETURN-JOB-TO-VIRTUAL-DEVICE
CLOSE-VIRTUAL-DEVICE-DIALOG
Format
RETURN-JOB-TO-VIRTUAL-DEVICE |
POST-ACTION = *WAIT / *KEEP / *CANCEL-JOB / *TERMINATE-JOB / *ERROR ,ERROR-MSG = *NONE / <alphanum-name 7..7> |
Operands
POST-ACTION = *WAIT / *KEEP / *CANCEL-JOB / *TERMINATE-JOB / *ERROR
Specifies which action must be performed on the returned print job.
POST-ACTION = *WAIT
The current print job is set to wait status in the Spool&Print queues.
POST-ACTION = *KEEP
The current print job is set to keep status in the Spool&Print queues. If a message number is specified in the ERROR-MSG operand, this message is displayed on the console and in the output of the SHOW-PRINT-JOB-STATUS command.
POST-ACTION = *CANCEL-JOB
The current print job is no longer displayed in the Spool&Print queues. The status display of any MONJV which is assigned is set to “$A”. The associated file is not deleted (irrespective of the DELETE-AFTER-PRINT option for the print job). In the case of a family job, all the family’s jobs are canceled.
POST-ACTION = *TERMINATE-JOB
The current print job is no longer displayed in the Spool&Print queues. The status display of any MONJV which is assigned is set to “$T”. Whether the associated file is deleted is determined by the DELETE-AFTER-PRINT option for the print job.
POST-ACTION = *ERROR
*ERROR means that the current print job is set to wait status in the Spool&Print queues and the application task is deleted. An error message (ERROR-MSG operand) may be sent to the console.
ERROR-MSG = *NONE / <alphanum-name 7..7>
Specifies whether or which error message is to be displayed on the console. An error message is output only if *KEEP or *ERROR was specified in the POST-ACTION operand.
Return codes
(SC2) | SC1 | Maincode | Meaning |
---|---|---|---|
0 | CMD0001 | No error; command successfully processed | |
32 | SCP0974 | Unexpected command | |
5 | 32 | SCP0974 | Memory request error |
Notes
If the dialog cannot be initialized, the command is rejected and a return code is set.
If no initialization took place (OPEN-VIRTUAL-DEVICE-DIALOG command), the command is rejected and a return code is set.
If no print job was requested (GET-JOB-FROM-VIRTUAL-DEVICE command), the command is rejected and a return code is set.
This command can only be used in batch mode.
Spin-off processing is activated each time an error is detected.