Parameters
|
Description
|
TYPE
|
This is the address of a one character value indicating data streams to write to
- L - log data stream only
- T - trace data stream only
- B - both log and trace data streams
- A - both log and trace data streams
- Anything else - log data stream only
|
HUB
|
This is the address of a 4 character value indicating the HUB Name
|
LOGREC
|
This is the address of the length followed by the data to be written to the stream (since the length is a half word, the amount of data is limited to 32767). The actual max for the data is based on the z/OS System Logger Stream definition.
|
REASON
|
This is the address of a fullword (int) that will contain a code number based on the results of the call.
|
int
|
This is the return code of the call (0 means call was successful).
|
The following table describes the reason codes in Substation ES:
Codes
|
Description
|
8101
|
Indicates there is no active HUB with the name (4 characters) provided.
Application program terminated with return code 12.
|
User Response: Check the HUB is up and running and the HUB name used is correct.
|
Note: All other reason codes are returned from the z/OS function
IXGWRITE.
Example: COBOL format of data structure and the call.
01 HUB-NAME PIC X(4) VALUE SPACES.
01 WS-TYPE PIC X VALUE 'L'.
01 WS-REASON PIC S9(8) COMP.
01 WS-RETURN PIC S9(8) COMP.
01 WS-LOGREC.
05 WS-LOG-LEN PIC S9(4) COMP-1.
05 WS-LOG-DATA PIC X(32767) VALUE SPACES
CALL "SXGAWLOG"
USING BY REFERENCE HUB-NAME,
BY REFERENCE WS-TYPE,
BY REFERENCE WS-LOGREC,
BY REFERENCE WS-REASON,
RETURNING WS-RETURN
END-CALL.
Example: C format of data structure and the call.
typedef struct
{
short length; //length of data in next array
char data[32767];
} logrec;
#include “SXGHWLOG.h”
int RC;
int reason;
RC = SXGAWLOG(
“HUBA”,
“L”,
&logrec,
&reason);