cancel
Showing results for 
Search instead for 
Did you mean: 

Mainframe Automation

DipinDevP
Level 4

Hi,

How can we practice Mainframe automation? Any free mainframe emulators available?
It would be great if someone can share details of Blue Prism Mainframe automation with an example. 

Thanks for your time!

Regards,
Dipin Dev P

1 BEST ANSWER

Best Answers

Hi @DipinDevP ,

Mainframe is an exciting topic and one can work really good with them if they get an opportunity! Only issue that I have seen which many people ask around is how to get exposure to one since almost 90% of these mainframes are not freely available so yes if your organization does not has access to one, you basically can't explore this route. Anyhow, since I pretty much try to tinker around such limitations a lot, I would like to share today how you can practice with one at your personal system and hopefully this can reach to many people out there who face similar issues!

1) Setting Up Hercules Server:

  1. Firstly, we need to get one of the freely used mainframe servers setup at our end which means that we need to get the mainframe server connected to our localhost. For my example, I will use one of the mainframe servers that can be used for free (Hercules) and will use TK4 package to get this done. You can download the latest TK-4 system as listed on the official website of MVS 3.8j Tur(n)key 4- System 
  1. devneetmohanty07_0-1717276165833.png

     

  2. Once you have downloaded the zip file, just extract the content and navigate to the unattended folder and click on set_console_mode.bat file and this will start the Hercules server on your console. When prompted to enter any key in the CMD window that opens, press Enter key and you can minimize the CMD console:

    devneetmohanty07_2-1717276571023.png

     


    devneetmohanty07_1-1717276358588.png

  3. Now, navigate back to the root folder of your extracted file and click on mvs.bat file which will activate the mainframe kernel. You will soon see another CMD screen which will keep on showing multiple commands as it will perform actions to activate the kernel. You need to wait for some time as it may take time to run the kernel. Once you see the screen updated with the TK-4 logo as I have shown below, you can click on Escape button and this will make the screen change as shown below:
    devneetmohanty07_3-1717277095645.png

    This means that now our Hercules Mainframe Server is up and running on the localhost server (127.0.0.1) and port no. 3270. 

    All these steps that I showed you as part of step 2 and step 3 is something you will always have to do once you shut down your machine in case you want to practice with this mainframe server on your Blue Prism studio. In enterprise level, we do not care about these things as there we have a fully licenses mainframe server that always runs externally on some other machine.

    Now, we the next step is to get a Mainframe emulator application that should be compatible with our Blue Prism tool. There are a variety of mainframe emulators that are either licensed, freely available or can be just used on a trial period basis. I will use one called as Quick3270 Secure emulator which is available for 60 days and then we need to purchase the license if we want to use the same.

 

2) Setting Up Quick3270 Secure Mainframe Emulator:

Please note the steps shown below are specific to Quick3270 Emulator only and they will change for each different mainframe emulator available out there (IBM Personal Communication, Microfocus Rumba etc.)

  1. Now, to begin with first we will install the mainframe emulator application from the following Quick3270 Secure - 64-bit:

    devneetmohanty07_5-1717277694122.png

     

  2. Once the file has been downloaded, install the application using the installer and follow each and every step as shown in the installer screens. Once, it has been installed, navigate to the installation location and open the executable application (Quick3270.exe):

    devneetmohanty07_7-1717277850504.png

     

  3. Now, you can open the application and we need to configure the mainframe emulator. To do so, click on Session tab and select Session Configuration option:
    devneetmohanty07_8-1717277984662.png

     

  4. In the Session Configuration screen, select Connection as TN3270Hostname as localhost and Port Number as 3270 and click on OK:

    devneetmohanty07_9-1717278163114.png

     

  5. Now, click on Settings tab and select Terminal option:

    devneetmohanty07_10-1717278263977.png

     

  6. In the Terminal Settings screen, ensure to check the Autoconnect Session and Automatically save settings on exit options and click on OK button:
    devneetmohanty07_11-1717278458261.png

     

  7. Now, we can click on Session tab and select the Connect option:
    devneetmohanty07_12-1717278551185.png

     

  8. Now, the connection should be established between our Hercules server and the 3270 QuickConnect emulator as shown below:

    devneetmohanty07_13-1717278670186.png

     



  9.  Press Enter on the screen and it should prompt for INPUT NOT RECOGNIZED. We need to enter the username which is herc01 and press Enter and then we need to enter the password which is CUL8TR and then press Enter:
    devneetmohanty07_14-1717278959680.png

  10. Now, we can see the home screen, press Enter twice now to reach the options screen:

    devneetmohanty07_15-1717279441560.png

     

  11. Now, once the credentials are setup successfully as shown in step 9 and 10, we can now save the session file which is very important for us to connect to Blue Prism Studio going ahead by clicking on File tab and selecting Save Session As option:

    devneetmohanty07_16-1717279564746.png

     



  12. Provide the path to save the session file and click on Save button:

    devneetmohanty07_18-1717279731028.png

     

  13. Now, before closing the emulator, make a note of the session identifier as displayed on the title. This is very important for setup purposes at the Blue Prism side. By default, it should be Session A but if it is anything else, then that too should be fine:

    devneetmohanty07_19-1717279819756.png

     

Great now, we have successfully setup our mainframe application and good news is that unlike the first setup for Hercules server which needs to be done every time we login to our machine, you don't ever need to repeat the above steps for setting it up the Mainframe Emulator application again. The session file that we created can directly be opened and it would show us the configured session while opening the emulator application.

Now the next step is to finally create two business objects for this application. One business object will be created just to launch the QuickConnect 3270 Secure Mainframe Application in Windows mode while the other business object will be created for attaching to the opened application and connecting to the session file that we saved. Within the second business object we can also incorporate steps for interacting with the Mainframe application as well.

One question that you might have at this point is do we need to create two objects for every Mainframe application? Short answer is it depends on the behavior of every mainframe application and sometimes yes we would create two objects one for launching and one for attaching/interacting while other times only one business object can be sufficient to handle everything related to the application.

---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

View answer in original post

6 REPLIES 6

Hi, 

You can find more details here Mainframe and in BP and search for Mainframe. 

Hi @DipinDevP ,

Mainframe is an exciting topic and one can work really good with them if they get an opportunity! Only issue that I have seen which many people ask around is how to get exposure to one since almost 90% of these mainframes are not freely available so yes if your organization does not has access to one, you basically can't explore this route. Anyhow, since I pretty much try to tinker around such limitations a lot, I would like to share today how you can practice with one at your personal system and hopefully this can reach to many people out there who face similar issues!

1) Setting Up Hercules Server:

  1. Firstly, we need to get one of the freely used mainframe servers setup at our end which means that we need to get the mainframe server connected to our localhost. For my example, I will use one of the mainframe servers that can be used for free (Hercules) and will use TK4 package to get this done. You can download the latest TK-4 system as listed on the official website of MVS 3.8j Tur(n)key 4- System 
  1. devneetmohanty07_0-1717276165833.png

     

  2. Once you have downloaded the zip file, just extract the content and navigate to the unattended folder and click on set_console_mode.bat file and this will start the Hercules server on your console. When prompted to enter any key in the CMD window that opens, press Enter key and you can minimize the CMD console:

    devneetmohanty07_2-1717276571023.png

     


    devneetmohanty07_1-1717276358588.png

  3. Now, navigate back to the root folder of your extracted file and click on mvs.bat file which will activate the mainframe kernel. You will soon see another CMD screen which will keep on showing multiple commands as it will perform actions to activate the kernel. You need to wait for some time as it may take time to run the kernel. Once you see the screen updated with the TK-4 logo as I have shown below, you can click on Escape button and this will make the screen change as shown below:
    devneetmohanty07_3-1717277095645.png

    This means that now our Hercules Mainframe Server is up and running on the localhost server (127.0.0.1) and port no. 3270. 

    All these steps that I showed you as part of step 2 and step 3 is something you will always have to do once you shut down your machine in case you want to practice with this mainframe server on your Blue Prism studio. In enterprise level, we do not care about these things as there we have a fully licenses mainframe server that always runs externally on some other machine.

    Now, we the next step is to get a Mainframe emulator application that should be compatible with our Blue Prism tool. There are a variety of mainframe emulators that are either licensed, freely available or can be just used on a trial period basis. I will use one called as Quick3270 Secure emulator which is available for 60 days and then we need to purchase the license if we want to use the same.

 

2) Setting Up Quick3270 Secure Mainframe Emulator:

Please note the steps shown below are specific to Quick3270 Emulator only and they will change for each different mainframe emulator available out there (IBM Personal Communication, Microfocus Rumba etc.)

  1. Now, to begin with first we will install the mainframe emulator application from the following Quick3270 Secure - 64-bit:

    devneetmohanty07_5-1717277694122.png

     

  2. Once the file has been downloaded, install the application using the installer and follow each and every step as shown in the installer screens. Once, it has been installed, navigate to the installation location and open the executable application (Quick3270.exe):

    devneetmohanty07_7-1717277850504.png

     

  3. Now, you can open the application and we need to configure the mainframe emulator. To do so, click on Session tab and select Session Configuration option:
    devneetmohanty07_8-1717277984662.png

     

  4. In the Session Configuration screen, select Connection as TN3270Hostname as localhost and Port Number as 3270 and click on OK:

    devneetmohanty07_9-1717278163114.png

     

  5. Now, click on Settings tab and select Terminal option:

    devneetmohanty07_10-1717278263977.png

     

  6. In the Terminal Settings screen, ensure to check the Autoconnect Session and Automatically save settings on exit options and click on OK button:
    devneetmohanty07_11-1717278458261.png

     

  7. Now, we can click on Session tab and select the Connect option:
    devneetmohanty07_12-1717278551185.png

     

  8. Now, the connection should be established between our Hercules server and the 3270 QuickConnect emulator as shown below:

    devneetmohanty07_13-1717278670186.png

     



  9.  Press Enter on the screen and it should prompt for INPUT NOT RECOGNIZED. We need to enter the username which is herc01 and press Enter and then we need to enter the password which is CUL8TR and then press Enter:
    devneetmohanty07_14-1717278959680.png

  10. Now, we can see the home screen, press Enter twice now to reach the options screen:

    devneetmohanty07_15-1717279441560.png

     

  11. Now, once the credentials are setup successfully as shown in step 9 and 10, we can now save the session file which is very important for us to connect to Blue Prism Studio going ahead by clicking on File tab and selecting Save Session As option:

    devneetmohanty07_16-1717279564746.png

     



  12. Provide the path to save the session file and click on Save button:

    devneetmohanty07_18-1717279731028.png

     

  13. Now, before closing the emulator, make a note of the session identifier as displayed on the title. This is very important for setup purposes at the Blue Prism side. By default, it should be Session A but if it is anything else, then that too should be fine:

    devneetmohanty07_19-1717279819756.png

     

Great now, we have successfully setup our mainframe application and good news is that unlike the first setup for Hercules server which needs to be done every time we login to our machine, you don't ever need to repeat the above steps for setting it up the Mainframe Emulator application again. The session file that we created can directly be opened and it would show us the configured session while opening the emulator application.

Now the next step is to finally create two business objects for this application. One business object will be created just to launch the QuickConnect 3270 Secure Mainframe Application in Windows mode while the other business object will be created for attaching to the opened application and connecting to the session file that we saved. Within the second business object we can also incorporate steps for interacting with the Mainframe application as well.

One question that you might have at this point is do we need to create two objects for every Mainframe application? Short answer is it depends on the behavior of every mainframe application and sometimes yes we would create two objects one for launching and one for attaching/interacting while other times only one business object can be sufficient to handle everything related to the application.

---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Continuation of my post.....

 

3) Setting Up Business Objects & Process Within Blue Prism:

  1. Open the Blue Prism Studio application and create two new business objects called as 'QuickConnect 3270 - Launcher' and 'QuickConnect 3270 - Basic Actions':

    devneetmohanty07_20-1717280386479.png

     

  2. Now, first open the 'QuickConnect 3270 - Launcher' business object and navigate to the application modeler:

    devneetmohanty07_21-1717280581872.png

     

  3. Provide the Application name as QuickConnect 3270 Secure Mainframe and click on Next button. On the next screen, select Indicate what type of application you are using as Windows Application and click on Next button. Now, on the next screen, select My application is launched from an executable file and click on Next button. On the next screen, you would be asked for providing the application executable path, here provide the Quick3270 mainframe application path as shown in Step 2.2 and click on the Next button:
    devneetmohanty07_23-1717281073852.png

     


     

  4. On the next screen, you will be asked for providing any command line parameters and here we need to provide the session file path which we used in the step 2.12 and click on the Next button. Next, you will be asked for providing the working directory where you can provide the root folder path for your installed QuickConnect 3270 application used in the step 2.2 and click on the Next button. On the next screen, select Disable invasive techniques (hooking) option and click on the Next button. On the next screen, select the Application Manager mode as Embedded and click on the Next button:

    devneetmohanty07_24-1717281759082.png

     

  5. Now, in the final screen leave the option as blank and click on Finish button:

    devneetmohanty07_25-1717281980801.png

     

  6. With this our application modeler is configured and now we can create a separate action page called as 'Launch' and publish the same. Now, add a Navigate stage while selecting the root element from the application tree and select the associated action as 'Launch' and connect the Start and End stage to the newly added stage as shown below:

    devneetmohanty07_26-1717282208395.png

     

  7. Save the business object and close the same. Now open the 'QuickConnect 3270 - Basic Actions' business object and navigate to the application modeler:
    devneetmohanty07_27-1717282469975.png

     

  8. Provide the Application name as QuickConnect 3270 Secure Mainframe and click on Next button. On the next screen, select Indicate what type of application you are using as Mainframe Application and click on Next button. Now, on the next screen, select Generic HLLAPI and click on Next button. On the next screen, provide the API Code Page value as Western European (Windows 1252) and click on the Next button:

    devneetmohanty07_28-1717282759391.png

     



  9. For DLL Name, provide the file path for ehlapi32.dll which should be available in your installation folder of QuickConnect 3270 folder as shown in step 2.2 and click on the Next button:
    devneetmohanty07_29-1717283075466.png

     

  10. Provide the DLL Entry Point as hllapi and click on Next button. On the next screen, select Calling Convention as Windows API and click on Next button. Now, on the next screen, select Session Type as Standard and click on Next button. On the next screen, select the Session Identifier value as identified during step 2.13 which in my case is A and click on the Next button:

    devneetmohanty07_30-1717283370808.png

  11. Select the Application Manager mode as Embedded and click on the Next button. On the final screen, leave the value as blank and click on the Finish button:

    devneetmohanty07_0-1717283781070.png

     

  12. With this our application modeler is configured and now we can create a separate action page called as 'Launch Session' and publish the same. Now, add a Navigate stage while selecting the root element from the application tree and select the associated action as 'Launch' and connect the Start and End stage to the newly added stage as shown below:

    devneetmohanty07_1-1717284104029.png

     



  13. Now, to test if our mainframe application is getting properly launched or not we would first open up the QuickConnect 3270 application using the 'Launch' action page of the first business object, 'QuickConnect 3270 - Launcher' and then use the 'Launch Session' action page of the second business object, 'QuickConnect 3270 - Basic Actions' as shown below:

    devneetmohanty07_2-1717284623134.png
    devneetmohanty07_3-1717284718515.png

     

  14. Now, if you open the Application Modeler of the second business object, 'QuickConnect 3270 - Basic Actions' and try to spy a new element with Windows spying mode, you will immediately see the Mainframe spying mode getting activated as shown below and mainframe screen will be converted to a grid-like interface:

    devneetmohanty07_4-1717285176248.png

     

  15. Now, here on the Mainframe grid, you can click and drag your mouse to create a co-ordinate region for spying that element field which will be highlighted in Blue color. Once it has been highlighted, hover over that field till it turns Red in color and then press Ctrl+Left click to select that region:

    devneetmohanty07_6-1717285589497.png

     

  16. Now, I will create another action page called 'Enter Username' and here I will first drag a write stage to indicate my newly spied element and pass a data item called as 'Username':
    devneetmohanty07_7-1717285860064.png

     



  17. Now, I will add another Navigate stage and using the root application tree element, I will use the Global Send Key Event action to send the "{ENTER}" text which will be used to pass the Enter key:

    devneetmohanty07_8-1717286417864.png

      

  18. Once, done I will the Username data item as an input parameter and will publish the action. Similarly, for entering password, I can create another page and then to navigate to the options window I can have a separate page. The logics would be same to send the associated keys.

    devneetmohanty07_10-1717287233537.png

     



  19. Lastly, we will create another page for Navigating to Options menu by entering Enter key twice similar to how we did before and check if the page has been reached by using a Read stage associated with Read Field action to read one of the username values on Options page and validate if the field value is equal to the username field or not:

    devneetmohanty07_12-1717288115928.png

     

  20. Once all the pages have been configured, publish the pages prior to saving and closing the business object. Now, we have our business objects setup. We can now test all the actions by creating a new process within Process Studio and calling each action as shown below:

    devneetmohanty07_13-1717288563051.png

     

 

With this you should be able to practice Mainframe automation on your own for at least 60 days till the trial period of the emulator expires. Also, you can explore other screens and also try to use Wait Stages and other actions that I have not discussed for each stage which will help you ahead.

Also, just as a note once you login into the session you cannot re-login directly, you will need to close the Hercules server from your task tray at the bottom and then repeat the step 2 prior to testing the same.

devneetmohanty07_14-1717288810946.png

 

To conclude, every mainframe more or less will follow the same steps on the Blue Prism end. Just the configuration step can change for every emulator. Hope this helps out people to now explore Mainframe Automation on their own!

---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

@devneetmohanty07 Thank you for this explanation and this rich sharing dear Devneet. How lucky we are to have someone like you in our community 😁

Thanks @Mohamad_747 a lot for your kind words. Glad this share could be of help and hope it helps more folks as well!

Also, one typo I did at the very end and since I cannot edit the same now so I will mention it here:

As a note once you login into the session you cannot re-login directly, you will need to close the Hercules server from your task tray at the bottom and then repeat the steps mentioned under step 1 prior to testing the same and not step 2 as step 2 is just a one-time setup that needs to be done.

---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

DipinDevP
Level 4

@devneetmohanty07 
I never thought of such a detailed explanation! Great work!
Thank you very much for considering my queries.