Terminal Emulation & Transformation Community
  • Home
  • Blogs
  • FORUM
  • About
  • Contact
  • Resources

HACL capabilities in IBM Host On-Demand

12/1/2017

2 Comments

 
Picture
Introduction to the Host Access Class Library for Java
The Host Access Class Library (HACL) for Java provides a core set of classes and methods that allow the development of platform independent applications that can access host information at the data stream level. 
  •  HACL implements core access functions in a complete class model.
  • To run these applications, all that is needed is a Java environment.
Functionalities included in HACL:-
  • Host connections
  • Reading from and writing to host presentation space
  • Enumerating the fields on the presentation space
  • Reading operator information area (OIA)
  • Transferring files
  • Asynchronous event handling
With HACL, application developers can write Java applets that manipulate data from the data stream presentation space (such as 3270, 5250, and Virtual Terminal) without requiring the users to have the applets residing on their machines. The presentation space represents a virtual terminal screen that contains both data and associated attributes presented by host applications. HACL Java applets can open a session to the host, wait for incoming host data, get specific strings from the imaginary screen, get associated attributes of the strings, set new string values, send data stream function keys back to the host, and wait for the next host response. After an interaction is complete, the applet can switch to other tasks or simply close the session. The entire operation can be done without ever showing host screens.
HACL is a significant improvement over traditional emulator programming interfaces, like EHLLAPI. Important ones are as below:
  • Platform independent.
  • It operates directly on the data stream rather than on the interpreted emulator screen.
  • HACL is an object-oriented API, with all the well-known benefits of object-oriented programming paradigm.
  • Provides intuitive mnemonic key values.
 
To write a HACL applications developer must understand the following concepts and API’s provided by HACL
  • Sessions, a session object (ECLSession) encapsulates the connection to the host and the characteristics of that connection.
ECLSession object contains an instance of the ECLPS (presentation space), ECLOIA (operator information area), ECLXfer (file transfer) and ECLHostPrintSession (Host Print Session) objects.
For more information about other classes please refer to IBM Host On-Demand knowledge centre.
  • TLS secure connection to host, HACL is compliant with current security standards.
  • Events – application can choose to be notified when specific events occur like ECLPS change, OIA events etc.
  • Error handling.
  • Addressing presentation space based on row, column or position.
In HACL applications we can directly interact with text plane, field plane, colour plane and attribute plane. Developers can access these planes to retrieve data or update back data.
Sample HACL Application:
​

Picture
Picture
Code corresponding to the above sample application:

    
How to run this sample:
Step 1: Double click on HACL_demo.jar
Step 2: Provide host details
Step 3: Click on connect button
Step 4: Click on Console button to see the PS data
Step 5: Try to set data on specified position, or row and col.
Step 6: Send a key mnemonic like [enter] using SendKey option
Step 7: View the same getting updated on the console.
​
hacl_demo.zip
File Size: 7772 kb
File Type: zip
Download File

​Some references
https://www.ibm.com/support/knowledgecenter/en/SSS9FA_12.0.0/com.ibm.hod.doc/doc/hacl/ECLReference.html

Praveen Shashikant

Chief Programmer, HOD
p
raveeny@hcl.com  ​

2 Comments
Neelu link
5/5/2020 07:04:07 am

Hi,
how can we know how an i use HACL libraries on my machnie, when i dont have host access toolkit installed.

Regards,
Neelu

Reply
David
6/7/2020 11:18:56 am

Hola como puedo usar el SendKeyEvent(SendKeyEvent event) para dejar el evento de una tecla ya predefinido y que este se ejecute cada vez que se cumpla una condicion

Reply



Leave a Reply.

    Archives

    May 2020
    October 2019
    July 2019
    June 2019
    May 2019
    March 2019
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    October 2017
    September 2017

    Categories

    All
    HACP
    HACPEE
    HATS
    HOD
    PCOMM

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blogs
  • FORUM
  • About
  • Contact
  • Resources