halt()  start()

Chapter 3: Message Objects and Methods

process()

Description

Sends data to the protocol object. Used in a message AIM to send a string or blob of data to the protocol object and append it to any unprocessed data currently being held by the protocol object. The protocol object then sends the data through the associated message frame and control flow objects for processing. Once the message frames no longer bid on data in the working blob area, program control returns to the function and control flow that called the process() method.

Syntax

int process(string *data);int process(blob *data);

Parameter

Description

data

A pointer to the string or blob object containing the data to send.

Return value

Integer.

Returns a positive integer for success, and 0 for failure.

Usage

In a function

In a control flow

If not using an existing data object, declare a string or blob object, and initialize it with the data.

string mydata; mydata = “some stuff”; proto1.process (&mydata);

where proto1 is the name of the protocol object.

1. Click Object. 2. Select the protocol object from the drop-down list.

3. Select process from the Method drop-down list.

4. In the Command Arguments field, type the address of the data object containing the data to send; for example, &mydata.

5. In the Command Argument declaration field, type string *data where “data” is the name of the data object. If using a blob data object, then type blob *data.





Copyright © 2005. Sybase Inc. All rights reserved. start()

View this book as PDF