Functions and components on IBM i

Use this information to understand the functions and components, entry-points, return codes, and component data that we can use in IBM MQ for IBM i.

Each service consists of a set of related functions. For example, the name service contains function for:

  • Looking up a queue name and returning the name of the queue manager where the queue is defined
  • Inserting a queue name into the service's directory
  • Delete a queue name from the service's directory

It also contains initialization and termination functions.

An installable service is provided by one or more service components. Each component can perform some or all of the functions that are defined for that service. The component is also responsible for managing any underlying resources or software that it needs to implement the service. Configuration files provide a standard way of loading the component and determining the addresses of the functional routines that it provides.

Services and components are related as follows:

  • A service is defined to a queue manager by stanzas in a configuration file.
  • Each service is supported by supplied code in the queue manager. Users cannot change this code and therefore cannot create their own services.
  • Each service is implemented by one or more components; these can be supplied with the product or user-written. Multiple components for a service can be invoked, each supporting different facilities within the service.
  • Entry points connect the service components to the supporting code in the queue manager.


Entry-points

Each service component is represented by a list of the entry-point addresses of the routines that support a particular installable service. The installable service defines the function to be performed by each routine. The ordering of the service components when they are configured defines the order in which entry-points are called in an attempt to satisfy a request for the service. In the supplied header file cmqzc.h, the supplied entry points to each service have an MQZID_ prefix.


Return codes

Service components provide return codes to the queue manager to report on a variety of conditions. They report the success or failure of the operation, and indicate whether the queue manager is to proceed to the next service component. A separate Continuation parameter carries this indication.


Component data

A single service component might require data to be shared between its various functions. Installable services provide an optional data area to be passed on each invocation of a particular service component. This data area is for the exclusive use of the service component. It is shared by all the invocations of a given function, even if they are made from different address spaces or processes. It is guaranteed to be addressable from the service component whenever it is called. We must declare the size of this area in the ServiceComponent stanza.

Parent topic: Installable services and components on IBM i