[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 1

G32WRITE Function

Purpose

Sends a message to an API application running simultaneously on the local system.

Syntax

G32WRITE MSGLEN

Description

The G32WRITE function sends a message to an API application. The maximum number of bytes that may be transferred is specified by the value returned in register zero (R0) after a successful completion of the G32ALLOC function.

The G32 WRITE function is a HCON API function that can be called by a 370 Assembler applications program.

Parameters

MSG Gives the address of the message to be sent. It may be:
Label A label on a DC or DS statement declaring the message.
0(reg) A register containing the address of the message.
LEN Specifies the length, in bytes, of the message. It is a full word, whose contents cannot exceed the value returned by the G32ALLOC function in R0. It must be:
Label The address of a full word containing the length of the message.

Return Values

The G32WRITE function sets register 0 to the following values:

0 Indicates a normal return; call successful.
< 0 Less than 0. Indicates a host API error condition.

Examples

The following 370 Assembler code example illustrates the use of the host G32WRITE function:

L R11,=v(G32DATA)
USING G32DATAD,R11
G32WRITE MSG1, LEN1      /* write "Hello" to AIX */
LTR R0,R0                /* check return code    */
BE WRITEOK               /* if good, go to write */
( error code )
.
.
.
MSG1 DC  C 'HELLO'
LEN1 DC  AL4(*-MSG1)

Implementation Specifics

The G32WRITE function is part of the Host Connection Program (HCON).

The G32WRITE function requires one or more adapters used to connect to a mainframe host.

Related Information

List of HCON Programming References, Programming HCON Overview in 3270 Host Connection Program 2.1 and 1.3.3 for AIX: Guide and Reference.


[ Previous | Next | Contents | Glossary | Home | Search ]