[ Previous | Next | Contents | Search ]
3270 Host Connection Program 2.1 and 1.3.3 for AIX: Guide and Reference

CONNECT PRESENTATION SPACE (1)

Purpose

Establishes a connection between a HLLAPI application program and a specified host Presentation Space (PS).

Prerequisite Calls

This function requires no prerequisite calls to other functions.

Syntax

hllc (func, apistring, len, ret)
int *func;
char *apistring;
int *len;
int *ret;

Supplied Parameters

Supply the following parameters to invoke the CONNECT PRESENTATION SPACE function:

func Specifies the number of the function called; must be 1 for the CONNECT PRESENTATION SPACE function.
apistring Specifies the address of the parameters of the calling function; must be the one-character short session ID of the host PS.
len Specifies the address of the length of the parameter of the calling function; does not apply to the CONNECT PRESENTATION SPACE function (1 is implied).
ret Specifies the address of the returned value of the calling function; does not apply to the CONNECT PRESENTATION SPACE function.

Returned Parameters

The CONNECT PRESENTATION SPACE function sets the return code to indicate the status of the attempt and, if successful, the status of the host PS.

ret Specifies the address of the returned value of the calling function; does not apply to the CONNECT PRESENTATION SPACE function. The following return codes are valid:
0 Indicates the CONNECT PRESENTATION SPACE function was successful; the host PS is connected and ready for input.
1 Indicates an incorrect short session ID for the host PS was specified.
4 Specifies that a successful connection was achieved, but the host PS is busy.
5 Specifies that a successful connection was achieved, but the host PS is locked (input inhibited).
9 Indicates a system error occurred.
11 Specifies that this resource is unavailable. The host PS is already being used by another system function.

Remarks

When establishing a connection between your HLLAPI application and a specific host PS, remember that the HLLAPI application can connect to multiple PSs, but not concurrently. The connections must be sequential, and the application cannot go back and forth between connections without reconnecting. Calls requiring the CONNECT PRESENTATION SPACE function as a prerequisite use the currently connected PS. For example, if an application connects to PSs A, B, and C in that order, the application must connect to B or A again in order to issue functions against that PS. PSs not connected to this application are available for use by other HLLAPI applications.

Note: The maximum number of connected sessions per program is 10. A user can connect and disconnect several sessions as long as the maximum connects never exceeds 10.

A user connecting to an HCON session must be a valid HCON user with configured sessions. Connection to other users is not allowed.

The RESET SYSTEM (21) function causes the HLLAPI application to disconnect from its Presentation Space.

Related Information

DISCONNECT PRESENTATION SPACE (2) or RESET SYSTEM (21) function.


[ Previous | Next | Contents | Search ]