HCON Library
C (libg3270.a)
Pascal (libg3270p.a)
FORTRAN (libg3270f.a)
#include <g32_api.h>
g32_close (as)
struct g32_api *as;
function g32clse (var as : g32_api) : integer; external;
EXTERNAL G32CLOSE
INTEGER AS(9), G32CLOSE
RC = G32CLOSE(AS)
The g32_close function disconnects from a 3270 session. If the g32_open or g32_openx function created a session, the g32_close function logs off from the host and terminates the session. A session must be terminated (using the g32_dealloc function) before issuing the g32_close function.
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.
as | Specifies a pointer to a g32_api structure. Status is returned in this structure. |
as | Specifies a g32_api structure. |
AS | Specifies the g32_api equivalent structure as an array of integers. |
0 | Indicates successful completion. |
-1 | Indicates an error has occurred. |
The following example fragment illustrates the use of the g32_close function in C language:
#include <g32_api.h> /* API include file */ main() { struct g32_api *as; /* g32 structure */ int return; . . . return = g32_close(as); . . .
The g32_close function is part of the Host Connection Program (HCON).
The g32_close function requires one or more adapters used to connect to a host.
/usr/include/g32_api.h | Contains data structures and associated symbol definitions. |
/usr/include/g32const.inc | Defines Pascal API constants. |
/usr/include/g32hfile.inc | Defines Pascal API external definitions. |
/usr/include/g32types.inc | Defines Pascal API data types. |