IBM-MQ-COBOL

CLI Commands

ol test connection

[module folder]> ol test connection --host 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 --conenctor-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 --host 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 --conenctor-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

Return to tutorial

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]

Return to tutorial

- 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

Return to tutorial

- 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