This article is a tutorial to supplement the documentation that is supplied with Enterprise Server. It shows how to get started with some of the Docker demonstration files that are supplied with Enterprise Server in order to run a CICS application in a Docker container on Windows.
Overview
This tutorial shows how you use the Docker demonstration files supplied with Enterprise Server to create an image containing Enterprise Server and a sample CICS application, run that image in a Docker container, and connect to the container in order to run the demonstration application and view and configure the enterprise server used to run it.
The tutorial assumes you are creating 64-bit images but includes the relevant information if you want to create 32-bit images.
The tutorial assumes you are using Enterprise Server 5.0. If you are using Enterprise Server 4.0 the steps in the tutorial should be the same but you will need to change the names of some of the files used to reflect the different version number.
Prerequisites
Before starting this tutorial you must have the following software installed and working successfully:
- Docker
- A 3270 emulator
You must also have available the following:
- An appropriate license (.mflic) file for using Enterprise Server in a Docker container.
- The file ent_server_dockerfiles_5.0_windows.zip. This contains the two Docker demonstrations for Enterprise Server which are used in this tutorial.
You should have received these files when you received your Enterprise Server installation information and media.
Outline
The steps covered in this tutorial are:
- Create a working directory and populate it with the files you will need to complete the tutorial.
- Create an Enterprise Server base image.
- Create the Enterprise Server demonstration application image.
- Run the Enterprise Server demonstration application image.
- Stop the demonstration application and tidy up.
Create and Populate a Working Directory
This section lists the files that you need to have available before starting to create the CICS demonstration application. It also describes the directory structure that the various files need to be in in order to be able to use some of the batch files that are supplied with Enterprise Server. Using these batch files greatly simplifies the process of creating the CICS demonstration application images.
- Ensure that you have the relevant files:
- An appropriate license (.mflic) file for using Enterprise Server in a Docker container.
- The file ent_server_dockerfiles_5.0_windows.zip. This contains the two Docker demonstrations for Enterprise Server which are used in this tutorial.
- Create a working directory to hold these files and change directory into it. This tutorial uses \\DockerTutorial.
- Copy ent_server_dockerfiles_5.0_windows.zip into the current directory.
- Unzip ent_server_dockerfiles_5.0_windows.zip. This creates two directories (\\DockerTutorial\\EnterpriseServer and \\DockerTutorial\\Examples) and two readme files (README.html and README.txt).
- Copy the .mflic file to the \\DockerTutorial\\EnterpriseServer directory.
Create the Enterprise Server Base Image
Now that you have all the required files in place you're ready to create the Enterprise Server base image.
The Docker demonstration for the Enterprise Server base image includes a batch file to make creating the base image as easy as possible:
- Change directory to the directory containing the Docker demonstration for the Enterprise Server base image:
cd \\DockerTutorial\\EnterpriseServer
- Run the batch file specifying a parameter to indicate that you accept the Micro Focus End User License Agreement:
bld.bat IacceptEULA
The batch file takes a while to run, but when it finishes you will have an Enterprise Server base image and 32-bit and 64-bit versions of the base image, as indicated by the output from the batch file:
|
Note: microfocus/entserver:win5.0_x86 and microfocus/entserver:win5.0_x64 are your Enterprise Server images that you will use as bases whenever you subsequently create images containing applications to run under Enterprise Server. These images are licensed to run Enterprise Server courtesy of your .mflic file that you copied into the \\DockerTutorial\\EnterpriseServer directory. |
Create the Enterprise Server Demonstration Application Image
You're now ready to create the image for the Enterprise Server demonstration application. This involves creating a new image that is based on one of the Enterprise Server base images that you have just created and extending it by including a supplied CICS demonstration application.
The Docker demonstration for the CICS demonstration application includes a batch file to simplify this step:
- Change directory to the directory containing the CICS Docker demonstration:
cd \\DockerTutorial\\Examples\\CICS
- Verify that the batch file won't result in a syntax error. Some versions of Enterprise Server contain a version of bld.bat that produces an error message when it runs. The error only affects screen output and does not affect the image produced in any way, but to check that your version of bld.bat does not have this issue:
- Open bld.bat in a text editor.
- Find the line that starts as follows:
echo docker logs
- Ensure that this line includes a caret symbol ("^") to escape each less than ("<") or greater than (">") symbol, as follows:
echo docker logs ^<container-id^>
- Save the file if necessary then exit the text editor.
- Run the batch file specifying a parameter to indicate that you want to create a 64-bit version of the image:
bld.bat x64
Note: If you want to create a 32-bit version of the image, the command to use would be:
bld.bat x86
Again, the batch file takes a while to run. When it finishes, the created images are listed, as are brief instructions on how to run the image:
Note: If you created a 32-bit version of the image, the name of the image would be microfocus/es-acctdemo:win_5.0_x86 instead of microfocus/es-acctdemo:win_5.0_x64.
- Execute the following command:
docker images
This lists the available images so you confirm that the new image is present:
Run the Enterprise Server Demonstration Application Image
You're now ready to run the Docker image for the CICS demonstration application:
- Enter the following command to run the image:
start docker run --rm --name acctdemo --hostname acctdemo -d microfocus/es-acctdemo:win_5.0_x64
Note: If you created a 32-bit version of the image, the name of the image to specify in this command would be microfocus/es-acctdemo:win_5.0_x86 instead of microfocus/es-acctdemo:win_5.0_x64.
- Find the information you need to be able to connect to the running container using a 3270 emulator.
To connect to the container you need to know its IP address, and to find the container's IP address you need to know its ID.
- Find the container's ID by entering the following command:
docker ps
A list of running containers is displayed. In the list shown below, the container ID is d219adb663e5.
- Find the container's IP address by entering the following command:
docker inspect container-ID --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}"where container-ID is the ID that you found in the previous step.
For example, the command for the container shown in step 2a, with ID d219adb663e5 is:
docker inspect d219adb663e5 --format="{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}"and the result from this command is shown below:
The returned IP address in this case is 192.168.119.241.
- Find the container's ID by entering the following command:
- Connect to the running container using a 3270 emulator. The instructions below assume you are using Micro Focus Rumba Desktop but you can use any 3270 emulator. If you are not using Micro Focus Rumba Desktop, create a 3270 connection with the IP address of the running container and port number 9040.
- Click Start > Micro Focus Rumba Desktop > Rumba Desktop.
- If the Welcome screen is displayed, click Displays > Mainframe Display in the Create New Session group.
If the Welcome screen is not displayed, click File > New > Mainframe Display from Rumba Desktop.
- Click Connection > Configure.
- On the General tab, ensure that TN3270 is selected under Installed Interfaces.
- On the TN3270 tab:
- Click Insert.
- Specify the container's IP address in the Destination Name/Address field.
- Click OK.
- Ensure User Defined is selected in the Telnet Port group, and specify 9040 in the adjacent field.
- Click Connect.
The connection is made to the running container and you see a CICS signon screen similar to the following:

- Run the ACCT transaction:
- Log in to the CICS region by specifying SYSAD for both USERID and Password.
- Clear the screen. This is Ctrl Shift Z if you are using Rumba Desktop.
- Enter ACCT.
The demonstration application starts and you see a home screen similar to the following:

- The demonstration application is a simple application that enables you to add, delete, display, modify, and print records in a data file. You can use the options that are listed on-screen to try it out. Account numbers for records that already exist include 11111 and 2222 if you want to display those.
- With the demonstration application still running, you can use Enterprise Server Administration to connect to and administer the enterprise server that is running in the container:
- Enter the following command from the command prompt:
start http://acctdemo:86
Enterprise Server Administration starts, similar to the following:

You can see that an enterprise server called MSS64 is running. That is the enterprise server where the ACCT demonstration application is running.
- Use Enterprise Server Administration to investigate the setup of the MSS64 enterprise server as you would with any other enterprise server.
- Enter the following command from the command prompt:
Stop the Demonstration Application and Clean Up
When you've finished running the demonstration application you need to perform a few steps to stop the application and the container that it is running in.
- From the ACCT demonstration application home screen, press Ctrl Shift Z to clear the screen.
- Enter the following command:
CQIT
The CQIT transaction runs, shutting down the enterprise server that the ACCT demonstration application is running in. - In Enterprise Server Administration, after a few seconds you can see that the Status column of the MSS64 enterprise server is updated to show Stopped rather than Started.
- From the command prompt, enter the following command to stop the container:
docker stop container-id
For example:
docker stop d219adb663e5
That concludes the tutorial.
The tutorial has shown you how to create an Enterprise Server base image, extend that base image to include a CICS application, run the CICS application in a container, then close down the application and the container. For more information on any of the topics covered by this tutorial, see your Enterprise Server documentation.
#HowTo-BestPractice
#Enterprise
#EnterpriseServer
#Server
