HCL Z and I Emulator for Web Client is a plug-in free, web-based terminal emulator. Unlike HCL Z and I Emulator for Web, ZIE for Web Client does not download any binaries that run on the client machine. ZIE for Web Client reads the existing session definitions from Z and I Emulator for Web server and allows users to connect to their System z and System i hosts through an HTML5 compatible browser.

In addition to the Application Programming Interfaces (APIs) provided with the Host Access Toolkit, Z and I Emulator for Web also provides specialized public APIs, called Session Manager APIs, that provide support for embedding host sessions in Web pages using JavaScript. These JavaScript-based APIs help application developers manage host sessions and text-based interactions with host sessions. The APIs are available through the Z and I Emulator for Web Session Manager.
The APIs are divided into following four sets:

  • Session Manager APIs provide start, stop, connect, disconnect, and display session functions. In addition, get methods are provided to retrieve active session IDs. Session Manager APIs support the management of multiple instances of a session as well as multiple sessions. By providing support for Session Manager API in ZIE for Web Client, application developers can now automate their interaction with host, thereby enhancing their productivity.
  • Presentation Space APIs
  • Z and I Emulator for Web Functions APIs
  • Error Reporting APIs

How to configure
1.    Include Session Manager API JavaScript file in the <head> section of the application (webpage)
Code snippet:
<script src=”https://<IP_of_ZIEWeb_Server>:<port>/zieweb/js/sessionManagerAPI.js”>
<script src=” 
https://localhost:8080/zieweb/js/sessionManagerAPI.js“> </script>

2.    Create an object of the sessionManagerAPI. inside JavaScript <script> tags
Code snippet:
var hod_applet = new hod_session(); 

3.    To start working with the API, first connection needs to be established using the following API function call:
Code snippet:
**URL: should be the url of the ZIEWeb page
Example: https://<ip-address>:<port-number>/zieweb/Cached.html

4.    Once the connection is established and ZIE for Web Client window is opened, make API calls using the java script object.
Code snippet: 
var returnValue=hodApplet.getSessionID(),
var returnValue=hodApplet.connectSession()

5.    The sample application page should be placed on the same application server (WAS) where ZIE for Web Client is installed.

Demo application


Including the API in Sample Code


Creating Object of The Session Manager API


Creating Connection with HACPEE Application


Calling an API Service


Download the Source Code:

Comment wrap
Further Reading
Mainframes | December 7, 2021
Using ZIETrans EJB
Read the blog for more details about EJB (Enterprise java bean) server-side software that helps to summarize the business logic of a particular application.
Mainframes | December 7, 2021
Enabling CSRF and XSS protections in ZIETrans
Read the blog to know more about Cross-Site Request Forgery(CSRF) how we can protect against CSRF and XSS in ZIETrans.
Mainframes | November 23, 2021
Z and I Emulator for Web Desktop Client
Z and I Emulator for Web (ZIEWeb) Desktop Client is a new ZIEWeb client which can be installed on all supported client platforms for ZIEWeb.
Filters result by