ballerinax/ibm.ctg Ballerina library

0.1.0

Overview

IBM CICS Transaction Gateway (CTG) is a robust middleware solution that facilitates communication between distributed applications and IBM CICS Transaction Servers.

The ballerinax/ibm.ctg package provides an API to connect to an IBM CICS Transaction Gateway using Ballerina. The current connector is compatible with IBM CICS Transaction Gateway version 9.3.

Quickstart

To use the IBM CTG connector in your Ballerina application, modify the .bal file as follows:

Step 1: Import the connector

Import ballerinax/ibm.ctg module into your Ballerina project.

Copy
import ballerinax/ibm.ctg;

Step 2: Add IBM MQ driver

Add ccf2, cicsjee, and ctgclient as platform dependencies to the Ballerina.toml.

Copy
[[platform.java17.dependency]]
groupId = "ibm"
artifactId = "ccf2"
version = "9.3"
path = "./<path-to>/ccf2.jar"

[[platform.java17.dependency]]
groupId = "ibm"
artifactId = "cicsjee"
version = "9.3"
path = "./<path-to>/cicsjee.jar"

[[platform.java17.dependency]]
groupId = "ibm"
artifactId = "ctgclient"
version = "9.3"
path = "./<path-to>/ctgclient.jar"

Step 3: Instantiate a new connector

Create an ctg:Client instance by giving IBM MQ configuration.

Copy
configurable string host = ?;
configurable int port = ?;
configurable string cicsServer = ?;
configurable string userId = ?;
configurable string password = ?;

ctg:Client ctg = check new({
    host,
    port,
    cicsServer,
    auth: {
        userId,
        password
    }
});

Step 4: Invoke the connector operations

Now, utilize the available connector operations.

Copy
// set the CICS program name here
string programName = ...;
// set the input payload
byte[] inputPayload = ...;
byte[]? outputPayload = ctg->execute(programName = programName, commArea = inputPayload);

Step 5: Run the Ballerina application

Copy
bal run

Import

import ballerinax/ibm.ctg;Copy

Metadata

Released date: about 13 hours ago

Version: 0.1.0

License: Apache-2.0


Compatibility

Platform: java17

Ballerina version: 2201.10.0

GraalVM compatible: Yes


Pull count

Total: 1

Current verison: 1


Weekly downloads


Source repository


Keywords

IBM

CICS

CTG

Mainframe


Contributors

Other versions

0.1.0