Creating the Image for and Running the CICS Container Demonstration

Creating the image

On UNIX, the CICS container demonstration includes a shell script (bld.sh) to make the process of running the demonstration as easy as possible. This topic lists and describes the parameters that you can specify when running bld.sh.

The command to execute the shell script to run the CICS container demonstration is as follows:

./bld.sh IacceptEULA  
         [dryrun]
         [esadmgid=admin-gid]
         [esadmuid=admin-uid]
         [esadminuser=admin-id]
         [hotfix=tar-file-name]
         [nojava | (java | oraclejava) [javaversion=java-version]]
         [login|nologin] 
         [logingid=login-gid]
         [loginid=login-id]
         [logingname=login-gname]
         [loginname=login-name]
         [notools]
         [odbc|odbc-dev]
         [package]
         [rmi]
         [settings]
         [verbose]

The parameters to use with bld.bat and bld.sh are:

installloc
If not specified, the default path is used.
debug
Indicates that you want to debug the CICS application rather than simply execute it. Specifying debug causes Dockerfile.debug to be run rather than Dockerfile.
dn
Indicates that you want to run the CICS application in a .NET environment.
package
Indicates that you want to rebuild the COBOL application. Specifying package runs a series of MSBuild commands and Powershell scripts to recreate the CICS application.
x64
Indicates that the resulting created image is a 64-bit one.
x86
Indicates that the resulting created image is a 32-bit one.
rmi
Indicates that you want to remove any previously-created CICS container demonstration images. Specifying rmi results in the execution of a number of docker rmi --forceor podman rmi --force commands to remove any CICS container demonstration images.
IacceptEULA
Indicates that you accept the Micro Focus End User License Agreement (EULA). If you do not specify IacceptEULA, no image is created.
dryrun
Indicates that you do not want bld.sh to run any Docker or podman commands. Use dryrun with the verbose parameter to display the Docker or podman commands without running them.
esadminuser=admin-id
Specifies the ID to be used for the Enterprise Server admin user.
esadmgid=admin-gid
Specifies the group ID to use for the Enterprise Server admin user.
esadmuid=admin-uid
Specifies the user ID to use for the Enterprise Server admin user.
hotfix=tar-file-name
This option is only for installing a Patch Update version. Specify the name of the installable executable .tar file as mentioned above, without the extension. For example: hotfix=setup_visualcobol_devhub_for_docker_8.0_patchupdate03_312109_ platform_x64.
java
Indicates that you want the image to include Java support provided by Adoptium's OpenJDK. Use the javaversion parameter to specify the version of Java that you want support for.
javaversion=java-version
When specified in conjunction with the oraclejava parameter, java-version specifies the Java version you want support for, which can be 8 or 9; otherwise, when specified in conjunction with the java parameter, java-version can be 8, 10-18.
login
Indicates that you want to create a login image. Using this option results in image that you can use to log in to (using any details specified by the logingid, loginid, logingname and loginname parameters). Once logged in to this image you can execute shell or Enterprise Server commands.

This option is useful if you are not adding any application files to a base image but want to be able to use Enterprise Server commands from it.

When you specify login the tag of the image created is suffixed with "_login".

logingid=login-gid
Specifies the group ID to use for the user specified by the loginid parameter.
loginid=login-id
Specifies the user ID to use for the login image.
logingname=login-gname
Specifies the group name to use for the user specified by the loginid parameter.
loginname=login-name
Specifies the user name to use for the user specified by the loginid parameter.
nojava
Indicates that you do not want Java to be installed in the base image. You might want to use this parameter if your system already includes a number of different versions of Java and you don't want to introduce another version unnecessarily.
nologin
Indicates that you do not want to create a login image. You would typically want to use this option when creating an image that contains an application rather than just a base image for Enterprise Server. This is the default.
notools
Indicates that you do not want the image to contain the IP tools (such as ping and netcat) that are included in the image by default. Use this option if you do not need the tools and want to minimize the size of the image.
odbc|odbc-dev
Specifies that the odbc run-time library or the odbc developer tools library is installed.
oraclejava
Indicates that you want the image to include Java support provided by the Oracle JDK. Use the javaversion parameter to specify the version of Java that you want support for.
package
Indicates that you want to rebuild the COBOL application in this image.
settings
Causes the settings that will be used for various properties of the image to be displayed on-screen. Properties that are displayed include the names of the installable file and the license file for Enterprise Server, the details to be used for the Enterprise Server admin user, and the details to be used for the login image. Specifying settings does not cause an image to be created.
verbose
Causes Docker or podman commands to be displayed on-screen as they are executed.

Build the application code

  1. Navigate to this example folder in the command window.
  2. To build the application code, enter:
    bld x64

Running the demonstration

You can run the image created by the CICS container demonstration with the docker runor podman run command. To manage the container's enterprise servers, you use the ESCWA interface.

To run the x86 acctdemo image:

docker run -p 16002:10086 -p 9040-9060:9040-9060 -p 9000-9010:9000-9010 -ti --network="nat" --rm microfocus/edbuildtools-acctdemo:win_8.0_x86

To run the x64 acctdemo image:

docker run -p 16002:10086 -p 9040-9060:9040-9060 -p 9000-9010:9000-9010 -ti --network="nat" --rm microfocus/edbuildtools-acctdemo:win_8.0_x64

To use the image:

  1. Locate the ip address of the container, this can be done using the following:
    docker inspect -f "{{ .NetworkSettings.Networks.nat.IPAddress}}" <container id>

    Where <container id> is the long number assigned to each container upon run. You can abbreviate it by entering just the first 4-5 characters of it.

  2. Set the ip address from the above and port 9004 (9040 for the x64 image) into the port in your terminal emulator.
  3. Connect to the port in your terminal emulator, and run ACCT transaction.
  4. From the host machine, you can also submit the provided JCL in ESCWA and check its output from the SPOOL page.
    To access ESCWA from a browser, load the following URL: http://localhost:16002, where the port parameter was specified when you ran the image:
    -p 16002:10086