cwbOBJ_CallExitPgmForSplF

Purpose

Instructs the iSeries™ Access Netprint server program, QNPSERVR, to call down its exit program chain passing this spooled file's ID and some application specified data as parameters.

Syntax

 
unsigned int CWB_ENTRY  cwbOBJ_CallExitPgmForSplF(
                               cwbOBJ_ObjHandle    splFHandle,
                               void               *data,
                               unsigned long       dataLen,
                               cwbSV_ErrHandle     errorHandle);

Parameters

cwbOBJ_ObjHandle splFHandle - input
Handle of the spooled file to be passes as a parameter to the exit programs.
void *data - input
Pointer to a block of date that will be passed to the exit programs. The format of this data is exit program specific.
unsigned long dataLen - input
length of data pointed to by pData.
cwbSV_ErrHandle errorHandle - output
Optional, may be 0. Any returned messages will be written to this object. It is created with the cwbSV_CreateErrHandle() API. The messages may be retrieved through the cwbSV_GetErrText() API. If the parameter is set to zero, no messages will be retrievable.

Return Codes

The following list shows common return values.

CWB_NO_ERROR
Successful completion.
CWB_NOT_ENOUGH_MEMORY
Insufficient memory.
CWB_INVALID_HANDLE
Handle is not valid spooled file handle.
CWBOBJ_RC_HOST_ERROR
Host error occurred. Text may be in errorHandle.
CWBOBJ_RC_INVALID_TYPE
Handle is not a spooled file handle.
CWBOBJ_RC_NO_EXIT_PGM
No exit program is registered with the Network Print server.

Usage

This is a way for a client program to communicate with its server portion to do processing of spooled files. All exit programs registered with the QNPSERVR program on the iSeries server will be called, so it is up to the client program and exit program to architect the format of the data in *data such that the exit program can recognize it. See the iSeries server 'Guide to Programming for Print' for information on the interface between the QNPSERVR server program and the exit programs.