IBM-MQ-COBOL Connector

CLI Commands

ol test connection

[module folder]> ol test connection --hostname 192.86.32.238 --port 1414 --queue-channel CSQ9.SVRCONN --queue-manager CSQ9 --program-path /QSYS.LIB/RMR2L1.LIB/FULLDETAIL.PGM --code-page CP037 --user demo --password 12345 --connector-type [some_value] --input-queue TARGET.QUEUE --output-queue TARGET.QUEUE.TWO --timeout 5000 --expiry 3000 --use-xml-content true --init-buffer-fill-value [some_value] --payload-length 5000 --treat-empty-strings-as-low-value true --space-char [some_value] --spaces-are-null false --output-queue-strategy [some_value] --thread-pool-size 1000
[module folder]$ ol test connection --hostname 192.86.32.238 --port 1414 --queue-channel CSQ9.SVRCONN --queue-manager CSQ9 --program-path /QSYS.LIB/RMR2L1.LIB/FULLDETAIL.PGM --code-page CP037 --user demo --password 12345 --connector-type [some_value] --input-queue TARGET.QUEUE --output-queue TARGET.QUEUE.TWO --timeout 5000 --expiry 3000 --use-xml-content true --init-buffer-fill-value [some_value] --payload-length 5000 --treat-empty-strings-as-low-value true --space-char [some_value] --spaces-are-null false --output-queue-strategy [some_value] --thread-pool-size 1000

ol add

- You only have a local COBOL source file

In this case the  --source-path option is required. 

[module-name]> ol add --source-path ./[asset-path]/[asset-source-file.cbl]
[module-name]$ ol add --source-path ./[asset-path]/[asset-source-file.cbl]

- You only have local copybooks files

In this case use the  --program-path option to pass the location of the program on the remote CICS-COBOL host the --input and --output options to pass the local copybooks files path.  If you want the name of the asset to be different than the --program-path value, you can set the value of the --asset-name property to the new name.

[module-name]> ol add --program-path /QSYS.LIB/RMR2L1.LIB/FULLDETAIL.PGM --asset-name credit_accounts --input ../files/a/SAMPCPY1.cpy --input ../files/b/SAMPCPY2.cpy --output ../files/a/SAMPCPY1.cpy --output ../files/b/SAMPCPY2.cpy
[module-name]$ ol add --program-path /QSYS.LIB/RMR2L1.LIB/FULLDETAIL.PGM --asset-name credit_accounts --input ../files/a/SAMPCPY1.cpy --input ../files/b/SAMPCPY2.cpy --output ../files/a/SAMPCPY1.cpy --output ../files/b/SAMPCPY2.cpy

- You have a local COBOL source file and local copybook files

In this case use the  --source-path option to pass the COBOL source file path and the --input and --output options to pass the local copybooks files path. 

[module-name]> ol add --source-path ./[asset-path]/[asset-source-file.cbl] --input ../files/a/SAMPCPY1.cpy --input ../files/b/SAMPCPY2.cpy --output ../files/a/SAMPCPY1.cpy --output ../files/b/SAMPCPY2.cpy
[module-name]$ ol add --source-path ./[asset-path]/[asset-source-file.cbl] --input ../files/a/SAMPCPY1.cpy --input ../files/b/SAMPCPY2.cpy --output ../files/a/SAMPCPY1.cpy --output ../files/b/SAMPCPY2.cpy

- You have a copybook superclass

When your copybook data sources include a copybook superclass perform the following two steps to add it to the asset:

  1. Generate from the superclass an asset type entity using an --entity flagged ol add command.

    [module-name]> ol add --source-path header.cpy --entity
    
    [module-name]$ ol add --source-path header.cpy --entity
    
  2. Incorporate the generated entity into the asset using the --input-super-class and --output-super-class options.

    [module-name]> ol add --input fininq2.cpy --output fininq2.cpy --input-super-class header --output-super-class header --program-path FININQ2
    
    [module-name]$ ol add --input fininq2.cpy --output fininq2.cpy --input-super-class header --output-super-class header --program-path FININQ2
    

Properties

--hostname (required)

The IBM-MQ host IP address

--hostname 192.86.32.238

--port (required)

The IBM-MQ port on the remote machine (default: 1414)

--port 1414

--channel (required)

The message queue channel (required)

--channel CSQ9.SVRCONN

--queue-manager (required)

The queue manager name

--queue-manager CSQ9

--source-path

The path to a local data-source COBOL file. The path is used by the CLI ol add command to access the file and parse it to extract its metadata. The property is not required if the input, the output and the program-path properties are populated.

--source-path ../FULLDETAIL.cbl

--input, -i

Input copybook file path or multiple input copybooks file paths or input copybooks directory

--input ../PhoneBookRecord.in.cpy

output, -o

Output copybook file path or multiple output copybooks file paths or output copybooks directory

--output ../PhoneBookRecord.out.cpy

entity

Generate an entity-type asset. The ol add command flagged by the --entity option adds an entity type asset to a module. The resulting JSON provides a simple representation of business field data. Entities generated from copybook or COBOL asset source files provide the ability to support copybook superclasses. See input-super-class and output-super-class below.

ol add --source-path ../header.cpy --entity

--input-super-class

Specifies the path to an entity-type asset that will serve as an additional data source to the input copybook files. The data defined in the entity type asset represent business fields that are common to all input-related copybook files. A prior execution of an --asset flagged ol add command generates the specified entity-type (see entity above).

--input-super-class header

--output-super-class

Specifies the path to an entity-type asset that will serve as an additional data source to the output copybook files. The data defined in the entity type asset represent business fields that are common to all output-related copybook files. A prior execution of an --asset flagged ol add command generates the specified entity-type (see the entity property above).

--output-super-class header

--program-path

Path to the business operation on the remote data-source machine (required when parsing multiple copybooks without Cobol file).

The path is used:

  • in design-time by the CLI ol test asset command to access the business operation on the remote machine.
  • in run-time by the production application to communicate with the business operation on the remote machine.
--program-path /QSYS.LIB/RMR2L1.LIB/FULLDETAIL.PGM

--asset-name

The asset name defaults to the program path. Pass a value to --asset-name only when it is different from the program path.

--asset-name credit-account

--code-page

The remote data source code page (default: CP037)

--code-page CP037

--user

The remote data source user

--user demo

--password

The remote data source password

--password 12345

--connector-type

The connector type [PRODUCE_CONSUME, PRODUCE, CONSUME] (default: PRODUCE_CONSUME)

--connector-type PRODUCE_CONSUME

--input-queue

The input queue name

--input-queue TARGET.QUEUE

--output-queue

The output queue name

--output-queue TARGET.QUEUE.TWO

--timeout

The waiting period for the response message in milliseconds (default: 30000)

--timeout 5000

--expiry

Expiry time for the message in the queue in milliseconds (default: -1)

--expiry 3000

--use-xml-content

Specify whether the content of the message will be represented as an XML content (default: false)

--use-xml-content true

--init-buffer-fill-value

The buffer's default value before inserting values from the entities (default: 00)

--init-buffer-fill-value 00

--payload-length

The payload length regardless of entity size. The buffer will be padded with 0x00 to be equal in length to the property value.

--payload-length 5000

--treat-empty-strings-as-low-value

Fill an empty or null string with the low_value (00) instead of the space value (40)

--treat-empty-strings-as-low-value true

--space-char

The space-char value (default: 40)

--space-char [some_value]

--spaces-are-null

Treat spaces (for example, 0x40 in an EBCDIC code page) as null instead of blanks (default: true).

--spaces-are-null false

--output-queue-strategy

The output queue strategy [CORRELATION_ID, BROWSE, NEW_SESSION, BASE_64] (default: CORRELATION_ID)

--output-queue-strategy CORRELATION_ID

--thread-pool-size

The size of the thread pool (default: 1)

--thread-pool-size 1000