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

How to use actions and expressions in Host On-Demand Macro

5/15/2020

0 Comments

 
Picture
When the macro runtime has selected a new current macro screen, the macro runtime immediately begins to perform the actions in the <actions> element of that macro screen. After the macro run-time has performed all the actions, the next step is to determine the next macro screen to be processed. Within a single macro screen, the macro runtime performs the actions in the order in which they occur in the <actions> element. This is the same order in which you have ordered the actions under the Action list. You are not required to create any actions for a macro screen. If there is no <actions> element specified or the <actions> element is empty, then the macro runtime goes directly to the next section of macro screen processing, which is selecting the next macro screen to be processed.
​
Picture
Actions by function
Following is a list of all the actions, grouped according to function.
​
Picture
Picture
           Example of an Extraction Operation in Macro Editor:
​
Picture
Figure 2: Extraction a screen text using Macro
Following are the steps to achieve an Extraction operation:
​
Picture
Also, the programmer can perform the Extraction Action by writing code using the code editor.
​
Picture
Figure 3: Host Application Screen from where ‘User’ word is extracted
Picture
Figure 4: Code for a sample Extraction Action
The Host On-demand Macro Programming language supports arithmetic operators, string Concatenation operator, conditional operators, and logical operators. Let us discuss how we can use arithmetic operators in expressions.
You can use arithmetic expression in the scenarios given below:
​


1.   As a parameter for a screen
2.    As a parameter for a descriptor
3.    As a parameter in an action
4.    As an initial value for a variable

Let us see how we can use the  “+” operator for defining a conditional action.

Picture
Figure 5 Use of Arithmetic Expression
NOTE:
You must use the ‘$’ (dollar) sign before the variable names while using in an arithmetic expression.
​
Anikjit Mitra
Technical Lead – HACP & HATS
​
0 Comments



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