eci_channel.h File Reference
#include <stdlib.h>

Go to the source code of this file.

Detailed Description

Defines functions and typedefs for creating and using channels and containers.

Definition in file eci_channel.h.

Macro Definition Documentation

Definition at line 57 of file eci_channel.h.

Definition at line 113 of file eci_channel.h.

Definition at line 95 of file eci_channel.h.

Unable to create a lock for the channel.

Definition at line 487 of file eci_channel.h.

Both a COMMAREA and a channel are specified.

Definition at line 505 of file eci_channel.h.

A container with the same name already exists in the channel.

Definition at line 502 of file eci_channel.h.

The specified container does not exist in the channel.

Definition at line 499 of file eci_channel.h.

There are no more containers in the channel.

Definition at line 490 of file eci_channel.h.

The channel token is not valid.

Definition at line 478 of file eci_channel.h.

Bad data length.

Definition at line 472 of file eci_channel.h.

The specified name is not valid.

Definition at line 481 of file eci_channel.h.

The container type is not valid.

Definition at line 496 of file eci_channel.h.

Internal error during lock creation.

Definition at line 515 of file eci_channel.h.

The API was unable to allocate sufficient memory to complete the operation.

Definition at line 512 of file eci_channel.h.

The channel token pointer is NULL.

Definition at line 484 of file eci_channel.h.

The ECI_CONTAINER_INFO pointer is NULL.

Definition at line 493 of file eci_channel.h.

A pointer parameter was NULL.

Definition at line 508 of file eci_channel.h.

An internal system error has occurred.

Definition at line 475 of file eci_channel.h.

No error.

Definition at line 469 of file eci_channel.h.

Null channel token.

Definition at line 77 of file eci_channel.h.

Typedef Documentation

Represents a channel object.

Definition at line 74 of file eci_channel.h.

Enumeration Type Documentation

Container type enumeration.

Enumerator:
ECI_BIT 

The container holds binary data.

ECI_CHAR 

The container holds character data.

Definition at line 81 of file eci_channel.h.

Function Documentation

Creates a new channel with the specified name and provides the caller with a channel token for use with other channel related functions.

Channel names are up to ECI_CHANNELNAME_LENGTH characters in length and are case sensitive. Allowable characters are:

  • Uppercase characters A-Z
  • Lowercase characters a-z
  • Digits 0-9
  • Special characters < > $ @ # / % & ? ! : | " = ' ; . - _

It is not possible to modify a channel name after creation.

ECI_CHAR data always has an associated coded character set identifier (CCSID) which describes the encoding of the data.

When a channel is created, a default CCSID is set based upon the encoding of the current locale of the application. If no mapping exists for the current locale, the CCSID for US-ASCII is used.

The default CCSID for a channel is replaced by the CCSID of the first container of type ECI_CHAR to be added to the channel.

Adding subsequent containers of any type or CCSID has no effect upon the channel CCSID and it cannot be changed explicitly.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include
See Also
ECI_createContainer()

Creates a new container in the channel associated with the specified channel token.

Container names are up to ECI_CONTAINERNAME_LENGTH characters in length and are case sensitive. Allowable characters are:

  • Uppercase characters A-Z
  • Lowercase characters a-z
  • Digits 0-9
  • Special characters < > $ @ # / % & ? ! : | " = ' ; . - _

It is not possible to modify a container name or type after creation.

ECI_CHAR data always has an associated coded character set identifier (CCSID) which describes the encoding of the data.

When a container is created of type ECI_CHAR with a CCSID of zero, the container CCSID is set to the channel CCSID.

The default CCSID for a channel is replaced by the CCSID of the first container of type ECI_CHAR to be added to the channel.

Adding subsequent containers of any type or CCSID has no effect upon the channel CCSID and it cannot be changed explicitly.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include
See Also
ECI_createChannel()

Deletes all existing channels and associated containers.

This function can be used by the API program under normal circumstances, or in the event of a severe error, enabling some form of controlled shutdown when references to channel tokens might have been lost.

Returns
An integer value identifies whether the call was successful or not.
Possible values include

Deletes the channel represented by the specified channel token and associated containers.

Following a successful call, any copy of the channel token or ECI_CONTAINER_INFO variable representing an associated container is invalidated.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include

Deletes the named container from the channel associated with the specified channel token.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include

Gets the name of the channel represented by the specified channel token.

Following a successful call, nameBuffer contains a null terminated string up to ECI_CHANNELNAME_LENGTH bytes in length (excluding null terminator). The channel name is set using the ECI_createChannel() function.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include

Gets data from the named container in the channel associated with the specified channel token.

Data from the specified container can be copied to the buffer in a single call or iteratively. The size of the application buffer must be at least the number of bytes specified in parameter length.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include

Gets information about the named container in the channel associated with the specified channel token.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include

Gets the first container from the channel represented by the specified channel token.

Functions ECI_getFirstContainer() and ECI_getNextContainer() enable you to iterate over a set of containers within a channel.

Following a successful call, the referenced struct ECI_CONTAINER_INFO contains details of the first container in the channel.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include
See Also
ECI_getNextContainer()

Gets the next container from the channel represented by the specified channel token.

Functions ECI_getFirstContainer() and ECI_getNextContainer() enable you to iterate over a set of containers within a channel.

Following a successful call, the referenced struct ECI_CONTAINER_INFO contains details of the next container in the channel.

If this call follows a call to the ECI_getFirstContainer() function for the same channel, the container information is set with details of the second container in the channel, if available.

If this call follows a call to the ECI_getNextContainer() function for the same channel, the container information is set with details of the next available container in the channel.

If this call does not follow a call to the ECI_getFirstContainer() or ECI_getNextContainer() function for the same channel, the container information is set with details of the first container in the channel.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include
See Also
ECI_getFirstContainer()

Copies data into the named container in the channel associated with the specified channel token.

Data from the specified location is copied to the named container. If the container type is ECI_CHAR, the data is assumed to be of the same encoding specified on the ECI_createContainer() call.

Parameters
Returns
An integer value identifies whether the call was successful or not.
Possible values include