MF-CICS-COBOL Connector
Prerequisites
Because of CICS topology, the OpenLegacy connector requires an adapter to be installed on the CICS server. The adapter is a CICS program that receives the connector program activation requests and returns the results.
The connection between the connector and the adaptor can be secured using the standard SSL communication supported by the HTTP Service CICS resource.
To install the connector, contact OpenLegacy at [email protected].
CLI Commands
ol test connection
[module folder]> ol test connection --base-url http://192.86.32.238 --port 13200 --uri-map prod/latest --code-page CP037 --user demo --password 1234
[module folder]$ ol test connection --base-url http://192.86.32.238 --port 13200 --uri-map prod/latest --code-page CP037 --user demo --password 1234
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:
-
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
-
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
--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 the business operation on the remote machine.
The property is required if the source-path property is not populated
--program-path /QSYS.LIB/RMR2L1.LIB/FULLDETAIL.PGM
--input, -i
Input copybook file paths and directories separated by space
--input ../files/a/SAMPCPY1.cpy --input ../files/b/SAMPCPY2.cpy
--output, -o
Output copybook file paths and directories separated by space
--output ../files/a/SAMPCPY1.cpy --output ../files/b/SAMPCPY2.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 copybooks 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
--base-url
The Mainframe hostname/IP
--base-url http://192.86.32.238
--port
The data source port
Default: 12345
--port 13200
--uri-map
The Mainframe CICS adapter URI map
--uri-map prod/latest
--code-page
CICS COBOL code page
Default: 037
--code-page CP037
--user
User name login credential for the data source
--user demo
--password
Password login credential for the data source
--password 1234
--timeout
Maximum period of time (in milliseconds) calling the CICS program
--timeout 5000
--idle-timeout
Maximum period of time (in milliseconds) for pool connection before it is closed
--idle-timeout 8000
Updated 4 months ago