cwbOBJ_CreateSplFHandle

Purpose

Create a spooled file handle for a particular spooled file on a specified system.

Syntax

 
unsigned int CWB_ENTRY  cwbOBJ_CreateSplFHandle(
                               const char          *systemName,
                               const char          *jobName,
                               const char          *jobNumber,
                               const char          *jobUser,
                               const char          *splFName,
                               const unsigned long  splFNumber,
                               cwbOBJ_ObjHandle    *objectHandle,
                               cwbSV_ErrHandle      errorHandle);

Parameters

const char *systemName - input
Pointer to the system name contained in an ASCIIZ string.
const char *jobName - input
Pointer to the name of the iSeries™ job that created the spooled file in an ASCIIZ string.
const char *jobNumber - input
Pointer to the number of the iSeries job that created the spooled file in an ASCIIZ string.
const char *jobNumber - input
Pointer to the user of the iSeries job that created the spooled file in an ASCIIZ string.
const char *splFName - input
Pointer to the name of the spooled file in an ASCIIZ string.
const unsigned long splFNumber - input
The number of the spooled file.
cwbOBJ_ObjHandle *objectHandle - output
On output this will contain the spooled file handle.
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_OK
Successful completion.
CWB_NOT_ENOUGH_MEMORY
Insufficient memory.
CWB_INVALID_PARAMETER
Invalid parameter specified.
CWB_NON_REPRESENTABLE_UNICODE_CHAR
One or more input Unicode characters have no representation in the codepage being used.
CWB_API_ERROR
General API failure.

Usage

This API does no checking of the spooled file on the host. The first time this handle is used to retrieve data for the spooled file, a host error will be encountered if the spooled file doesn't exist.