1. In the HATS admin console, select the setting ‘Enable Host Simulation Recording’.
The host simulation file that is required later to get the error screen for customization, can be obtained by enabling this option.
2. Click on Ok and then Save.
3. Take a screen capture of the error screen:
a) Run the HATS application and go to the error page.
b) When the file opens, close it and then click on ‘Disconnect’ button.
c) Refresh the project.
d) You will be able to see the host simulation file in the project. Enable it in the connection file instead of using the live connection. The host simulation file gets generated every time the HATS application is run and disconnected.
e) Open the Host terminal and keep pressing Enter.
f) When the strpccmd command gets executed (I gave the command as “Strpco” then “strpccmd pccmd('notepad c:\test.txt')”) below is how the screen looks:
g) Click on the screen capture button to capture the error screen, which must be customized. (Ensure to click on the screen capture when the file is open)
4. Create a custom widget as follows:
--> Right-click on Project --> New HATS --> Widget --> give the name --> Select ‘Input field’ (on next screen) and then click Finish.
--> Write the below code in the class:
(Note: This is a sample code, and can be customized as required.)
5. Steps to run a customized project:
a) Click on the Host terminal and select ‘Customization’.
5. Select a section as shown above, and then click on Next.
6. In the subsequent Next Screen, select the input field and then click on Finish.
b) Open ‘Screen Customization’.
i. Insert the Input field component from Palette.
ii. Select the screen (as shown below) and click on Next.
iii. Select the custom widget and then click on Finish.
c) Uncheck Host simulation from the Connections file.
d) Make sure your customization is selected in the events. Click on Save and then Run the application.
The customized screen appears as below when the application is Run:
Soumyamallappa Surgihalli (Senior Consultant, HCL Software)
IBM HATS provides advanced customization options to create future proof, rich & complex web applications. This can be achieved by using Macros, Integration Objects and ReST APIs. Along with that, if Integration Objects can get access to the transformation connection (HATS web connection), it enables easy integration of HATS applications with third party applications.
HATS applications support most of the versions of IBM WebSphere Application Server Liberty (WAS Liberty) starting from liberty 16 to liberty 19.
Each of these server versions in turn support different versions of server features, which are configurable based on the needs of the deploying application.
HATS web service support can be used to create Service-Oriented Architecture (SOA) assets, that provide a standard programming interface to business logic and transactions that are controlled within Mainframe applications. These core business tasks can be reused as standard Web services that are an integral part of a business process integration plan.
As a developer using IBM Host Access Transformation Services (HATS), you can add macros into the HATS application which helps performing repetitive tasks faster and more efficiently. Macros are also the basis for creating RESTful services in HATS.
IBM Host Access Transformation Services (HATS) allows you to reuse and transform your user experience, by extending terminal applications to the web, mobile, portal, rich client, or as standard SOAP or RESTful web services without touching the existing application.
What is Swagger
Swagger is an open specification for defining REST APIs.
A Swagger document is the REST API equivalent of a WSDL document for a SOAP-based web service. The Swagger document specifies the list of resources that are available in the REST API and the operations that can be called on those resources. The Swagger document also specifies the list of parameters to an operation, including the name and type of the parameters, whether the parameters are required or optional, and information about acceptable values for those parameters. Additionally, the Swagger document can include JSON Schema that describes the structure of the request body that is sent to an operation in a REST API, and the JSON schema describes the structure of any response bodies that are returned from an operation.
Legacy applications contain the time-tested business knowledge, distilled over a long period of time. How best to evolve or reuse these legacy IT Assets, under changing business, economic and IT environments, is a challenge that every mainframe enterprise has to address. Many have tried solving the aging legacy applications by rewriting it in new technology, most have failed to eliminate the legacy. Not because of the technical feasibility of such rewrite, but due to the time, effort and risk associated with these approaches.