Sends a message to an API application running simultaneously on the local system.
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.
The G32WRITE function requires one or more adapters used to connect to a mainframe host.
| Item | Description | 
|---|---|
| MSG |   Gives the address of the message to be sent. It may be:  
  | 
| 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:  
  | 
The G32WRITE function sets register 0 to the following values:
| Value | Description | 
|---|---|
| 0 | Indicates a normal return; call successful. | 
| < 0 | Less than 0. Indicates a host API error condition. | 
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)