CRE Programmer's Guide

CRE Service Functions
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
6-29
CRE_Spool_Start_
max_pages
if present, specifies the maximum number of pages to allow for the spooler job.
CRE_Spool_Start_ passes
max_pages to the max-pages SPOOLSTART
parameter.
Return Value
CRE_Spool_Start_ returns one of the following:
0 if the input operation is successful
A positive number, which is a file system error number
A negative number, which is the negation of a CRE error number from the following
table:
Considerations
CRE_Spool_Start_ invokes the SPOOLSTART system procedure, passing the
parameters it received to SPOOLSTART.
CRE_Spool_Start_ does not validate or alter any of the parameters you specify
except to ensure that the lengths of the
location, form_name, and
report_name parameters are 16 bytes.
The standard file specified by file_ordinal must already be open.
You can only reference the file associated with file_ordinal with calls to
CRE_File_Open_ before you call CRE_Spool_Start_.
The file referenced by file_ordinal must be a spooler collector. If your program
calls CRE_Spool_Start_ after it opens the file and before it calls any other
procedure for the spooled file, the CRE uses the CRE_Spool_Start_
buffering
parameter to determine whether to use simple or buffered spooling.
Error Code Cause
55 Missing or invalid parameter
56 Invalid parameter value
57 Parameter value not accepted
63 Undefined shared file
64 File not open
65 Invalid attribute value
71 Inconsistent attribute value
108 Invalid I/O device