Returns status information of the logical path.
HCON Library
C (libg3270.a)
Pascal (libg3270p.a)
FORTRAN (libg3270f.a)
function g32stat (var as: g32_api) : integer; external;
The g32_get_status function obtains status information about the communication path. The function is called after an API application determines that an error has occurred while reading from or writing to the communication path or after a time out. The HCON session profile specifies the communication path.
The g32_get_status function can only be used in API/API, API/API_T, and API/3270 modes.
HCON application programs using the Pascal language interface must include and link both the C and Pascal libraries. Application programs using the FORTRAN language for the HCON API must include and link both the C and FORTRAN libraries.
The g32_get_status function is part of the Host Connection Program (HCON).
The g32_get_status function requires one or more adapters used to connect to a host.
Item | Description |
---|---|
as | Specifies a pointer to a g32_api structure; status is returned in this structure. |
Item | Description |
---|---|
as | Specifies the g32_api structure. |
Item | Description |
---|---|
AS | Specifies a g32_api equivalent structure as an array of integers. |
Item | Description |
---|---|
0 | Indicates successful completion. |
The values of errcode are as follows:
Error Code | Description |
---|---|
G32_NO_ERROR | 0, indicates no error has occurred. |
G32_COMM_CHK | -1, indicates a communications check has occurred. |
G32_PROG_CHK | -2, indicates a program check has occurred within the emulator. |
G32_MACH_CHK | -3, indicates a machine check has occurred. |
G32_FATAL_ERROR | -4, indicates a fatal error has occurred within the emulator. |
G32_COMM_REM | -5, indicates a communications check reminder has occurred. |
If errcode is anything other than G32_NO_ERROR, then xerrinfo contains an emulator program error code.
Value | Description |
---|---|
-1 | Indicates an error has occurred.
|
The following example fragment illustrates the use of the g32_get_status function in C language:
#include <g32_api.h> /* API include file */
main()
{
struct g32_api *as; /* g32 structure */
int return;
return = g32_write(as, mssg, length);
/* see if unsuccessful */
if (return < 0) {
return = g32_get_status(as);
printf("Return from g32_get_status = %d \n",return);
printf("errcode = %d xerrinfor = %d \n",
as -> errcode , as -> xerrinfo);
.
.
.