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 standard SSL communication supported on the HTTP Service CICS resource.
To install the connector contact OpenLegacy at support@openlegacy.com.
CLI Commands
ol test connection
[module folder]> ol test connection --host as400.openlegacy.com --code-page 37 --user demo --password 1234
[module folder]$ ol test connection --host as400.openlegacy.com --code-page 37 --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