TSQ Async

TSQ Async

These are the steps to create the full flow as should be implemented at DBS

Step 1 - Create Kafka Producer

  1. Open the New Project Wizard:

    • File → New → OpenLegacy SDK Project

  2. Define the Project Name as kafka-producer

  3. Click at the Default Package field, to automatically fill it up.

  4. Select Kafka as the backend and click Next

  5. Click on Add and set the host details:

    • Host: kafka-sandbox.openlegacy.com

    • Port: 9092

    • Default Producer Topic: mf-to-kafka

  6. Click Finish

Step 2 – Generate Java Model (Entity) from the Cobol Sources

  • Copy ITEMDET.cbl to your samples folder at src/main/resources/sample 
    ITEMDET.cbl

 

  1. Right-Click on the ITEMDET.cbl file → OpenLegacy → Generate Model

  2. Execution PathITEMDET

  3. Check Generate JUnit Test checkbox

  4. Click OK

Step 3 – Create API consumer

Open the New Project Wizard:

  1. Open new API project wizard:

    • File → New OpenLegacy → API Project.

  2. Define the Project name as mf-consumer.

  3. Click at the Default Package field, to automatically fill it up.

  4. Select Legacy HTTP as the service type and click Next

  5. Click on Add and set the host details:

    • Path To Expose: /api/itemdet

    • Host Port: 9092

    • Code Page: CP037

  6. Click Finish

Step 4 – Generate APIs from SDK

Right-Click on the mf-consumer project → OpenLegacy → Generate API from SDK

  • Name the service Itemde

  • Select from the Itemde model as input

  • Select from the Itemde model as output

  • Click OK

Step 5 – Run and deploy the API

  1. Right-click on the API project and select Run As → Maven clean

  2. Right-click on the project and select Maven → Update Project…

The IP which the program calls is defined in the CICS program, therefore, we need to deploy the project to a server with a static IP, currently the server which we use is 172-31-2-53 with the user ubuntu, to get a Pem in order to connect, ask Alex or Ruslan.

3. Copy the Jar that you creted to the server, and run it with

java -jar ./<jar-name>