HACP & HATS User Group - Group home

Overriding Session Parameters Dynamically in HACPEE

  

Overriding Session Parameters Dynamically in HACPEE

  • IBM HACP Extended Edition is a plugin free, web-based terminal emulator. Unlike IBM Host On-Demand, HACP EE does not download any binaries that run on the client machine.
  • HACP EE reads the existing session definitions from Host On-Demand server and allows users to connect to their System z and System i hosts through an HTML5 compatible browser.
  • HACP EE runs on an application server and provides the end users with a web-based interface to access the pre-configured HOD sessions and connect to the host systems.
  • It can fetch 3270/5250 display session configurations from both HTML-based model, combined-based model, and configuration server-based model pages of Host On-Demand.
  • HACPEE supports the special feature called overriding Host Parameters dynamically (value can be passed form URL). Here overriding means default value gets updated with new value.

The following table describes the session properties that can be overridden and gives the acceptable values for each parameter:

Parameter name

Description

Valid values

 

Host

Host name or IP address of the target server. Appears as "Destination address" on property panels. Applies to all session types.

 

Host name or IP address.

 

HostBackup1

Host name or IP address of the backup1 server. Appears as "Destination address" of backup1on property panels. Applies to all session types.

 

Host name or IP address.

 

 

HostBackup1

Host name or IP address of the backup2 server. Appears as "Destination address" of backup2on property panels. Applies to all session types.

 

 

Host name or IP address.

 

Port

The port number on which the target server is listening. Appears as "Destination port" on property panels. Applies to all session types.

 

 

Any valid TCP/IP port number.

 

PortBackup1

The port number on which the backup1 server is listening. Appears as "Destination port" of backup1 on property panels. Applies to all session types.

 

Any valid TCP/IP port number.

 

 

PortBackup2

The port number on which the backup2 server is listening. Appears as "Destination port" of backup2 on property panels. Applies to all session types.

 

 

Any valid TCP/IP port number.

 

 

CodePage

The codepage of the server to which the session will connect. Appears as "Host Code-Page" on property panels. Applies to all session types except FTP.

 

The numeric portion (for example, 037) of the supported host codepage listed in the session property panel.

 

 

 

SessionID

 

The short name you want to assign to this session (appears in the OIA). It must be unique to this configuration. Appears as "Session ID" on property panels. Applies to all session types.

 

 

One character: A-Z.

 

 

 

LUName

The name of the LU or LU Pool, defined at the target server, to which you want this session to connect. Appears as "LU or Pool Name" on property panels. Applies to 3270 Display and 3270 Printer session types.

 

 

The name of an LU or LU Pool.

LUNameBackup1

The name of the LU or LU Pool, defined at the backup1 server, to which you want this session to connect. Appears as "LU or Pool Name" of backup1 on property panels. Applies to 3270 Display and 3270 Printer session types.

 

 

 

The name of an LU or LU Pool.

LUNameBackup2

The name of the LU or LU Pool, defined at the backup2 server, to which you want this session to connect. Appears as "LU or Pool Name" of backup2 on property panels. Applies to 3270 Display and 3270 Printer session types.

 

 

 

The name of an LU or LU Pool.

WorkstationID

The name of this workstation. Appears as "Workstation ID" on property panels. Applies to 5250 Display and 5250 Print session types.

 

A unique name for this workstation.

ScreenSize

Defines the number of rows and columns on the screen. Appears as "Screen Size" on property panels. Applies to 3270 Display, 5250 Display, and VT Display session types.

  • value=rows x columns
  • 2=24x80 (3270, 5250, VT)
  • 3=32x80 (3270)
  • 4=43x80 (3270)
  • 5=27x132 (3270, 5250)

 


Steps to Override Session Properties Dynamically:
  1. Create HTML page using Deployment Wizard.
  2. The default values before overriding.

                                                Figure: Default Values

     4.To change these default values with new values we can pass values from URL dynamically.
     5.Create .jsp file in HOD publish directory. For example, jsp.
     6.Place the below script in .jsp to pass values dynamically from URL for overriding parameters.

Script to override session properties dynamically:

<%@ page contentType="text/html; charset=utf-8"%>
<%@ page language="java"%>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
function GetParameterFromURL(params)
{
var url = window.location.search.substring(1);
var urlVariables = url.split('&');
for (var i = 0; i < urlVariables.length; i++)
{
var paramName = urlVariables[i].split('=');
if (paramName[0] == params)
{
return paramName[1];
}
}
}
hHod_AppletParams["EnableHTMLOverrides"]="true";
hHod_AppletParams["TargetedSessionList"]="3270 Display";
hHod_AppletParams["LUName"]=GetParameterFromURL('LUName');
</script>
<div id="cust_container" style="display:none">
</div>

    7.Open properties file which is under private sub directory.
    8.Give the path of .jsp file in properties file using templateURL property.

web.properties file:

isStatusBarEditableByAdmin= false
QuickConnectByAdmin=true
preferredLocale=ca,cs,da,de,el,es,fi,fr,hu,it,ko,no,nl,pl,pt_br,pt_pt,ru,sl,sv,tr,zh_cn,zh_tw,en
defaultLocale=ca
templateURL=C:\Program Files\ibm\HostOnDemand\HOD\printDemo\UI.jsp
     9.Save the properties file and place this file in HOD publish directory.
            C:\Program Files\ibm\HostOnDemand\HOD
    10.Restart the Host On-Demand Service Manager
    11.Clear browser cache from browser settings.
    12.Access the HACPEE page and pass values dynamically through URL:
 http://<HostName:WASPort>/<contextroot>/<htmlpagename>?&LUName=value

         
                                                    Figure: Accessing Hacpee Page


                                  Figure: Overriding LUName


  •  As a result, we can see the LUName parameter gets updated with value passed from URL. Likewise, we can also override the other parameters as mentioned in above table.

    Contact Us:

    For further information on Automation, Services offerings, or Technical details in IBM HACP/HATS, please connect with HCL Mainframe Lab Services.

    Mainframe Lab Services
    zproducts@hcl.com