MF-CTG-COBOL Connector

CLI Commands

ol test connection

[module folder]> ol test connection --hostname 192.86.32.238 --port 13200 --code-page CP037 --default-ipic-server IPCSSL
[module folder]$ ol test connection --hostname 192.86.32.238 --port 13200 --code-page CP037 --default-ipic-server IPCSSL

ol add

The general syntax is:

Usage: ol add [OPTIONS] COMMAND [ARGS]...

  Add Asset to Module metadata

Options:
  --verbose                               Enables verbose mode
  --verbose-debug                         Enables debug mode
  --verbose-trace                         Enables trace mode
  --additional VALUE                      Additional properties
  --program-path TEXT                     Provide the cobol program path. Required when parsing multiple copybooks without cobol file
  --asset-name TEXT                       Provide asset name when parsing multiple copybooks without cobol file
  -i, --input TEXT                        Provide input copybook file path Or multiple input copybooks file paths Or input copybooks directory
  -o, --output TEXT                       Provide output copybook file path Or multiple output copybooks file paths Or output copybooks directory
  --source-path TEXT                      Provide local source or directory to parse cobol files
  --entity                                Indicate parse as entity
  --strict                                strictly parse a resource
  --input-super-class TEXT                Provide input entity super class
  --output-super-class TEXT               Provide output entity super class
  --csv                                   Indicates parsing of a CSV file
  --hostname TEXT                         Define mf ctg cobol host address (required)
  --username TEXT                         User name for logging in
  --password TEXT                         Password for logging in
  --code-page TEXT                        Specify mf ctg cobol code page (default: cp037)
  --connector-type TEXT                   [MOCK, COMMAREA, CONTAINER, NAMED_CONTAINER]
  --port TEXT                             Define mf ctg cobol port number (default: 13200)
  --default-ipic-server TEXT              Specify mf ctg cobol default ipic server name
  --payload-length TEXT
  --transaction-id TEXT
  --timeout TEXT                          Timeout for the request in seconds (default: 30)
  --spaces-are-null TEXT                  (default: true)
  --exclude-spaces-are-null TEXT          Exclude type from treat spaces as null[STRING, NUMBER, DATA, ENUM, BOOLEAN, CHARACTER] (default: [])
  --treat-empty-string-as-low-value TEXT  Feel empty/null strings with low_value (00) instead of space (40) (default: false)
  --space-char TEXT                       Set value of space char (default: 40)
  --mock-session TEXT                     (default: false)
  --eci-extend-mode TEXT                  [ECI_NO_EXTEND, ECI_EXTENDED, ECI_COMMIT, ECI_BACK_OUT] (default: ECI_NO_EXTEND)
  --max-num-servers TEXT                  (default: 30)
  --path TEXT
  --additional-properties VALUE           (default: {})
  --pass-numeric-null-value TEXT          Provide flag to set null value serialization type for NumericFields. Supported values: ZEROS, SPACES,
                                          MAX_VALUE, BINARY_NULL (default: ZEROS)
  --bidi.response-enabled TEXT            enable bidi logic on response field (default: false)
  --bidi.request-enabled TEXT             enable bidi logic on request field (default: false)
  --profile TEXT                          Configuration profile
  -h, --help                              Show this message and exit
  
Commands:
  container                               Add CTG container to asset

- 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
    

- Add CTG container to asset

The general syntax is:

Usage: ol add container [OPTIONS]

  Add CTG container to asset

Options:
  --verbose                 Enables verbose mode
  --verbose-debug           Enables debug mode
  --verbose-trace           Enables trace mode
  --asset-name TEXT         Provide asset name (required)
  --output TEXT             Provide output copybook file path (required)
  --collection              Add container as collection
  --container-name TEXT     Provide container name
  --container-pattern TEXT  Provide container pattern
  -h, --help                Show this message and exit

Properties

--hostname (required)

MF-CTG-COBOL host address

--hostname 192.86.32.238

--port (required)

The mf-ctg-COBOL port on the host machine (default: 13200)

--port 13200

--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 ../FININQ2.cbl

--program-path

Path to the business operation on the remote data-source machine. 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 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

--input, -i

Input copybook file paths and directories separated by a space

--input ../files/a/SAMPCPY1.cpy --input ../files/b/SAMPCPY2.cpy

--output, -o

Output copybook file paths and directories separated by a space

--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

--code-page

The Mainframe MF-CTG-COBOL code page

Default: 037

--code-page 37

--default-ipic-server

The name of the default IPIC (IP interconnectivity) server used by the MF CTG platform

--default-ipic-server IPCSSL