Method

Description

Parameter

Return Values

 

 

 

 

Connect

Provides a connection to the

void or a

CD_SUCCESS or

 

Sterling Connect:Direct server.

pointer to an

CD_FAILURE

 

Connect() with a void parameter

IP address

 

 

and port.

 

 

connects to the hostname and

 

 

 

port specified in the client

 

 

 

configuration file.

 

 

 

 

 

 

DisConnect

Disconnects the current session.

void

CD_SUCCESS or

 

 

 

CD_FAILURE

 

 

 

 

SendCommand

Sends a Sterling Connect:Direct

Pointer to a

CD_SUCCESS or

 

command to the server for

command

CD_FAILURE

 

processing.

text buffer.

 

 

 

 

 

ReceiveResponse

Receives the response from a

void

CD_SUCCESS or

 

previously issued command,

 

CD_FAILURE

 

such as the select statistics

 

 

 

command.

 

 

 

 

 

 

GetResponse

Retrieves the response from the

void

Pointer to a

 

ReceiveResponse call.

 

response buffer.

 

 

 

 

GetResponseLength

Returns the length of the

void

Length of the

 

previously received response

 

response buffer from

 

buffer.

 

the previously

 

 

 

issued call.

 

 

 

 

MoreData

Returns a value indicating if

void

TRUE—If more data

 

outstanding data from the

 

is outstanding.

 

previously issued send

 

FALSE—If no data

 

command call is available. If the

 

 

return value is TRUE, call

 

is outstanding.

 

ReceiveResponse again to

 

 

 

retrieve more data.

 

 

 

 

 

 

GetCommandName

Returns the command name of

void

Pointer to a

 

the previously issued send

 

command name

 

command, such as the submit

 

buffer.

 

command.

 

 

 

 

 

 

GetProcessNumber

Returns the Process number of a

void

Process number of a

 

previously issued submit

 

submit command.

 

command.

 

-1—If no submit

 

 

 

 

 

 

command can be

 

 

 

found.

 

 

 

 

GetProcessCount

Returns the number of Processes

void

Process number of a

 

affected by the last send

 

submit command

 

command that issued a delete,

 

that issued a delete,

 

change, or flush process.

 

change or flush

 

 

 

process.

 

 

 

-1—If no submit

 

 

 

command can be

 

 

 

found.

 

 

 

 

GetCurrentError

Moves the error data pointer to

void

TRUE—If successful

 

the current error in the list.

 

FALSE—If no

 

 

 

current error exists.

 

 

 

 

GetNextError

Moves the error data pointer to

void

TRUE—If successful

 

the next error in the list.

 

FALSE—If no more

 

 

 

 

 

 

errors are found.

 

 

 

 

Chapter 4. Writing Custom Programs 71

Page 77
Image 77
IBM 4J manual Method Description Parameter Return Values, Cdfailure