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

QUERY SESSIONS (10)

Purpose

Returns the valid number of configured host sessions for a user.

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 QUERY SESSIONS function:

func Specifies the number of the function called; must be 10 for the QUERY SESSIONS function.
apistring Specifies the attributes of the API string; should be a preallocated string of at least 12 times the number of configured host sessions.
len Specifies the number of configured host sessions multiplied by 12.
ret Does not apply for this function.

Returned Parameters

apistring Specifies the returned data string containing a 12-byte session description for each of the host sessions. The format of each 12-byte session descriptor follows:
Position 1 Short session ID.
Position 2-9 First 8 bytes of the SESSION USE field of the configuration panel.
Position 10 Session type (H=host).
Position 11-12 Presentation space size. This is a binary number and is not in display format; if the session type is H and is a print session, the value is 0.
Notes:
  1. If the session is active, the actual size is returned. This size is dependent on specific applications and may vary from one screen to the next.
  2. If the session is not active, the configured session size is returned.
len Specifies the number of configured host sessions.
ret The following codes are valid:
0 Specifies that the QUERY SESSIONS function was successful.
1 Specifies that no session has been configured.
2 Specifies that the string length was invalid.
9 Specifies that a system error occurred.

Remarks

The QUERY SESSIONS function returns the valid number of configured host sessions for a user. If your application receives return codes of either 0 or 2, then the number of active sessions is returned in the length field. Your application can use this number to determine the minimum string length required.

Related Information

QUERY SESSION STATUS function.


[ Previous | Next | Contents | Search ]