Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

GET-JOB-FROM-VIRTUAL-DEVICE

&pagelevel(3)&pagelevel

Request print job from virtual printer

Component:

SPOOL                                                                                                         

Functional area:

Controlling spoolout job

Domain:

SPOOL-PRINT-SERVICES

Privileges:

STD-PROCESSING
PRINT-SERVICE-ADMINISTRATION

Function

The GET-JOB-FROM-VIRTUAL-DEVICE command requests a new print job from the virtual device. It is executed in batch mode only.

By default, the original user file is copied into the calling task’s user ID, and a definition of the print job is generated in a metadata file. Both files are created with a default name which contains the identification number of the print job as a name component. This identification number is stored in the specified S variable.

Optionally a user-specific file name prefix can be defined for each of the files. Creation of the files and S variable can also be suppressed.

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

GET-JOB-FROM-VIRTUAL-DEVICE                                                                                                           

FILE-PREFIX = *STD / *NONE / <partial-filename 1..25>

,METADATA-PREFIX = *STD / *NONE / <partial-filename 1..25>

,OUTPUT-DOC-ID = *STD / *NONE / <structured-name 1..20>

Operands

FILE-PREFIX = *STD / *NONE / <partial-filename 1..25>
Specifies whether the original user file is to be copied and which prefix should be assigned to the name of the copy.

FILE-PREFIX = *STD
The original user file is copied under the following file name:
$<userid>.S.VIRTUAL.DOC.<document-id>.000
where <userid> is the user ID of the calling task and <document-id> is the identification number of the print job (see the OUTPUT-DOC-ID operand).

FILE-PREFIX = *NONE
The original user file is not to be copied.

FILE-PREFIX = <partial-filename 1..25>
The original user file is copied with a prefix under the following file name:
$<userid>.<file-prefix>.<document-ID>.000
where <userid> is the user ID of the calling task and <document-id> is the identification number of the print job (see the OUTPUT-DOC-ID operand).

METADATA-PREFIX = *STD / *NONE / <partial-filename 1..25>
Specifies whether metadata of the print job is to be created and which prefix should be assigned to the metadata file.

METADATA-PREFIX = *STD
The metadata of the print job is to be created in a file with the following name: $<userid>.<metadata.prefix>.<document-id>
where <userid> is the user ID of the calling task and <document-id> is the identification number of the print job (see the OUTPUT-DOC-ID operand).

METADATA-PREFIX = *NONE
No file containing the metadata of the print job is to be created.

METADATA-PREFIX = <partial-filename 1..25>
The metadata of the print job is to be created in a file with the specified prefix in the name: $<userid>.<metadata-prefix>.<document-id>
where <userid> is the user ID of the calling task and <document-id> is the identification number of the print job (see the OUTPUT-DOC-ID operand).

OUTPUT-DOC-ID = *STD / *NONE / <structured-name 1..20>
Specifies whether the identification number of the print job is to be output in an S variable.

OUTPUT-DOC-ID = *STD
The identification number of the print job is generated in the DOC-ID variable.

OUTPUT-DOC-ID = *NONE
The identification number of the print job is not generated.

OUTPUT-DOC-ID = <structured-name 1..20>
The identification number of the print job is generated in the specified S variable.

Return codes

(SC2)

SC1

Maincode

Meaning


0

CMD0001

No error; command successfully processed


32

SCP0974

Unexpected command

5

32

SCP0974

Memory request error

Notes

  1. If the original user file was copied (value of the FILE-PREFIX operand not equal to *NONE), normalization of this file takes place in the target file. This means that the original user file is copied into a SAM file (conversion, library member is extracted, etc.). This file is stored as not shareable under the calling task’s user ID.

  2. The user ID assigned to the application (i.e. the user ID under which the calling application task is executed) corresponds to the user ID (default: SYSSPOOL) specified for the device record (PROGRAM-NAME operand).

  3. The metadata file is created as an ISAM file with the file attributes KEY-POS=5, KEY-LEN=64, BUF-LEN=STD(2) and USER-ACC=OWNER-ONLY. The ISAM key (64 characters) corresponds to the attribute name and the field (consisting of 1024 characters) corresponds to the attribute value.

  4. If the dialog cannot be initialized, the command is rejected and a return code is set.

  5. If no initialization took place (OPEN-VIRTUAL-DEVICE-DIALOG command), the command is rejected and a return code is set.

  6. If the print job has already been returned (RETURN-JOB-TO-VIRTUAL-DEVICE command), the command is rejected and a return code is set.

  7. This command can only be used in batch mode.

  8. Spin-off processing is activated each time an error is detected.

Output in S variable

Output information

Name of the S variable

T

Contents

Condition

Identification number of the associated print job

var(*LIST).DOC-ID

S

<document-id>