[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 1

g32_dealloc Function


Ends interaction with a host application.


HCON Library

C (libg3270.a)

Pascal (libg3270p.a)

FORTRAN (libg3270f.a)

C Syntax

#include <g32_api.h>

g32_dealloc( as)

struct g32_api *as;

Pascal Syntax

function g32deal (var as : g32_api) : integer; external;






The g32_dealloc function ends interaction with the operating system application and the host application. The function releases control of the session.

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.

C Parameters

as Specifies a pointer to a g32_api structure. Status is returned in this structure.

Pascal Parameters

as Specifies the g32_api structure.

FORTRAN Parameters

AS Specifies the g32_api equivalent structure as an array of integers.

Return Values

0 Indicates successful completion.
-1 Indicates an error has occurred.
  • The errcode field in the g32_api structure is set to an error code identifying the error.
  • The xerrinfo field can be set to give more information about the error.


The following example illustrates the use of the g32_dealloc function in C language:

#include <g32_api.h>      /* API include file */
main ()
struct g32_api *as, asx;   /* asx is statically defined */
int session_mode = MODE_API;   /* api session mode. Other
               modes are MODE_API_T */
char appl_name [20];      /* name of the application to
               run on the host          */
int return;         /* return code              */
strcpy (appl_name, "APITESTN");   /* name of host application  */
return = g32_alloc(as, appl_name, session_mode);
return = g32_dealloc(as);

Implementation Specifics

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

The g32_dealloc 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.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]