IBM Host On-Demand Version 12.0: Host On-Demand Macro Programming Guide

IBM Host On-Demand Version 12.0

IBM

Host On-Demand Macro Programming Guide

SC31-6378-06

IBM Host On-Demand Version 12.0

IBM

Host On-Demand Macro Programming Guide

SC31-6378-06

Note Before using this information and the product it supports, read the information in Appendix B, "Notices," on page 235.

Fifth Edition (February 2016) This edition applies to Version 12.0 of IBM? Host On-Demand (IBM Host Access Client Package for Multiplatforms V7.0, program number 5724-I20) and to all subsequent releases and modifications until otherwise indicated in new editions. Copyright International Business Machiens Corporation 2004, 2016. ? Copyright IBM Corporation 2004, 2016. US Government Users Restricted Rights ? Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents

About this book . . . . . . . . . . . vii

About the other Host On-Demand documentation vii Conventions used in this book. . . . . . . . viii

Part 1. Macro basics . . . . . . . . 1

Chapter 1. Introduction . . . . . . . . 3

Host On-Demand macros . . . . . . . . . . 3 Definition of a macro . . . . . . . . . . 3 Advantages of macros . . . . . . . . . . 3 Unsophisticated users . . . . . . . . . . 3 Sophisticated users . . . . . . . . . . . 3 Programming features . . . . . . . . . . 3 Samples . . . . . . . . . . . . . . . 4

Deploying macros . . . . . . . . . . . . 4 Using macros to integrate your enterprise applications. . . . . . . . . . . . . . . 4 Host Access Toolkit . . . . . . . . . . . . 4 Macros and security . . . . . . . . . . . . 5 This book focuses on 3270 applications . . . . . 5

Chapter 2. Macro components . . . . . 7

Overview . . . . . . . . . . . . . . . 7 Macro Manager . . . . . . . . . . . . . 7

Macro Manager toolbar . . . . . . . . . . 7 Macro Editor . . . . . . . . . . . . . 8 Code Editor . . . . . . . . . . . . . 9 Macro runtime . . . . . . . . . . . . . 10 Macro object . . . . . . . . . . . . . . 10 Definitions of other terms. . . . . . . . . . 11

Chapter 3. Recording and playing back a simple macro . . . . . . . . . . . 13

Recording a simple macro . . . . . . . . . 13 Playing back a simple macro . . . . . . . . 16 Assigning the macro to a key combination . . . . 17

Chapter 4. Macro structure . . . . . . 19

Macro script . . . . . . . . . . . . . . 19 XML elements . . . . . . . . . . . . 19 Conceptual view of a macro script. . . . . . 20 Introduction to the Macro tab . . . . . . . 21

The macro screen and its subcomponents . . . . 23 Application screen . . . . . . . . . . . 23 Macro screen . . . . . . . . . . . . . 24 Conceptual view of a macro screen . . . . . 25 Introduction to the Screens tab . . . . . . . 26

Part 2. Developing macros . . . . . 29

Chapter 5. Data types, operators, and expressions . . . . . . . . . . . . 31

Choosing a macro format . . . . . . . . . . 31

? Copyright IBM Corp. 2004, 2016

The basic macro format versus the advanced macro format . . . . . . . . . . . . . 31 Representation of strings and special characters, treatment of operator characters . . . . . . 31 Converting your macro to a different format . . 33 Standard data types . . . . . . . . . . . 33 Boolean data . . . . . . . . . . . . . 33 Integers. . . . . . . . . . . . . . . 34 Doubles . . . . . . . . . . . . . . 34 Strings . . . . . . . . . . . . . . . 34 Fields . . . . . . . . . . . . . . . . 34 The value null . . . . . . . . . . . . . 35 Arithmetic operators and expressions. . . . . . 35 Operators and expressions . . . . . . . . 35 Where arithmetic expressions can be used . . . 35 String concatenation operator (+) . . . . . . . 36 Operators and expressions . . . . . . . . 36 Conditional and logical operators and expressions 36 Conditional expression can include complex terms . . . . . . . . . . . . . . . 37 Where conditional expressions can be used . . . 37 Automatic data type conversion . . . . . . . 37 Effect of context . . . . . . . . . . . . 37 Conversion to boolean . . . . . . . . . . 37 Conversion to integer . . . . . . . . . . 38 Conversion to double . . . . . . . . . . 38 Conversion to string . . . . . . . . . . 38 Conversion errors . . . . . . . . . . . 38 Equivalents . . . . . . . . . . . . . . 38 Significance of a negative value for a row or column 39

Chapter 6. How the macro runtime processes a macro screen . . . . . . 41

Overview . . . . . . . . . . . . . . . 41 Scenario used as an example . . . . . . . 41 Stages in processing a macro screen . . . . . 42 Closer look at stage 1 . . . . . . . . . . 42 Overview of the entire process (all 3 stages) . . 42 Conclusion of the overview . . . . . . . . 43

Stage 1: Determining the next macro screen to be processed . . . . . . . . . . . . . . . 43

Adding macro screen names to the list of valid next screens (step 1(a)) . . . . . . . . . 43 Screen recognition (step 1(b)) . . . . . . . 45 Removing the names of candidate macro screens from the list of valid next screens (step 1(c)) . . 47 Stage 2: Making the successful candidate the new current macro screen . . . . . . . . . . . 47 Stage 3: Performing the actions in the new current macro screen . . . . . . . . . . . . . . 47 Inserting a delay after an action . . . . . . 48 Repeating the processing cycle . . . . . . . . 48 Terminating the macro. . . . . . . . . . . 48

iii

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download