start portlet menu bar

HCLSoftware: Fueling the Digital+ Economy

Display portlet menu
end portlet menu bar
Close
Select Page

Introduction

Screen customization is a screen event designed to perform a set of actions when a host screen is recognized. It includes recognizing a screen and transforming it into a GUI for the user or playing a macro to skip the screen. The screen customization definition includes a set of screen recognition criteria and a list of actions to be taken when a host screen matches the recognition criteria.

A host screen is recognized by matching specific screen recognition. For the recognition, we need to identify some fields, global variables, colors, etc. which are unique to the screens.

Consider a scenario where there are two HOST screens with the same fields and data. The first screen displays the complete data but in the second screen we have few data which are hidden or protected. Such screens cannot be recognized by using the ‘String Criteria’ but can be recognized by using the ‘Custom criteria’ option.

Implementation of Custom Screen Recognition criteria

To create a new custom criteria logic, we need to follow the below steps:

  1. Open the Java™ perspective and create a ZIETrans project.
  2. Click File > New > Class.
  3. Browse to the Source directory of your ZIETrans project.
  4. Enter the names of your package and class.
  5. Click Finish.

It is a simple java class extending com.ibm.hats.common.customlogic.AbstractAdvancedCustomScreenRecoListener

Fig 1:

Hidden and Protected fields in ZIETrans

We need to add the logic to the ‘isRecognized’ method which returns a boolean value.

public boolean isRecognized(String arg0, IBusinessLogicInformation arg1, ECLPS arg2, ECLScreenDesc arg3)

In the customed event file, click on Screen Recognition Criteria tab then select Custom Criterion from the Add dropdown option.

Fig 2:

Hidden and Protected fields in ZIETrans

Fig 3:

Hidden and Protected fields in ZIETrans

In the Class name input field, specify the name of the java class containing the method we want to run, or click Browse to select the class name from the source directory and call the method ‘isRecognized’. (As shown in Fig 3).

Recognition based on hidden fields

When we select a screen capture for recognition criteria, there is a check box for the Highlighting field, once we click on the check box for Hidden/Protected we can identify all the hidden/protected fields in the host screen. This feature is helpful to view the hidden and protected fields on a screen.

For example, we have an 8-character field in (16, 2) which is visible on the first screen but hidden in the second.

Fig 4:

Hidden and Protected fields in ZIETrans

Below is an example of Custom criteria logic for hidden field recognition –

Hidden and Protected fields in ZIETrans

Recognition using protected fields

Here is an example of creating custom criteria based on a protected field. Consider an example where there are two similar screens but in one screen LOC text field is protected and another it is unprotected. Based on the start and end position of this protected field, we have implemented our business logic in custom criteria to recognize the screens.

Here is a sample for the logic implemented in ‘isRecognized’ method to understand the protected field –

Hidden and Protected fields in ZIETrans

References:

1.https://zietrans.hcldoc.com/help/index.jsp?topic=%2Fcom.hcl.eng.doc%2Fdoc%2Fprogguid%2Fproggd05.html

 

Comment wrap
Mainframes | July 22, 2022
Resizable Default Transformation in ZIETrans
Learn how using HCL ZIETrans, you can create a web-based application with an easy-to-use graphical user interface. Learn more about HCL ZIETrans Now!
Mainframes | July 8, 2022
Accessing ZIETrans administrative console on Liberty server
The ZIETrans administrative console allows you to view and change problem-determination settings. It also allows: Select the scope of management, View log and trace files, etc.
Mainframes | December 7, 2021
Using ZIETrans EJB
EJB is server-side software that helps summarize a particular application's business logic. With EJB, we can develop secure and scalable distributed applications.