This category includes the following APIs:
Print Job - DosPrintJobContinue
Print Job - DosPrintJobDel
Print Job - DosPrintJobEnum
Print Job - DosPrintJobGetId
Print Job - DosPrintJobGetInfo
Print Job - DosPrintJobPause
Print Job - DosPrintJobSetInfo
Print job APIs control the print jobs in a printer queue on a server. A print job is a file submitted for printing.
The print job APIs use the NETCONS.H, NETERR.H, and PMSPL.H header files, and support 16-bit applications. For 32-bit spooler API support, see the OS/2 Warp, Version 3 Technical Library.
Note: For all the print APIs, DLS applications should use the DOSPRINT.H header file instead of PMSPL.H. Also, you do not need to include OS2.H or #define INCL_BASE. For example, use:
#include <dosprint.h>
for DLS applications instead of:
#define INCL_BASE #include <os2.h> #include <pmspl.h>
which is used only for 16-bit OS/2 applications.
For more information about the print APIs, see the Presentation Manager Programming Reference Volume 1 and Volume 2, the IBM OS/2 Version 1.3 Programming Guide Technical Update, and the documentation accompanying your IBM OS/2 Programming Toolkit.
Print jobs are identified by an integer job identifier (job). This identifier is unique on a particular computer, not only within a queue. A combination of computer name and job identifier is sufficient to identify any job on the network. A job is assigned a job identifier by the spooler when the job is queued.
Print jobs are submitted to a printer queue and stored there until a printer is available. To submit a print job to a printer queue, an application first opens the printer queue by implicitly or explicitly establishing a connection to it.
To open the same remote printer queue through an explicit connection, an application redirects a local device name (such as LPT1: or LPT2:) to the printer queue by calling NetUseAdd. The application performs an open on the redirected device name with DosOpen.
After opening the printer queue, the application can submit files to the queue by calling DosWrite. DosWrite does not accept the name of a file, but instead writes a buffer of information.
Once a print job is queued, use the print job APIs to control when the print job is printed. You can change the position of a print job in the queue, pause a print job, or delete it from the queue.
When an application no longer requires the use of a printer queue, it should close the queue by calling DosClose.
DosPrintJobSetInfo uses the level 1 data structure PRJINFO and the level 3 data structure PRJINFO3. DosPrintJobEnum uses levels 0, 1, and 2. DosPrintJobContinue uses levels 0, 1, 2, and 3.