Read EHllapi Programmer's Reference Gudie text version

WebConnect 6.5 Ehllapi Programmer's Reference Guide

© 2003 by OpenConnect Systems Incorporated. All rights reserved. US Patent Number 5,754,83

Notices

OpenConnect Systems® Incorporated continuously updates its product publications. It is the user's responsibility to ensure that this edition is applicable and current before using this publication in conjunction with any OpenConnect Systems product. OpenConnect Systems makes no warranties with the respect to the contents of this publication and does not assume any liability arising out of the use of any product described in this publication. The information contained in this document is believed to be correct at the time of publication. It is subject to change without notice. Copyright© 2004 by OpenConnect Systems® Incorporated, all rights reserved. This material contains trade secrets and confidential proprietary information of OpenConnect Systems. Use of copyright notice is precautionary only and does not imply publication. No part of any book may be reproduced or transmitted in any form or by any means, graphic, electronic, or mechanical, including photocopying, recording, taping, or by any information storage or retrieval system, without the permission in writing from OpenConnect Systems. Printed in U. S. A. 12/13/04 OpenConnect Systems, Inc. 2711 LBJ Freeway, Suite 700 Dallas TX 75234 972-484-5200 www.oc.com Fax: 972-484-6100

Trademarks

OpenConnect Systems is a registered service mark of OpenConnect Systems Inc. eXtremeVista is a registered trademark of OpenConnect Systems Inc. Mainframe2Web, OpenConnect, Secure ClientConnect, SNA Access Server, SNA Print Server, Visual 3270, WebConnect SSO and xmlConnect are trademarks of OpenConnect Systems Inc. in the United States and/or other countries. All other products and services mentioned are trademarks of their respective companies. The technology of WebConnect and WebConnect SSO is covered under U.S. Patent number 5,754,830. · · · InstallShield--Registered trademark and service mark of InstallShield Corporation. Java and Java Development Kit--Trademarks of Sun Microsystems, Inc. Microsoft Internet Explorer, Windows, Windows 95, Windows 98, Windows 2000, and Windows NT--Trademarks of Microsoft Corporation. Netscape and Netscape Navigator--Trademarks of Netscape Communications. Cisco and Cisco Systems--Registered trademarks of Cisco Systems, Inc. UNIX--Registered trademarks of The Open Group.

· · ·

Document History

Document History

Re lea se D at e Ju ly 19 99 Oct obe r 19 99 Ja nu ar y 20 00 C h an ge D es cri pt io n We bC onn ect Ma na ger Ser v er Ve rsio n 3.0 so ftw ar e r e le as e . We bC onn ect Ma na ger Ser v er Ve rsio n 3.1 so ftw ar e r e le as e . A dde d ne w co mpan y log o and L i cense M ana ge r in fo rm atio n for We bC onn ect SN A A ccess S er v er.

Document History

Re lea se D at e Au gu st 200 0 Ap r i l 20 01 Au gu st 200 1 Ap r i l 20 02 Ju ly 20 02 Au gu st 200 2 F eb r uar y 200 3 Ja nu ar y 20 04 Ju ly 20 04 Au gu st 200 4 D ece mbe r 20 04 C h an ge D es cri pt io n We bC onn ect Ma na ger Ser v er Ve rsio n 4.4 so ftw ar e r e le as e . We bC onn ect 5. 0 Re le ase We bC onn ect 5. 1 Re le ase We bC onn ect 6. 0 Re le ase We bC onn ect 6. 1 We bC onn ect 6. 1. x ( Re v ise d) We bC onn ect 6. 2 with N et wo rk Licen s e Man ag er We bC onn ect 6. 3 We bC onn ect 6. 4 We bC onn ect 6. 42 We bC onn ect 6. 5

Table of Contents

Chapter 1:

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuration Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Ehllapi Applet Environment . . . . . . . . . . . . . . . . . . . . . Communicating With The Mainframe . . . . . . . . . . . . . . . . . . . Presentation Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Ehllapi Function Calls . . . . . . . . . . . . . . . . . . . . . . . . . . How Ehllapi Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ehllapi32.ini Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 11 12 12 13 13 14 15 15 16 18

Chapter 2:

Chapter 3:

WebConnect Ehllapi Function Calls . . . . . . . . . . . . . . . . . . 19 Function Page Layout Conventions . . . . . . . . . . . . . . . . . . . . 19 Function Call Listings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 CONNECT PRESENTATION SPACE (1) . . . . . . . . . . . . 24 CONVERT POSITION or CONVERT ROWCOL (99) . . . 26 Copy and Append Selected Text to Clipboard (209) . . . . 28 COPY FIELD TO STRING (34) . . . . . . . . . . . . . . . . . . . . 29 COPY OIA (13) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 OIA Group Bit and Corresponding Images for 5250 Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 COPY PRESENTATION SPACE (5) . . . . . . . . . . . . . . . . 39 COPY PRESENTATION SPACE TO STRING (8) . . . . . . 42 Copy Selected Text to Clipboard (208) . . . . . . . . . . . . . . 46 COPY STRING TO FIELD (33) . . . . . . . . . . . . . . . . . . . . 47 COPY STRING TO PRESENTATION SPACE (15) . . . . . 49 DISCONNECT PRESENTATION SPACE (2) . . . . . . . . . 51 FIND FIELD LENGTH (32) . . . . . . . . . . . . . . . . . . . . . . . . 52 FIND FIELD POSITION (31) . . . . . . . . . . . . . . . . . . . . . . 54 GET KEY (51) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 PAUSE (18) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Paste Text From Clipboard to Presentation Space (210) . 61

Table of Contents

5

POST INTERCEPT STATUS (52) . . . . . . . . . . . . . . . . . . 62 QUERY CLOSE INTERCEPT (42) . . . . . . . . . . . . . . . . . . 63 QUERY CURSOR LOCATION (7) . . . . . . . . . . . . . . . . . . 64 QUERY FIELD ATTRIBUTE (14) . . . . . . . . . . . . . . . . . . . 65 QUERY HOST UPDATE (24) . . . . . . . . . . . . . . . . . . . . . . 67 QUERY SESSIONS (10) . . . . . . . . . . . . . . . . . . . . . . . . . 68 QUERY SESSION STATUS (22) . . . . . . . . . . . . . . . . . . . 70 QUERY SYSTEM (20) . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 RECEIVE FILE (91) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 RELEASE (12) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 RESERVE (11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 RESET SYSTEM (21) . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 SEARCH FIELD (30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 SEARCH PRESENTATION SPACE (6) . . . . . . . . . . . . . . 80 Select all Text Within Current Presentation Space (211) . 82 SEND FILE (90) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 SEND KEY (3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 SET CURSOR (40) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 SET SESSION PARAMETERS (9) . . . . . . . . . . . . . . . . . 92 START CLOSE INTERCEPT (41) . . . . . . . . . . . . . . . . . 100 START HOST NOTIFICATION (23) . . . . . . . . . . . . . . . . 101 START KEYSTROKE INTERCEPT (50) . . . . . . . . . . . . 103 STOP CLOSE INTERCEPT (43) . . . . . . . . . . . . . . . . . . 105 STOP HOST NOTIFICATION (25) . . . . . . . . . . . . . . . . . 106 STOP KEYSTROKE INTERCEPT (53) . . . . . . . . . . . . . 107 WAIT (4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

Appendix A:

Ehllapi Return Codes and Debugging . . . . . . . . . . . . . . . . 111 How To Use Return Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 111 Standard Return Code Descriptions . . . . . . . . . . . . . . . . 111 Windows Environment and Multiple Ehllapi Requests . . . . . 113 Ehllapi Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Controlling Trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Trace Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Ehllapi Function Summary . . . . . . . . . . . . . . . . . . . . . . . . . 115 PC File Transfer Messages . . . . . . . . . . . . . . . . . . . . . . . . 119

Appendix B: Appendix C:

6

WebConnect Ehllapi Programmer's Reference Guide

Appendix D:

Compile and Link Ehllapi Program . . . . . . . . . . . . . . . . . . 123 Ehllapi Application Program Development . . . . . . . . . . . . . . 123 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Table of Contents

7

8

WebConnect Ehllapi Programmer's Reference Guide

List of Tables

Table 5-1: Ehllapi/WebConnect File Interface Settings Table 6-1: Host Presentation Space Character . . 18 . . . . . . . . 34

Table A-1:Return Code Descriptions . . . . . . . . . . . . . . . . 111 Table B-1:Ehllapi Function Summary . . . . . . . . . . . . . . . . 115 Table C-1:PC File Transfer Message Definitions . . . . . . . 119

WebConnect Ehllapi Programmer's Reference Guide

9

10

Chapter 1: Introduction

Overview

OpenConnect Systems' Emulator High-Level Language Applic a t i o n P r o g r a m m i n g I n t e r f a c e ( E h l l a p i ) is an application programming interface (API) that allows your local application programs to interact with a host using 3270 and 5250 terminal emulation. The Ehllapi function provides an interface allowing your application to use the host connectivity options while retaining the flexibility of a custom application. The Ehllapi function provides interaction between mainframe and midrange computers and workstations. An Ehllapi application program performs and monitors workstation activities that are usually performed by a user. You can use an Ehllapi application program to: · · · · · · · · Allow easy access to host applications Conceal host applications from the end user Customize existing and new host applications Increase user productivity Reduce new application learning curves Regulate host computer response time and availability Simplify complicated tasks Standardize and automate repetitive computer operations.

WebConnect Ehallapi Programmer's Reference Guide

11

Intended Audience

This WebConnect Ehallapi Programmer's Reference Guide is written for programmers who are using the Ehllapi Toolkit in a local environment. You are required to have an understanding of 3270 and 5250 terminal emulation and a working knowledge of your UNIX or computer environment. If you need additional information about how to write, compile, and link/edit programs, refer to the appropriate reference books and compiler documents for your environment.

Configuration Parameters

Ehllapi uses the following software environments: · Windows 95/98/NT/2000/XP You also need an Ehllapi application. If you write your own Ehllapi application by using the Ehllapi Toolkit, you need a C compiler and an operating system Software Development Kit (SDK). To execute the Ehllapi program, note the following information: · An ehllapi32.ini file must exist in the same directory as the Ehllapi application. In the Windows and NT environments the ehllapi32.ini file must be in the same directory as the ehllapi32.dll. A sample ehllapi32.ini file is included with the emulations API packaging.

12

Chapter 1 Introduction

Chapter 2: The Ehllapi Applet Environment

We b C o n n e c t E h l l a p i allows a local application program to communicate with a mainframe host. It resides within the WebConnect terminal emulator on a host that is connected to the network.

Communicating With The Mainframe

We b C o n n e c t E h l l a p i f o r A p p l e ts communicates with the mainframe host by processing function requests made by an application program. When an application requests a function, We b C o n n e c ts ' E h l l a p i software interprets the request and sends it to the WebConnect emulator for processing. You can easily customize and automate existing and new applications using Ehllapi Applet functions. These functions are initiated by the WebConnect application and interact between the session and the mainframe host. For example, you can use Ehllapi's Applet functions to monitor your host computer. Application programs can be written to help eliminate problems with host downtime. Information can be entered and accessed by applications on both the workstation and the host by monitoring your host computer, regardless of where the application program resides. Information stored on the host can be imported to a workstation file and used in other applications such as a spreadsheet or word processing package.

WebConnect Ehllapi Programmer's Reference Guide

13

Presentation Space

The presentation space (PS) is an area in memory that corresponds to a screen image and is used as a building block when using Ehllapi. The Ehllapi application and each of the 3270 or 5250 presentation spaces are separate processes. Each presentation space has a one-character identifier called a "short name." The short name is assigned when the emulator is configured. Valid short names for the presentation spaces are A-Z.

Ehllapi32.ini

User-written Ehllapi Application

Presentation Space

[OPTIONS]

WebConnect Ehllapi Library

WebConnect Emulator

Trace File

Figure 1: Ehllapi Interaction

Only 26 concurrent applet sessions are supported. The Ehllapi library communicates with each session through a predefined port.

14

Chapter 2 The Ehllapi Applet Environment

Using Ehllapi Function Calls

Executing E h l l a p i A p p l e t functions is a simple two-step process:

1.

The WebCo nnect Ehllapi application calls a E h l l a p i function through the Ehllapi library. Eh llapi supports three separate call interfaces: a. hllc() for Win32 OS. b. hllc() used by WebConnect COM object only. c . winhllapi() for the Microsoft Windows format. This interface is identical to the IBM format with the addition of one parameter, the window handle or other unique identifier.

2.

Control returns you to the E h l l a p i application.

F ig u r e 1 : illustrates E h l l a p i 's interaction.

How Ehllapi Works

E h l l a p i uses direct calls through the Eh llap i library which provides two entry points:

1. 2.

hllc() for win32. winhllapi() for additional functionality under your local environment.

The hllc() or winhllapi() functions are described below: int; *ha_function /* Pointer to Ehllapi function number */ char*ha_data_ptr;/* Pointer to Ehllapi data string */ int*ha_length;/* Pointer to Ehllapi data string length */ int*ha_rc;/* Pointer to Ehllapi return code on output */ /* or presentation space position on input */ . . . hllc(ha_function, ha_data_ptr, ha_length, ha_rc);

WebConnect Ehllapi Programmer's Reference Guide

15

·

The winhllapi() function contains one additional calling parameter, a window handle identifying the caller:

int *hwnd; /* Pointer of caller program's window */ int *ha_function; /* Pointer to Ehllapi function number */ char *ha_dataptr; /* Pointer to Ehllapi data string */ int*ha_length; /* Pointer to Ehllapi data string length */ int *ha_rc; /* Pointer to Ehllapi return code on output */ /* or presentation space position on input */ . . . winhllapi(hwnd, ha_function, ha_dataptr, ha_length, ha_rc);

By using the winhllapi() entry point, you can run concurrent connections to the presentation spaces. · You must include the following function declaration for hllc() and winllapi() prior to calling them for win32 environments.

#ifdef win32 #include "windows.h" WINAPI hllc (long *ha_function, char *ha_dataptr, by *ha_length, long *ha_rc);

WINAPI Winhllapi (long *ha_SessID, long *ha_functin, char *ha_dataptr, long *ha_length, long *ha_rc); #endif

Examples

The following are some examples showing the programming differences between the hllc() and winhllapi() function calls. Pseudocode for copying "Hello World" to three different presentation spaces using hllc(): connect("A") copytops("Hello") connect("B") copytoPS("Hello") connect("C") copytoPS("Hello") copytoPS("World") connect("A") copytoPS("World")

16 Chapter 2 The Ehllapi Applet Environment

connect("B") copytoPS("World") Pseudocode for copying "Hello World" to three different presentation spaces using winhllapi(): winconnect(hwnd_1,"A") winconnect(hwnd_2,"B") winconnect(hwnd_3,"C") wincopytoPS(hwnd_1,"Hello") wincopytoPS(hwnd_2,"Hello") wincopytoPS(hwnd_3,"Hello") wincopytoPS(hwnd_1,"World") wincopytoPS(hwnd_2,"World") wincopytoPS(hwnd_3,"World")

N o t e : All the connections for the winhllapi() are done at one time so that a reconnect to the presentation space is not necessary.

WebConnect Ehllapi Programmer's Reference Guide

17

Ehllapi32.ini Summary

For all platforms, the Eh llap i program must be able to access a ehllapi32.ini file. For Windows and NT systems, the file must be located in the same directory as the ehllapi.dll. These settings can only be modified through a text editor.

Tab le 5 -1 : E h l la p i /Web C on n e c t Fi le I n te r f a c e S e tt i ng s

F il e

[ O P T I O NS ] T hi s i nd ic a t e s t h e d i r e c t o r y i n w h i c h t h e t r a c e l o g f i l e i s l o c a t e d . T h e d e f a u lt pat h na me i s t h e c u r r e n t di re cto ry. file na me i s t h e n am e o f t h e t r a c e l o g f i l e . T h e de faul t fi le nam e is Eh ll ap i.T R C . A pp e n d s i m pl y a p p e n d s t h e d ata t o t h e e n d o f a n e x i st i n g t r a c e f i l e. O v e r w ri t e e ra s e s t h e c o n t e nts o f the tra ce fi le and be gi ns w ri t in g th e tr ace to an empty file. Ye s cause s tra c in g to beg in im m ed ia t el y fol low i ng t h e f i r s t E h l la pi c o m m a n d e x e c u t e d. T hi s o v e r r i d e s t h e TR O N/ T R O F F o p t i o ns i n t h e S E T S E S S I O N PA R A M E T E R S ( 9) f u n c t i o n. T h i s i s t h e pat h u se d b y t h e f i l e t r a ns f e r c o m m a n d s , if n o e x pli c it pa t h i s s pe ci f i ed w i t h t h e S E N D F I L E ( 9 0 ) a nd R E C E I V E F I L E ( 9 1 ) f u n c t i o n c a l l s . Y, N Star t Trac e

D ef a ul t Fi le

De sc rip t io n

P a th = pa th n am e

F i l e N a m e = f i l e n am e

Fi l e M od e =A p p en d |O v er w r i te

TraceAlways=No|Yes

DefaultFil eTransfer Path=pathnam e

Tr ace

18

Chapter 2 The Ehllapi Applet Environment

Chapter 3: WebConnect Ehllapi Function Calls

This chapter defines and describes We b C o n n e c t E h l l a p i function calls. A numerical list and an alphabetical list in C O N N E C T P R E S EN TAT I O N S PAC E ( 1 ) , pa g e 2 4 .

Function Page Layout Conventions

Each Ehllapi function is described using the following format: · · · · · · · · · · · · Function Number and Name Description F u n c t i o n N u m b e r a n d N a m e , pa g e 1 9 D e s c r ip t i o n , pa g e 1 9 P r e r e q u i s i t e C a l l s , pa g e 2 0 S u p p l i e d P a r a m e t e r s , pa g e 2 0 C a l l i n g P r o g r a m H a n d l e , pa g e 2 0 D a ta St r i n g , pa g e 2 0 D a ta St r i n g L e n g t h , pa g e 2 0 P r e s e n ta t i o n S pa c e P o s i t i o n , pa g e 2 0 R e t u r n e d P a r a m e t e r s , pa g e 2 1 F u n c t i o n N u m b e r, pa g e 2 1 R e t u r n C o d e , pa g e 2 1 D i s c u s s i o n , pa g e 2 1

We b C o n n e c t E h l l a p i functions have unique names and numbers which are used to call the function. This section briefly explains each function, its purpose, and how you can use the function in your application program.

WebConnect Ehllapi Programmer's Reference Guide

19

Prerequisite Calls

Any function that the application program must call prior to using the function is a prerequisite call. These are defined for each Ehllapi function call. Function call listings and summarized prerequisite calls can be found in CONNECT PRESENTATION SPACE (1), page 24. This section describes the parameters that the program must define to call the Ehllapi function. The words Not Applicable indicate that a parameter is not used by the function. The calling convention for Ehllapi is a fixed format call with set parameters. For the hllc() interface, the format and parameters are: · · · hllc (&function, &string, &len, &rc) For the winhllapi() interface, the format and parameters are: winhllapi (&handle, &function, &string, &len, &rc)

Supplied Parameters

The parameters specify the address of the following: Calling Program Handle For winhllapi() only, this identifies the calling program pointer to the caller program window. This must be a unique identifier such as a window handle or a process ID. This parameter is used in different ways by different functions. For some functions, the Data String is a string of characters. In other functions, the Data String is a string of concatenated data items. Space for returning data strings must be allocated in the Ehllapi application program. This parameter is usually the length (in number of bytes) of the Data String parameter described in the preceding paragraph. In special cases, this parameter passes information such as a presentation space position or an attribute byte. When it is used this position must be filled by an integer. This parameter is a value associated with the presentation space screen size that is currently connected. When used, this position must be filled by an integer with a value between 1 and the maximum presentation size. The maximum presentation size is configurable and a typical value for the maximum size is 1920.

Data String

Data String Length

Presentation Space Position

20

Chapter 3 WebConnect Ehllapi Function Calls

Returned Parameters

This section shows the parameters that are returned to the program after a call to the E h ll a p i function. It also explains how these parameters are interpreted and presents requested information from the E h l l a p i parameters. E h l l a p i parameters return information in the following order: N o t e : With the exception of the Function Number parameter, these parameters may change on return from each function.

Function Number

This parameter specifies the E h l la p i function number to be called and it is always required. The Function Number is a pointer to an integer. The Return Code parameter is always a numeric value. This parameter either indicates that the function ran successfully or provides error information. For the Convert Position or Convert Rowcol (99) function, it indicates the presentation space position. The application checks the return code before continuing. If an error is indicated by the Return Code parameter, the application program will provide some means of recovery. E h l la p i return codes allow for a common error handling routine. Almost all E h l l a p i functions use standard return codes. For example, 0 normally means that the function completed successfully and 9 means a system error was encountered. This enables you to develop common error-handling. Detailed Return Code explanations are contained in the descriptions of the individual E h l la p i functions.

Return Code

Discussion

This section provides additional technical information about using the E h l l a p i function. For example, many of the E h l la p i functions are affected by the various options provided by the Set Session Parameters (9) function. The Discussion section explains if and how the function is affected by these options. You can then refer to the Set Session Parameters (9) function section for details. Function usage and restrictions are also presented in the this section where special considerations and restrictions are explained.

WebConnect Ehllapi Programmer's Reference Guide

21

Function Call Listings

No .

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 18 20 21 22 23 24 25 30 31 32 33 34 40 41 42 43 50 51 52 53 90 91 99 208 209 210

Eh ll ap i Fu n cti on

CO NN E CT P RE S E N TAT I O N S PA CE DI S C O N NE CT P RE S E NTAT I O N S PA CE SEND KEY WA I T CO P Y P R E S E NTAT I O N S PA C E S E A RC H P R E S E N TAT I O N S PA C E Q U E RY C U RS O R LO CAT I O N C O P Y P R E S E NTAT I O N S PA C E TO S T R I N G S E T S E S S I O N PA R A M E T E R S Q U E RY S E S S I O N S R E S E RV E RE LE A S E COPY OIA Q U E RY F I E L D AT T R I B U T E C O P Y S T R I N G TO P R E S E N TAT I O N S PA C E PA US E Q U E RY S Y S T E M RESET SYSTEM Q U E RY S E S S I O N S TAT U S S TA RT H O S T N O T I F I C AT I O N Q U E RY H O S T U P D AT E S TO P H O S T N O T I FI C AT I O N S E A RC H F I E L D FI N D F I E L D P O S I TI O N FI N D F I E L D LE N GT H CO P Y S T RI N G TO FI E LD CO P Y F I E LD TO S T R I N G S E T C U RS O R S TA RT C LO S E I N T E R C E PT Q U E RY C L O S E I N T E R C E PT S TO P C L O S E I N T E R C E PT S TA RT K E Y S T R O K E I N T E R C E PT GET KEY P O S T I NT E R C E PT S TAT US S TO P K E Y S T R O K E I N T E R C E PT S E N D F I LE RE CE IVE FI LE CO NV E RT P O S I T I O N o r C O N V E RT R O W CO L Co py S ele c t ed Tex t to Cl ip bo ar d Co py a nd A pp en d S e le c t ed Tex t t o C l ip bo ard Paste Text F ro m Cl ip bo ar d to Pre s en tati on S pa c e N on e

P r e r eq u is it e F u n ct io n C all

P ag e Nu m b er

pag e 2 4 pag e 5 1 pag e 8 5 pag e 1 08 pag e 2 4 pag e 8 0 pag e 6 4 pag e 2 4 pag e 9 2 pag e 6 8 pag e 7 6 pag e 7 5 pag e 3 3 pag e 6 5 pag e 4 9 pag e 5 9 pag e 7 2 pag e 7 7 pag e 7 0 pag e 1 01 pag e 6 7 pag e 1 06 pag e 7 8 pag e 5 4 pag e 5 2 pag e 4 7 pag e 2 9 pag e 9 1 pag e 1 00 pag e 6 3 pag e 1 05 pag e 1 03 pag e 5 6 pag e 6 2 pag e 1 07 pag e 8 3 pag e 7 3 pag e 2 6 pag e 4 6 pag e 2 8 pag e 6 1

C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N EC T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) N on e N on e C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) N on e N on e N on e N on e N on e S TA RT HO S T N O T I F I C AT I O N ( 23 ) S TA RT H O S T N O T I F I C AT I O N ( 23 ) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) N on e S TA RT C L O S E I N T E R C E PT ( 4 1 ) S TA RT C L O S E I N T E R C E PT ( 4 1 ) N on e S TA RT K E Y S T R O K E I N TE R CE PT (5 0) S TA RT K E Y S T R O K E I N TE R CE PT (5 0) S TA RT K E Y S T R O K E I N TE R CE PT (5 0) N on e N on e N on e C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1)

22

Chapter 3 WebConnect Ehllapi Function Calls

No .

211

E h ll ap i F u n ct io n

S el e c t a ll Tex t W it h i n C u r r e n t P r e s e n tat io n S pac e

Prer eq ui si te F u nc t io n Ca ll

C O N N E C T P R E S E NTAT I O N S PA C E ( 1)

Page N u m be r

pag e 82

E h ll ap i Fu n ct io n N am e

C O N NE C T P R E S E NTAT I O N S PA C E (1 ) C O N V E RT P O S I T I O N or C O N V E RT R O W CO L ( 99) C o p y a nd A p p e n d S el ec t e d Tex t t o C li p b o a r d ( 20 9) C O P Y FI E LD TO S TR I N G ( 34 ) C O P Y O I A ( 13 ) C O P Y P R E S E N TAT I O N S PA C E ( 5) C O P Y P R E S E N TAT I O N S PA C E TO S TR I N G ( 8) C opy S el ec t e d Tex t t o C li pb oar d ( 20 8) C O P Y S T R I NG TO F I E LD ( 33 ) C O P Y S T R I N G TO P R E S E N TAT I O N S PA C E ( 15 ) D I S C O N N E C T P R E S E N TAT I O N S PA C E ( 2) F I ND F I E LD LE NGT H (3 2) F I ND F I E LD P O S I T I O N (3 1) G E T K E Y ( 51 ) PA U S E ( 18 ) P a s t e Tex t F r o m C li pb o a r d t o P r e s e n ta t i o n S pa c e (2 10 ) P O S T I N TE RC E PT S TAT U S ( 52) Q U E RY C LO S E I NT E RC E PT (42 ) Q U E RY C U R S O R LO C AT I O N ( 7) Q U E RY F I E LD ATT R I B U T E ( 14 ) Q U E RY H O S T UP DAT E ( 24 ) Q U E RY S E S S I O N S ( 10 ) Q U E RY S E S S I O N S TAT U S ( 22 ) Q U E RY S Y S T E M ( 20 ) R E C E I V E F I LE (91 ) R E LE A S E (1 2) R E S E RV E ( 11 ) R E SE T SYS TE M (21 ) SE AR CH FIEL D (3 0) S E A R C H P RE S E N TAT I O N S PA CE ( 6 ) Se le ct al l Text W i thi n C ur re nt Pr ese ntati on S pace (2 11) SE ND F I LE (9 0) SE ND KE Y ( 3) S E T C U R S O R ( 40) S E T S E S S I O N PA R A M E T E R S ( 9 ) S TA RT C LO S E I N T E R C E PT ( 4 1 ) S TA RT H O S T NO TI FI C AT I O N (2 3) S TA RT K E Y S T RO K E I N T E R C E PT ( 50 ) S TO P C L O S E I N T E R C E PT ( 4 3 ) S TO P H O S T N O T I F I C AT I O N ( 25 ) S TO P K E Y S T R O K E I N T E R C E PT ( 5 3 ) WA I T ( 4) N on e N on e

P rere q ui sit e F u nc ti o n Ca ll

Page Nu m b er

pa ge 2 4 pa ge 2 6 pa ge 2 8 pa ge 2 9 pa ge 3 3 pa ge 2 4 pa ge 4 2 pa ge 4 6 pa ge 4 7 pa ge 4 9 pa ge 5 1 pa ge 5 2 pa ge 5 4 pa ge 5 6 pa ge 5 9 pa ge 6 1 pa ge 6 2 pa ge 6 3 pa ge 6 4 pa ge 6 5 pa ge 6 7 pa ge 6 8 pa ge 7 0 pa ge 7 2 pa ge 7 3 pa ge 7 5 pa ge 7 6 pa ge 7 7 pa ge 7 8 pa ge 8 0 pa ge 8 2 pa ge 8 3 pa ge 8 5 pa ge 9 1 pa ge 9 2 pa ge 1 00 pa ge 1 01 pa ge 1 03 pa ge 1 05 pa ge 1 06 pa ge 1 07 pa ge 1 08

C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) S TA RT K E Y S T R O K E I N T E R C E PT ( 5 0 ) N on e C O N N E C T P R E S E N TAT I O N S PA C E ( 1) S TA RT K E Y S T R O K E I N TE RC E PT (5 0) S TA RT CL O S E I N T E R CE PT (4 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) S TA RT HO S T N O T I F I CAT I O N ( 23 ) N on e None N on e N on e C O N N E C T P R E S E N TATI O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) N on e C O N N E C T PR ES EN TATI ON SPAC E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) C O N N E C T P R E S E N TAT I O N S PA C E ( 1) N on e C O N N E C T P R E S E N TATI O N S PA C E ( 1) C O N N E C T P R E S E N TATI O N S PA C E ( 1) None N on e N on e N on e S TA RT C L O S E I N T E R C E PT ( 4 1 ) S TA RT HO S T N O T I F I CAT I O N ( 23 ) S TA RT K E Y S T R O K E I N T E R C E PT ( 5 0 ) C O N N E C T P R E S E N TAT I O N S PA C E ( 1)

WebConnect Ehllapi Programmer's Reference Guide

23

CONNECT PRESENTATION SPACE (1)

Description This function provides a connection between Ehllapi and the presentation space on the specified host. After your program connects to the presentation space, that space becomes the current host session. All communication with the host is performed through this session. No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. Value must be 1. String contains the one-character short name ID for the host presentation space. Not applicable (1 is implied). Not applicable. This function returns the following parameters. The return code set by the CONNECT PRESENTATION SPACE (1) function denotes the status of the attempt and, if successful, the status of the host presentation space. The return codes possible for this function are as follows:

R et u rn C o de

0 1 4 5 9 11

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Codes

D es cri pt i on

C o n n e c t i o n s u c c e s s f u l l y c o m p l e t e d ; h o s t p r e s e n ta t i o n s pa c e r e a dy for in put. I n v a l id h o s t p r e s e n ta t i o n s pa c e s h o r t n a m e I D s p e c i f i ed . S u c c e s s f u l c o n n e c t i o n a c h i e v e d ; h ow ev e r, h o s t p re se ntat i o n s pa c e is bu s y. S u c c e s s f u l c o n n e c t i o n a c h i e v e d ; h ow ev e r, h o s t p re se ntat i o n s pa c e in put i s in hi bi ted . Sy s t em er ro r o c cu rr ed . Re s ou rc e u na v ai lab le (i . e. , ano t he r a ppl i ca t io n i s c on nec t e d o r i n t e r c e pt i n g k e y s t r o k e s ) .

Discussion

The CONLOG/CONPHYS session options under the SET SESSION PARAMETERS (9) function affect the CONNECT PRESENTATION SPACE (1) function. CONLOG is the default option. · If Ehllapi connects to a presentation space, other Ehllapi programs are prevented from using this presentation space. Ehllapi must issue the DISCONNECT PRESENTATION SPACE (2) function or exit to free the presentation space for use by another Ehllapi program. The RESET SYSTEM (21) function also allows Ehllapi to disconnect from the presentation space.

·

24

Chapter 3 WebConnect Ehllapi Function Calls

·

Ehllapi programs are also prevented from connecting to a presentation space when another application is intercepting keystrokes from that presentation space. A single Ehllapi application can be connected to multiple presentation spaces. When using the hllc() interface, only one connection can be the current connection. The current connection must be disconnected before any of the other connections can be made the current connection. When using the winhllapi() interface, any connection can be made the current connection by using its window handle. Disconnection and reconnection are not necessary. Calls requiring CONNECT PRESENTATION SPACE (1) as a prerequisite use the currently connected presentation space.

·

· Example

If an application is connected to presentation space A, B, and C (in that order) when using the hllc() interface the application must connect to B or A again to issue functions against that presentation space. Function calls requiring CONNECT PRESENTATION SPACE (1) as a prerequisite use the currently connected presentation space. The following functions do not require execution of the CONNECT PRESENTATION SPACE (1) function:

S E T S E S S I O N PA R A M E T E R S ( 9 ) Q U E RY S E S S I O N S ( 10 ) PA U S E (18 ) Q U E RY S Y S T E M ( 20 ) RESET SYSTEM (21) Q U E RY S E S S I O N S TAT U S ( 22 ) S TA RT H O S T N O T I FI C AT I O N ( 2 3 ) Q U E RY H O S T U P D AT E ( 2 4 ) S TO P HO S T N O T I F I C AT I O N ( 25 ) S TA RT C L O S E I NT E RC E PT (4 1) Q U E RY C L O S E I N T E R C E PT ( 4 2 ) S TO P C L O S E I N T E R C E PT ( 4 3 ) STA RT K EYS TRO K E I NTE RC EPT (50 ) G E T K E Y (51 ) P O S T I N T E R CE PT S TAT U S ( 5 2 ) S TO P K E Y S T R O K E I N TE R C E PT ( 5 3 ) SE N D F I L E (9 0 ) ( m u st n ot b e co n n e cte d ) R E C E IV E F I LE ( 9 1 ) ( m u st n ot b e co n ne ct e d ) C O N V E RT P O S I T I O N or C O N V E RT R O W C O L ( 99 )

WebConnect Ehllapi Programmer's Reference Guide

25

CONVERT POSITION or CONVERT ROWCOL (99)

Description This is two function calls in one: · · The CONVERT POSITION (99) function converts the host presentation space positional value into the display row-column coordinates. The CONVERT ROWCOL (99) function converts the display row-column coordinates into the host presentation space positional value.

Neither one changes the cursor position. Prerequisite Calls Supplied Parameters Function Number Data String No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. Must be 99. This is one of two strings: · For the CONVERT POSITION (99) function, host presentation space short name ID and P. For example, AP converts the position of presentation space A. For the CONVERT ROWCOL (99) function, host presentation space short name ID and R. For example, AR converts the row and column position of presentation space A. Where R is specified in the uploaded Data String parameter, the Data String Length parameter is the row. Valid input is a number between 1 and the maximum number of rows (normally 24). When P is specified in the supplied Data String parameter, this parameter is not applicable. When R is specified in the supplied Data String parameter, the Presentation Space Position parameter is the column. Valid input is a number between 1 and the maximum column (normally 80). When P is specified in the supplied Data String parameter, the Presentation Space Position is the host presentation space position. Valid input is a number between 1 and the maximum presentation space size (normally 1920).

·

Data String Length

·

· Presentation Space Position

·

·

Return Parameter

Ehllapi returns the following parameters to your application program. Data String Length · For the CONVERT POSITION (99) function, the number returned is between 1 and the maximum row number. This value is the number of the row that contains the presentation space position specified in the supplied Presentation Space Position parameter.

26

Chapter 3 WebConnect Ehllapi Function Calls

· Return Code

For the CONVERT ROWCOL (99) function, a value of 0 indicates an error in the input value for row (the Data String Length parameter).

For the CONVERT POSITION or CONVERT ROWCOL (99) function, the value returned in the Return Code parameter is a status code. N o t e : This is an exception to the rule that the Return Code parameter always contains a return code. The following return codes are valid.

Re tu rn C o de

0 >0 99 98 99 99

Valu e

I n c o r r e c t c o l u m n i n p ut w a s p ro v i d e d . T hi s is the pr ese nta tio n space po siti on or co lu m n An in va li d sh or t na me or syste m er ror occu rre d. T he se con d cha ra c ter in the data str in g i s nei th er P no r R .

Discussion

To determine how many rows and columns there are in the presentation space size, refer to bytes 12 and 14 of the returned data string for the QUERY SESSION STATUS (22) function.

WebConnect Ehllapi Programmer's Reference Guide

27

Copy and Append Selected Text to Clipboard (209)

Description Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Return Parameter Data String Length Return Code

C o de

0 1 9 Success Not Connected System Error

This function instructs the WebConnect applet to copy and append selected emulation text to the system clipboard. Use the CONNECT PRESENTATION SPACE (1) function. Your Ehllapi application. The value must be 209. Not Applicable. Not Applicable. Not Applicable. Ehllapi function returns. Not Applicable.

Val ue

Discussion

This function supports WebConnect COM Object interface. Same as Menu item Edit> Copy and Append in WebConnect Applets.

28

Chapter 3 WebConnect Ehllapi Function Calls

COPY FIELD TO STRING (34)

Description This function transfers characters from a field in the host-connected presentation space to a data string in your application program. You can use the FIND FIELD POSITION (31) and FIND FIELD LENGTH (32) functions to determine field position and length. The COPY FIELD TO STRING (34) function can be used with protected or unprotected fields, but only in a field-formatted host presentation space. The string ends when one of the following conditions occurs: · · The end of the field is reached. The length of the target string is exceeded. N o t e : If the field at the end of the host presentation space wraps, the COPY FIELD TO STRING (34) function continues at the start of the presentation space. To return Extended Attributes Bytes (EABs), the EAB option under the SET SESSION PARAMETERS (9) function can be used. When this option is used, an EAB is associated with each character on the presentation space and follows each character. The XLATE option under the SET SESSION PARAMETERS (9) function can be used with the COPY FIELD TO STRING (34) function to translate the EABs into color graphics adapter (CGA) format. Prerequisite Calls Supplied Parameters Function Number Data String Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. Must be 34. Preallocated target data string. The data string must be at least twice the length of the field length, if the SET SESSION PARAMETERS (9) function was issued with the EAB option set. Number of bytes to copy. Identifies the source (which can be the presentation space position of any byte within the field). The COPY FIELD TO STRING (34) function always starts at the beginning of the field. This function returns the following parameters to your application program. Data String:

Data String Length Presentation Space Position

Returned Parameters

WebConnect Ehllapi Programmer's Reference Guide

29

·

A string containing data from the identified field in the host presentation space. The first byte in the returned data string is the beginning byte of the identified field in the host presentation space. The number of bytes in the returned data string is determined by the smallest of the following: Number of bytes specified in the calling data string length parameter. Number of bytes in the host presentation space identified field.

R et ur n Co d e

0 1 2 6 7 9 24

· · Return Code

Val ue

T h e C O P Y F I E L D TO S T R I N G ( 3 4 ) f u n c t i o n w a s s u c c e s s f u l . T h e p ro g r a m i s n o t c u r re nt l y c o n n e c t e d t o t h e h os t s e s s i on . A n e rr or w a s m a d e i n s p e c i f y i n g par am et e r s . T h e f i e l d l e n g t h a nd d a ta s t r in g l e n gt h w e r e n o t t h e s a m e s i z e . I f t h e s t r in g le ng t h wa s s m al le r t ha n t he f i el d c op ie d, t he d ata is t ru nc at e d. T h e h os t p r e s e nta t i o n s pa c e p o s i t i o n i s i nv a l id . A syst em er ror occu rr ed. T h e h os t p r e s e nta t i o n s pa c e i s u nf o r m a t t e d .

Discussion

The NOXLATE/XLATE, NOATTRB/ATTRB, and NOEAB/EAB session options under the SET SESSION PARAMETERS (9) function affect the COPY FIELD TO STRING (34) function. The involved set session parameters have the following effect:

S et Se ss io n Para meter

NOEAB E A B an d NO XL AT E E A B an d X L AT E

E f fe ct o n t h e C O P Y F un c ti on s

E x t e n d e d a t t r i b u t e s a r e n o t r e t u r ne d. O n l y t e x t i s c o p i e d f r o m t h e p re s e n ta t i on s pa c e t o t h e u s e r b u ff e r. E x tend ed attr ib ute s are re tur ne d a s d efi ne d i n th e fi rst tabl e p re s ent e d b el ow. E x tend ed attr ib ute s are tra nsl ate d to the per son al com pu t er co lo r g ra p h i c s a d a p t e r ( C G A ) f o r m a t a s d ef i n e d i n t h e s e c o n d ta b l e p re s ent e d b el ow.

The following tables define the returned 3270/5250 field attributes. Bit positions are in IBM format with 0 bit as the leftmost bit in the byte.

Bit

0- 1 C h ara c ter hi gh li gh tin g 0 0 = N or ma l 0 1 = Bl in k (a lw ay s 0 ) 1 0 = R e v e rs e v i d e o 11 = U n der li ne . C h ara c ter C ol or ( C ol or rem a p m ay o ve rr id e th is col or de fin iti on .) 0 00 = D e f au lt 0 01 = B lu e 0 10 = R e d 0 11 = P i n k 1 00 = G re en 1 01 = Tur qu oi s e 11 0 = Ye ll ow 111 = W hi t e.

32 70 A tt ri bu t es

2- 4

30

Chapter 3 WebConnect Ehllapi Function Calls

B it

5 -7 R es e rv e d (n ot u s ed ).

32 70 At t rib u t es

Bi t Po si ti on

0

52 50 At t rib u t es

F ie ld at t r ib ut e f la g 0 = N ot a fi el d att rib ute byte 1 = F i e l d a tt ri b u te b yte . Vi s ib il it y 0 = N on -d is p la y 1 = D i sp la y. U np ro t ec t ed / pr ot e c t ed 0 = U np ro t ecte d da ta fie ld 1 = P rot ected da ta fie ld . Intensity 0 = N or m al 1 = H i gh. F ie ld t y pe 0 0 0 = A l p h a n u m e r i c : a ll c h a ra c t e r s a ll ow ed 0 0 1 = A l p h a b e ti c o n l y: u p p e r ca se a n d l ow er c a se l e tte r s, co m ma , p e r i o d , h y p h e n , b l a n k , a n d D up k e y a l l ow ed 0 1 0 = N u m er ic s h i f t : a ut o m a t i c s h i f t f o r n um er ic s 011 = N um e ri c o nl y : num b ers 0 -9 , co m ma , pe ri od, p lu s , mi nu s, bl ank, a n d D u p k e y a ll ow ed 1 0 0 = R es e r v e d 10 1 = D ig its on ly: n um ber s 0- 9 a nd Du p ke y al low e d 110 = M a gne tic str ip e r ea der da ta on ly 111 = S i g n e d n um er ic : n um be rs 0 -9 , p l u s , m in us , a n d D u p k e y al lo w ed . M od if i ed / Un mo di f ie d 0 = F i el d ha s no t be en mo di fie d 1 = F i el d ha s be en mo di fie d.

1

2

3

4 -6

7

WebConnect Ehllapi Programmer's Reference Guide

31

The returned color attributes are defined in the following table (which only applies when EAB and XLATE are set). The attribute bit positions are in IBM format with bit 0 as the leftmost bit in the byte.

B it Re t ur ne d Co l or At t rib u t es

B ackgr ou nd Ch ar acte r C ol or s 0 00 0 = B l ac k 0 00 1 = B l ue 0 01 0 = G r ee n 0 011 = C y an 0 10 0 = R ed 0 10 1 = M ag enta 0 110 = B ro wn 0 111 = Wh it e . F o re gro un d C ha ra c t er Co lo rs 0 00 0 = B l ac k 0 00 1 = B l ue 0 01 0 = G r ee n 0 011 = C y an 0 10 0 = R ed 0 10 1 = M ag enta 0 110 = B ro wn 0 111 = Wh it e 1 00 0 = G r ay 1 00 1 = Li gh t Bl ue 1 01 0 = L i g h t G r e e n 1 011 = L ig ht C y an 11 00 = L ig ht R ed 11 01 = L ig ht M ag en ta 111 0 = Ye ll ow 1111 = W hi t e ( hi gh int ens i t y ).

0 -3

4 -7

32

Chapter 3 WebConnect Ehllapi Function Calls

COPY OIA (13)

Description This function returns the current Operator Information Area (OIA) data from the host presentation space to your presentation space, located on the bottom line of the display screen (below the line). It displays the session status information about the 3270/5250 connection to the IBM host. Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. Must be 13. Pre-allocated target data string. Minimum of 103 bytes. Not applicable. This function returns the following parameters to your application program. A 103-byte string. See R e t u r n e d O I A D a ta St r i n g F o r m a t , pa g e 3 3 for additional information. Return Code Valid return codes.

Co d e

0 1 2 4 5 9

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Data String

De fi n it io n

Th e C O P Y O I A ( 1 3 ) f u n c t i o n w a s s u cc e s s f u l . Th e p ro gr am i s n ot c u r r e n t l y c o n n e c t e d t o t h e h o s t s e s s i o n. A n e rr or w a s m a d e i n s p e c i f y i n g t h e s t r in g l e n gt h ; O I A d ata w a s n ot re turn ed . O I A d a ta w a s r e t u r ne d; h ow ev e r, t h e h os t p re s e n tat i o n s pa c e i s b u s y. O I A d ata w as re t ur ne d; ho w ev er, t h e h os t pr es e nta t io n s pac e inp ut i s in hi bi ted. A n i n t e r n a l s y s t e m e r r o r o c c u r r e d ; O I A d ata w a s n ot r et u r ne d.

Returned OIA Data String Format

·

OIA Format Byte (Byte 1). The OIA format byte is one of the following: · · 1 for 3270 9 for 5250

·

OIA Image (Bytes 2-81). This area contains the OIA image of the connected host session. · The 3270 host presentation space characters are presented in Table 6-1, page 34.

WebConnect Ehllapi Programmer's Reference Guide

33

Tab le 6 -1 : H ost Pres en tatio n Spac e C har acter

0x

x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE > < [ ] ) ( } N UL EM FF NL STP CR

1x

SP = ` " / \ | ¦ ? ! $ ¢ £ ¥ Pt s

2x

0 1 2 3 4 5 6 7 8 9 ß § # @ %

3x

& -- . , : + ¬ ¯ °

4x

à è ì ò ù ã õ ÿ à è

5x

ä ë ï ö ü â ê î ô û á é í ó ú

6x

À È Ì Ò Ù Ã Õ Y A E E I O U Y

7x

Ä Ë Ï Ö Ü Â Ê Î Ô Û Á É Í Ó Ú

8x

a b c d e f g h i j k l m n o

9x

q r s t u v w x y z æ ø å ç ;

Ax

A B C D E F G H I J K L M N O

Bx

Q R S T U V W X Y Z Æ Ø Å Ç ;

Cx

Dx

Ex

P S

Fx

?

4

8

µ ² ³

¿

a

^ ~ . . ` '

é ì ò ù ü

A B

a

xF

{

¤

__

¸

ç

ñ

C

Ñ

p

*

P

*

This table has been adapted from I B M E x t e n d e d S e r v i c e s f o r OS/2, Ehllapi Programming Reference, Figure 2-1, Page 2-23, (courtesy of International Business Machines Corporation). OIA Group Indicator (Bytes 82-103) Contains the OIA groups. These groups comprise bits representing the state of the connected session. Groups are divided by the host function they represent. The bits in each group are ordered. The high-order bits represent the states of higher priority. If more than one state is active within a group, the state with the highest priority is the one represented in the OIA image for the session.

34

Chapter 3 WebConnect Ehllapi Function Calls

N ot S up po rt e d

OIA Group Bit Meanings

The following tables present a breakdown of OIA Groups supported by 3270 terminal emulation sessions. N o t e : Even though WebConnect Ehllapi does not support Groups 2, 3, 5, and 6, it does fill the appropriate offsets in the OIA image with 0xF6. The following tables show the bits and starting column position in the OIA buffer as well as the images returned in IBM 3270 PC format. All group images are represented by Main Frame Interactive (MFI) hex code points. The OIA image data string position minus one (1) position equals the OIA column.

D ata St r in g Star ti ng Posi ti on

2 2 2 2

Bi t

0- 1 2 3 4 5 6- 7

D ef i n i t i o n

R es e rv e d S S C P - L U s e s s io n o w n s s c re e n L U- LU s e s s i o n o w n s s c r e e n On -l in e a nd no t ow ne d S ubs y s t e m r ea dy R es e rv e d

M FI H ex C od e P o in ts

F4 C DF 0 F 6F 6F 6 F4 C DC F F 6F 6 F6 F4 C DF 1 F 6F 6F 6 F4 F 6F 6F 6 F 6F 6

B it

0 1 -7

De fi ni t io n

Insert mode R es e rv e d

D ata St r in g Start in g Posi ti on

53

M FI H ex Co d e P o in ts

D0

WebConnect Ehllapi Programmer's Reference Guide

35

B it

0 1 2 3 4 5 6 7

De fi n it io n

N o nre s ettab le ma chin e ch eck R e se rv e d M ac h i n e c h e c k C o mm un ic a t io n c he c k P ro gr a m c h e c k R e se rv e d D e vi c e n ot w o rk in g R e se rv e d

Da ta St r in g Star ti ng Posi ti on

10 10 10 10 11

M F I H ex C od e Po in ts

C 6 F6 AC A0 A2 A7 C 6 F6 AC A0 A2 A7 C 6 F6 A2 AEA C AC C 6 F6 AFB1 AE A6 C 6 F6 FA C1 F B F 6F 6 F6 F 6

Bi t

0 1 2 3 4 5- 7 OIA time

D ef i ni ti o n

Da ta St rin g Sta rti n g Position

10 10 10 10

MF I He x C o d e P oi nts

C6 F 6FA C 1FA C 4C E F 6F 6 C6 F 6C 4C 5F 6 F 6F 6F 6 F6 C6 F 631 85 F 6F 6F 6 F6 F 6 C6 F 6E 4 08 F 6F 6F 6F 6 F 6

Ter mi na l w ai t R es er v ed Minus function Too mu c h e nt er ed R es er v ed

B it

0 1 2 3 4 5-7

D ef i n i t i on

R es e rv e d O p e r a t o r- u n a u t h or iz e d O p e r a t o r- u n a u t h or iz e d , m in us f u n c t i o n I n v a l id d e a d k e y c o mb in a t i o n Wro ng pla c e R es e rv e d

D ata Str in g Start in g Position

10 10 10 10

M F I H ex C od e Po in ts

C6 F 6E 4 66 F 6F 6F 6F 6 F 6 C6 F 631 85 E 4 C6 F 6F 6F 6 C6 F 6E 4 F 63 518 F 6F 6F 6 C6 F 6C 8E 4E 2 F 6F 6F 6 F6

Bi t

0- 1 2 3- 7

D ef i n i t i o n

Re s er v ed S y s t em w ai t Re s er v ed

D ata St r in g Sta r t in g P o s it i o n

10

M FI H ex C od e P o in ts

C 6F 6B 2B 8 B 2 B 3A 4A CF 6

Bi t

0 1- 7

D ef i n i t i o n

C om m un ic a t io ns er ro r R es e rv e d

D ata St ri ng Star ti ng Posi ti on

23

M F I H ex C od e Po in ts

C1 C 0C 2C 3

36

Chapter 3 WebConnect Ehllapi Function Calls

B it

0 1 2 3 4- 7

D ef i n i t i o n

R es e rv e d P ri nt e r m al f un ct ion P rinte r pr in tin g P ri nte r a ssi g n me n t R es e rv e d

Da ta St r in g Sta r t in g P os it io n

62 62 62

MF I He x Co d e P oi n ts

FA C 1C 9 FA C 1C 7 FA C 1FA

WebConnect Ehllapi Programmer's Reference Guide

37

OIA Group Bit and Corresponding Images for 5250 Sessions

The following tables provide a breakdown of OIA Groups supported by 5250 terminal emulation sessions. The tables show the bits and starting column position in the OIA buffer.

Da ta St ri ng Star ti ng Po sit io n

19

Bi t

0- 2 3 4 5 6- 7

D ef i ni ti o n

Re se r ved S y s t e m a v a ila b l e Re se r ved S u b s y st e m r e a d Re se r ved

B it

0-4 5 6-7 R es er v ed

D ef i n i t i o n

D ata St r in g Start in g P o s it i o n

58

Op era t or in pu t er ro r (I I) R es er v ed

B it

0 -1 2 3 -7

D ef in i ti on

R es e rv ed System wait R es e rv ed

Da ta St ri ng Sta rt in g P o s it i o n

58

B it

0- 6 7 Re s er ve d

D ef i n i t i o n

D ata Str i n g Sta r t in g Position

29

Me ssage w ai t in g ( MW )

38

Chapter 3 WebConnect Ehllapi Function Calls

COPY PRESENTATION SPACE (5)

Description This function copies the contents of the host presentation space into a data string that you define in Ehllapi and translates the characters from the host presentation space into ASCII format. · Attribute bytes and other characters not represented in ASCII are translated into blanks. This translation can be overridden with the ATTRB option under the SET SESSION PARAMETERS (9) function if you do not want the attribute bytes translated into blanks. To return Extended Attributes Bytes (EABs), the EAB option under the SET SESSION PARAMETERS (9) function is used with the COPY PRESENTATION SPACE (5) function. When this option is used, an EAB is associated with (and follows) each character on the presentation space. The XLATE option under the SET SESSION PARAMETERS (9) function can be used with this function to translate the EABs into color graphic adapter (CGA) format. The XLATE option is only valid when it is used with the EAB option.

·

·

Prerequisite Calls Supplied Parameters Function Number Data String

Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. Must be 5. The data string must be at least twice the length of the presentation space if the SET SESSION PARAMETERS (9) function was issued with the EAB option set. The length must be the maximum presentation space size (e.g., 2 × 1920). Not applicable (the length of the host presentation space is implied). Not applicable. This function returns the following parameters to your application program. Contents of the host presentation space.

R et u r n Co d e

0 1 4 5

Data String Length Presentation Space Position Returned Parameters Data String Return Code

De fi ni ti o n

S u c c e s s f u l . T h e s o u r c e p r e s e nta t i o n s pa c e w as a c t i v e , a nd t h e k e y b o a r d w as u n l o c k e d . Th e p ro gr am w as no t c ur re nt l y c o nn ec t ed t o t he h os t s e s si on . Succe s sf ul. Th e co nn ected ho st pr esen ta tio n space wa s wa iti ng for host r esp on se . Succe s sf ul. Th e ke yboa rd w as lo cked .

WebConnect Ehllapi Programmer's Reference Guide

39

R et u rn C od e

9 A s y s t em e rr or o c c ur red .

De fi n it io n

Discussion

Use the COPY PRESENTATION SPACE TO STRING (8) function to copy only a portion of the host presentation space. The XLATE/NOXLATE, ATTRB/NOATTRB, and EAB/NOEAB session options under the SET SESSION PARAMETERS (9) function affect the COPY PRESENTATION SPACE (5) function. The involved SET SESSION PARAMETERS (9) function options have the following effect:

S e t S e s si o n Parameter

NOEAB EAB and N O X LAT E E A B a n d X L AT E

E ff ec t o n t he C O P Y F u n ct io n s

E x t e n d e d a t t r i b u t e s a r e n o t r e t u r ne d. O n l y t e x t i s c o p i e d f r o m t h e p r e s e ntat i o n s pa ce t o t h e u s e r b u ff e r. E x ten ded a ttri bu t es are r etu rn ed as de fin ed i n the fir s t tab le p re s ent ed b el ow. E x ten ded a ttri bute s ar e tra nsla t ed to the pe rson al com p uter c o l o r g ra p h i c s a d a p t e r ( C G A ) f o r ma t a s d ef i n e d i n t h e s e c o n d ta b l e p re se nt e d b el ow.

The returned 3270 character attributes are defined in the following table. The attribute bit positions are in IBM format with bit 0 as the leftmost bit in the byte.

B it

Ch ar acter hi gh li gh tin g 0 -1

De f i n i t i o n 00 01 10 11 = = = = Normal Blink (always 0) Reverse video Underline.

Ch ar acter C ol or (C ol or re ma p m ay o v err id e th is co lo r d efi nit ion .)

2 -4

000 = Default 001 = Blue 010 = Red 011 = Pink 100 = Green 101 = Turquoise 110 = Yellow 111 = White.

5 -7

Re s er ve d ( no t us ed )

The following 5250 Workstation Feature character attributes are returned from the host to the emulator (which only applies when EAB and NOXLATE are set).

Bi t

0 R e ve rs e im ag e 0 = No rm al im a ge 1 = Re v er se im a ge.

D ef i n i t i o n

40

Chapter 3 WebConnect Ehllapi Function Calls

Bi t

1 U nd er s co re 0 = N o und er score 1 = U n der scor e.

De f i n i t i o n

2

B l i nk ( 5 2 5 0 w or k sta ti on fe a t u r e i s n o t a P re se ntati o n M a n a g e r a ppl ica t io n a nd supp or ts bl i nk) 0 = N o bl in k 1 = B li nk . C ol um n s e para t or s 0 = N o co lu m n s epa rat ors 1 = C o l u m n s e par at o r s . R ese r ve d ( n o t u s e d ) .

3 4- 7

The returned PC color attributes are defined in the following table (which only applies when EAB and XLATE are set). The attribute bit positions are in IBM format with bit 0 as the leftmost bit in the byte.

Bi t 0000 = Black 0001 = Blue 0010 = Green 0011 = Cyan 0100 = Red 0101 = Magenta 0110 = Brown 0111 = White.

F ore gr ou nd C h ar acter C ol ors

D ef in it io n

B ac k g ro und C ha rac t e r C ol or s

0 -3

4 -7

0000 = Black 0001 = Blue 0010 = Green 0011 = Cyan 0100 = Red 0101 = Magenta 0110 = Brown 0111 = White 1000 = Gray 1001 = Light Blue 1010 = Light Green 1011 = Light Cyan 1100 = Light Red 1101 = Light Magenta 1110 = Yellow 1111 = White (high intensity).

WebConnect Ehllapi Programmer's Reference Guide

41

COPY PRESENTATION SPACE TO STRING (8)

Description This function copies all or part of the contents of the host-connected presentation space into a data string that you define in Ehllapi. The input presentation space position is the offset into the host presentation space. This offset is based on the following layout: · · The upper left corner (i.e., row 1, column 1) is position 1. The bottom right corner of the presentation space has the highest position number.

Translates the characters from the host presentation space into ASCII format. · Attribute bytes and other characters not represented in ASCII are translated into blanks. This translation can be overridden with the ATTRB option under the SET SESSION PARAMETERS (9) function. To return Extended Attributes Bytes (EAB), the EAB option under the SET SESSION PARAMETERS (9) function is used. When this option is used, an EAB follows each character on the presentation space. The XLATE option under the SET SESSION PARAMETERS (9) function can be used with this function to translate the EABs into color graphics adapter (CGA) format.

·

·

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length

Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. Must be 8. Preallocated target data string. This is the length of the Data String. The data string must be at least twice the length of the selected portion of the presentation space if the SET SESSION PARAMETERS (9) function sets EAB. Otherwise, the length must be the length of the selected portion of the presentation space. This is the position in the host presentation space where the copy begins. It must be between 1 and the maximum presentation space position. This function returns the following parameters to your application program. Contents of the host presentation space. The following codes are valid:

Presentation Space Position

Returned Parameters Data String Return Code

42

Chapter 3 WebConnect Ehllapi Function Calls

Re t urn Co d e

0 1 2 4 5 7 9

D ef in i ti on

S uc c es s f u l. T he c on t en ts of t h e h os t p re se ntat i on s pa c e w er e co pie d to the ap pl ica t io n pr og ra m. T h e targ et p re s en tati on space w as a c t i v e , a n d t h e k e y b o a r d w a s u n l o c k e d . T he p r o g r a m w a s n ot c u r r e n t l y c o n ne c t e d t o t h e h o s t s e s s i o n . A s t ri ng l en gt h of 0 w as s pe c if i ed . S uc c e s s f u l. T he h o s t p r e s e n ta t i o n s pa c e w a s w ai t i n g f o r a h os t response. S uc c e s s f u l. T he k e y b o a r d w a s l oc k e d . T he ho st pr esen ta tio n space po si ti on w a s in va li d. A s ys t e m err or oc c ur re d.

Discussion

The XLATE/NOXLATE, ATTRB/NOATTRB, and EAB/NOEAB session options under the SET SESSION PARAMETERS (9) function affect the COPY PRESENTATION SPACE TO STRING (8) function. If the provided target data string is not large enough to hold the requested number of bytes, the copy ends successfully (RC=0) when the end of the target data string is reached. The involved SET SESSION PARAMETERS (9) function options have the following effect:

S et Se ss io n P ara m et er

NOEAB E A B an d NO XL AT E E A B an d X LAT E

E f f ec t on th e CO P Y F u nc t io n s

E x t e n d e d a t t r i b u t e s a re n ot r et u r n e d . O n l y t e x t i s c o p ie d f r o m t h e p r e s e n ta t i o n s pa c e t o t h e u s e r b uff e r. E x t e n d e d a t t r i b u t e s a re r et u r n e d a s d e f i n ed i n t h e f i r s t ta b l e pr esen ted be lo w. E x t e n d e d a t t r i bu t e s a re t ra n s l a t e d t o t h e p er s o na l c o m p u t e r c o l or gr ap hi cs a da pt e r ( CG A ) f o rm at as de f in ed in t he s ec on d tab le pr esen ted be lo w.

The returned 3270 character attributes are defined in the following table. The attribute bit positions are in IBM format with bit 0 as the leftmost bit in the byte.

Bi t

0- 1 C ha ra c ter hi ghl ig hti ng 0 0 = N orm a l 0 1 = B l in k (al w ay s 0) 1 0 = R ev e r s e v i d e o 1 11 = U nd er li ne .

De fi n it io n

WebConnect Ehllapi Programmer's Reference Guide

43

B it

De f in it io n

C h ara c t er C olo r ( C o l o r r em a p m ay o v e rr id e t h i s c o l or d e f i n it i o n . ) 0 00 = D e f au lt 0 01 = B lu e 0 10 = R e d 0 11 = P i n k 1 00 = G re en 1 01 = Tur qu oi s e 11 0 = Ye ll ow 111 = W hi t e. R e se rve d ( not used ).

2 -4

5 -7

The following 5250 Workstation Feature character attributes are returned from the host to the emulator (which only applies when EAB and NOXLATE are set).

B it 0 1

R e v ers e im a ge 0 = No rm al i ma ge 1 = Re v er s e i ma ge . U n de rs c or e 0 = No un de rscor e 1 = Un de rs c or e. B li nk ( 52 50 wo rksta t io n fe atu re is n ot a Pre s en tati on M ana ge r a pp li c at i on an d s up po rts b li nk ) 0 = No bl in k 1 = B l in k. C o lu mn s epar ato rs 0 = No c o l u m n s e para t o r s 1 = Co lu m n s epa rat ors . R e s erv e d ( no t us ed ).

D ef i n i t i o n

2

3 4-7

The returned PC color attributes are defined in the following table (which only applies when EAB and XLATE are set). The attribute bit positions are in IBM format with bit 0 as the leftmost bit in the byte.

B it 0000 = Black 0001 = Blue 0010 = Green 0011 = Cyan 0100 = Red 0101 = Magenta 0110 = Brown 0111 = White. D ef i n i t i on

Ba ckgr oun d C h ara c ter Co lo rs

0-3

44

Chapter 3 WebConnect Ehllapi Function Calls

B it

D ef i n i t i o n

F or egr ou nd Ch ar acte r C ol or s

4 -7

0000 = Black 0001 = Blue 0010 = Green 0011 = Cyan 0100 = Red 0101 = Magenta 0110 = Brown 0111 = White 1000 = Gray 1001 = Light Blue 1010 = Light Green 1011 = Light Cyan 1100 = Light Red 1101 = Light Magenta 1110 = Yellow 1111 = White (high intensity).

WebConnect Ehllapi Programmer's Reference Guide

45

Copy Selected Text to Clipboard (208)

Description Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Return Parameter Data String Length Return Code

C o de

0 1 9 S uc c e ss Not Connected S y s t em E r ro r

This function instructs the WebConnect applet to copy selected emulation text to the clipboard. Use the CONNECT PRESENTATION SPACE (1) function. Ehllapi application. The value must be 208. Not Applicable. Not Applicable. Not Applicable. Ehllapi function returns. Not Applicable.

D ef in i ti on

Discussion This function supports We b C o n n e c t C O M O b j e c t interface. Same as Menu item Edit> Copy in WebConnect Applets.

46

Chapter 3 WebConnect Ehllapi Function Calls

COPY STRING TO FIELD (33)

This function: · · · · Transfers a string of characters from your application program into a specified field in the host-connected presentation space. Can be used only in a field-formatted host presentation space. The calling data string parameter specifies the string to be transferred. The string ends when one of the following conditions occurs: An end of transmission (EOT) is encountered in the string (if the STREOT mode in the SET SESSION PARAMETERS (9) function has been selected). The number specified in the length is reached (if the EOT mode in the SET SESSION PARAMETERS (9) function has not been selected). An end of field (EOF) is encountered. N o t e : This function continues at the start of the presentation space if the field at the end of the host presentation space wraps. Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This must be 33. The data string contains the data to be transferred to a target field in the host presentation space. This is the length (in number of bytes) of the source data string. Not applicable when STREOT is set. This identifies the target field, which can be the presentation space position of any byte within the target field. The copy always starts at the beginning of the field. This function returns the following parameters to your application program. The following return codes are valid:

R et u rn Co d e

0 1

· ·

Returned Parameters Return Code

D ef i n i t i o n

T h e C O P Y S T R I N G TO F I E L D ( 33 ) f u n c t i o n w a s s u c c e s s f u l. T he p r o g r a m w as n ot c u r r e n t l y c o n ne c t e d t o t h e h o s t s e s s i o n.

WebConnect Ehllapi Programmer's Reference Guide

47

Re tu rn C od e

2 5 6 7 9 24

D ef in i ti on

T h er e i s a par am ete r e rr or; a stri ng le ng th o f 0 w as sp ecif ied . T h e targ et fi el d w a s pro t ecte d o r i nhi bi ted , or il le ga l d ata w as se nt to the tar ge t fie ld (e .g., a fie ld attr ib ute) . T h e c o p y w a s c o m p l e t e d ; h ow e v e r, d a ta w a s t r u nc a t e d . T h e h os t pr es e nta t io n s pa ce po s it i on wa s in v al id . A system error occurred. T h e h os t pr es e nta t io n s pa ce w as un f or m at t ed .

Discussion

The COPY STRING TO FIELD (33) function is affected by the following: · The STRLEN/STREOT, EAB/NOEAB, and EOT session options of the SET SESSION PARAMETERS (9) function (see this function for additional information). The keyboard mnemonics of the SEND KEY (3) function cannot be sent with the COPY STRING TO FIELD (33) function. The first byte of the data to be transferred is always placed at the beginning of the field that contains the specified presentation space position.

· ·

48

Chapter 3 WebConnect Ehllapi Function Calls

COPY STRING TO PRESENTATION SPACE (15)

Description This function copies an ASCII data string from your application program directly into the host presentation space at the location specified by the Presentation Space Position parameter. Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This must be 15. The data string is the string of ASCII data to be copied into the host presentation space. This is the length (in number of bytes) of the source data string. This parameter is overridden in the EOT mode. This is the position in the host presentation space where the copy starts. This function returns the following parameters to your application program.

R et u rn C o de

0 1 2 5 6 7 9

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code

D ef i n i t i on

Th e C O P Y S TR I N G TO P RE S E NTAT I O N S PA CE (1 5) f un c t io n w as s u c c e s s f u l. Th e p ro gr am w as no t c ur re nt l y c o nn ec t ed t o t he h os t s e s si on . Th er e i s a par am ete r e rr or ; a str in g l eng th o f 0 w a s sp eci f ie d. Th e tar ge t p r e se n ta ti o n spa ce wa s p r o te cte d o r i nh ib ite d , o r i ll ega l data w a s se nt to the ta rg et fi el d ( e.g. , a fi el d a ttri but e byte ). T h e c o p y w as c o m p l e t e d ; h o w e v e r, d ata w as t r u n c a t e d ( b e c a u s e o f e n d o f f ie l d o r e nd o f p re s e n ta t i on s pa c e ) . Th e h os t p re se ntat i on s pa c e p os it i on w as i nv al id . A s y s t em er ro r o c cu rr ed .

Discussion

The COPY STRING TO PRESENTATION SPACE (15) function is affected by the STRLEN/STREOT, EOT=c, and NOEAB/EAB session options of the SET SESSION PARAMETERS (9) function (see page 92 for details). · · If you selected the EOT mode in the SET SESSION PARAMETERS (9) function, the string being copied ends when an EOT is encountered. The COPY STRING TO PRESENTATION SPACE (15) function is much faster in answering prompts and in entering commands than the SEND KEY (3) function, which serves the same purpose. The SEND KEY (3) function emulates a terminal operator typing data from the keyboard. It is

49

WebConnect Ehllapi Programmer's Reference Guide

too slow for applications that require large amounts of data for each operation. The COPY STRING TO PRESENTATION SPACE (15) function provides a much faster input path to the host. · · The keyboard mnemonics of the SEND KEY (3) function cannot be sent with the COPY STRING TO PRESENTATION SPACE (15) function. The source data (i.e., the string being copied) cannot be larger than the maximum presentation space size.

50

Chapter 3 WebConnect Ehllapi Function Calls

DISCONNECT PRESENTATION SPACE (2)

Description This function disconnects Ehllapi from the current presentation space. This function does not end your session with the host, but it keeps you from using functions that have CONNECT PRESENTATION SPACE (1) as a prerequisite. Execute the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This must be 2. Not applicable. Not applicable. Not applicable. This function returns the following parameters to your application program.

Re tu rn C o de

0 1 9

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Codes

De fi ni ti o n

T h e D I S C O N N E C T P R E S E N TAT I O N S PA C E ( 2) f u n c t i o n w a s successful. T he ap pl ica t io n pr og ra m w a s not cu rr en tly con ne c ted to th e ho st p rese ntati on spa c e. A sy s t e m e rr or oc c ur re d.

Discussion

Other functions that interact with the host presentation space (e.g., SEND KEY (3), WAIT (4), and RESERVE (11) functions) are not valid once the DISCONNECT PRESENTATION SPACE (2) function has been called. Prior to exiting Ehllapi you should disconnect from all connected host presentation spaces. Ehllapi must call the RESET SYSTEM (21) function to reset the defaults, as the DISCONNECT PRESENTATION SPACE (2) function does not reset the session parameters to the defaults.

WebConnect Ehllapi Programmer's Reference Guide

51

FIND FIELD LENGTH (32)

Description This function returns the length of a target field in the connected presentation space. · · Prerequisite Calls Supplied Parameters Function Number Data String

Co d e D ef i ni ti o n

T he p r e se n t fi e ld . T he p r e v i o u s f i e l d , e it h e r p r o t e c t e d o r u n p r o t e c t e d . T he ne xt fie ld, ei ther pr ote c ted or u np ro t ecte d. T he ne xt pro t ecte d fi el d. T he ne xt unp ro tecte d fi el d. T he pr ev io us p ro t ec t ed f ie ld . T he pr evio us u npr ote c ted fie ld .

In a field-formatted host presentation space, this function is used to find either protected or unprotected fields. The requested field includes all characters from the start of the target field up to the character preceding the next attribute byte.

Use this function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This must be 32.

bb

or Tb Pb Nb NP NU PP PU

N o t e : T h e b s y m bo l r ep re s e nts a r e q u i r e d b l a n k .

Data String Length Presentation Space Position

Not applicable (2 is implied). This identifies the field within the host presentation space where the find begins. This parameter can be used in the presentation space position of any byte within the field in which you desire the FIND FIELD LENGTH (32) function to begin. This function returns the following parameters to your application program.

L en g th

= 0 > 0

Returned Parameters Data String Length

De f i n i t i o n

F i e l d l e n gt h co d e o f 0 i f r et u r n c o d e i s 2 8; u nf o r m a t t e d h os t p re s e n tat i o n s pa c e i f r e t u r n c o d e i s 2 4 . L en gt h o f r eq u e s t e d f i e l d i n h os t p re s e ntat i o n s pa c e .

Return Code

R et u r n Co d e

0

De fi ni ti o n

T h e F I N D F I E L D L E N GT H ( 3 2 ) f u n c t i o n w a s s u c c e s s f u l.

52

Chapter 3 WebConnect Ehllapi Function Calls

Re t urn Co d e

1 2 7 9 24 28 A pa ra me ter er ro r oc c u rr ed.

D ef in i ti on

T he p r o g r a m w as n ot c u r r e n t l y c o n ne c t e d t o t h e h o s t s e s s i o n . T he ho st pr esen ta tio n space po si ti on w a s in va li d. A sy s t e m err or oc c ur re d. N o s u c h f i e l d w as f o u n d , o r t h e p r e s e ntat i o n s pa ce i s u nf o r m a t t e d . T he f ie ld le ng t h w as 0 .

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide

53

FIND FIELD POSITION (31)

Description This function returns the beginning position of a target field in the host connected presentation space. · Prerequisite Calls Supplied Parameters Function Number Data String In a field-formatted host presentation space, this function is used to find either protected or unprotected fields.

Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This must be 31. The calling 2-character data string can contain:

C od e D ef i ni ti o n

T h e p r e s e nt f i e l d . T h e p r e vi ou s fi e ld , e i th e r p r o te c te d o r u n p r o te cte d. T h e n e xt fi e ld , e i th e r p ro t e cte d o r u n p r o te ct e d . T h e n e xt p r o te c te d fi e ld . T h e ne xt un pr ote ct ed fi el d. T h e p r e v i ou s p r o t e c t e d f i e l d . T h e p r e v i ou s u n p r o t e c t e d f i e l d .

bb

or T b Pb Nb NP NU PP PU

N ot e : Th e b s y mb ol re pre s en ts a req ui re d b la nk .

Data String Length Presentation Space Position

Not applicable (2 is implied). This identifies the field within the host presentation space where the find begins. This parameter can be the presentation space position of any byte within the field for which you desire to start the FIND FIELD POSITION (31) function. This function returns the following parameters to your application program. The following data length codes are valid:

Le n gt h

= 0 > 0

Returned Parameters Data String Length

De fi ni ti o n

F i e ld l e n g t h c o d e o f 0 i f r e t u r n c o d e i s 2 8 ; u n f o r ma t t e d h o s t p r e s e nta t i o n s pa c e i f r et u r n c o d e i s 2 4. Sta rt i ng p os i t io n o f re qu es t ed f ie ld in ho s t pr es en ta t io n s pac e .

Return Code

The following return codes are valid:

54

Chapter 3 WebConnect Ehllapi Function Calls

R et ur n Co d e 0 1 2 7 9 24 28

D ef in it io n

T he F I ND F I E L D P O S I T I O N (3 1) f u n c t i o n w a s s u c c e ss f u l. T he p r o g r a m w as n ot c u r r e n t l y c o n n e c t e d t o a h os t s e s s i on . A pa ra me ter er ror oc c u rre d. T he h o s t p r e s e n ta t i o n s pa c e p o s i t i o n w as i nv a l i d . A s y s t e m e rr or oc c ur re d. N o s u ch f i e l d w a s f o u n d , o r t h e p r e s e nta t i o n s pa c e i s u nf o r m a t t e d . T he f ie ld le ng t h w as 0 .

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide

55

GET KEY (51)

Description This function allows Ehllapi to intercept, process, accept, and reject keystrokes from other sessions as specified by the START KEYSTROKE INTERCEPT (50) function. As noted above, this function lets your application intercept keystrokes from sessions specified by the START KEYSTROKE INTERCEPT (50) function. Ehllapi must pass the following parameters to this function. The number must be 51. The calling data string can contain:

By te P os it io n

1

Prerequisite Calls

Supplied Parameters Function Number Data String

De fi n it io n

O n e o f th e fo l l o w i n g :

· ·

A 1-character presentation space short name ID. A blank or null indicating a function call against the current connection presentation space.

2- 8

S pa c e f o r t h e s y m b o l r e p r e s e nta t i o n o f t h e r e q u e s t e d d ata .

Data String Length Presentation Space Position Returned Parameters Data String

Not applicable (8 is implied). Not applicable. This function returns the following parameters to your application program. The following are valid:

By te P os it io n 1 · · De fi n it io n

O n e o f th e fo l l o w i n g :

A 1-character presentation space short name ID. A blank or null indicating a function call against the current connection presentation space. ASCII data. Keystroke mnemonic. Special shift (Alt or Ctrl) returned with other data.

A co de c ha rac t e r, on e o f t he f ol lo w ing :

2

A M S

56

Chapter 3 WebConnect Ehllapi Function Calls

B yt e P o s it i o n

De fi ni ti o n

T he s ix b yt e s of a pr ea ll oc at e d b uff e r s pac e t o b e use d i nte rn all y for en qu eui ng an d d eq ueu in g k e y s t r o k e s . P os s ib le c o m bi na t i o n s i nc l u d e t h e follo w in g: · B y t e 3 c o n ta i n s a n A S C I I c h a ra c t e r a nd b y t e 4 c on ta in s X '0 0' . · B y tes 3 and 4 co ntai n a ke ystro ke m ne mo ni c (@ or ES C = n c h a r a c t e r p lu s a n A S C I I c h a ra c t e r ). · B y t e s 5 t h r o u g h 8 m ay b e s i m il ar t o b y t e s 3 a n d 4 i f a r et u r n e d A S C I I m ne mo ni c i s l o n ge r t h a n 2 b y t e s ( e . g . , i n t h e A S C I I m ne mo ni c r e p re s e n t i n g A t t n, @ A @ Q , ` @ ' w o u l d b e i n b y t e 5 a nd a ` Q ' i n b y t e 6 ). I f n ot u s e d, p os i t i o ns 3 - 6 a re s e t t o X ' 0 0 ' .

3- 8

Examples

For clarification see the following examples of returned data strings: · · EAt: E is the presentation space. A denotes that the keystrokes returned are ASCII. The key being returned is a lowercase letter t. BM@c: B is the presentation space. M denotes that the keystrokes returned are represented by an ASCII mnemonic. The key being returned is a PF12. ES@Aa: E is the presentation space. The keystrokes returned are in special shift state. The keys being received are Alt+A.

·

If the shift state of a pressed key is not a key or function recognized by the emulation session, the ASCII mnemonics for the shift state are prefixed. Valid shift prefixes are as follows: · · · @A: Alt shift active @S: Up shift active @r: Ctrl shift active

If you press the Alt+A keys, the ASCII mnemonic returned in positions 3 through 5 is @Aa. If you press the Ctrl+Shift+A keys, the ASCII mnemonic returned is @rA. To pass both original keystrokes and any other keystrokes that the Ehllapi application wants to send to the target presentation space, use the SEND KEY (3) function. Ehllapi queues user keystrokes. The GET KEY (51) function dequeues user keystrokes and returns them to the requester one at a time. The GET KEY (51) function acts as a read command. When keystrokes are available, they are read into the data string provided with the GET KEY (51) function. The GET KEY (51) function is affected by the ESC=c and NWAIT/LWAIT/TWAIT session options of the SET SESSION PARAMETERS (9) function. Refer to the Keyboard Mnemonics Section of the SEND KEY (3) function for a listing of supported keystroke values.

57

WebConnect Ehllapi Programmer's Reference Guide

Data String Length Return Code

This is the number of ASCII mnemonic bytes returned. The following return codes are valid:

Re t ur n C o de 0 1 5 De fi n it io n

The GET KEY (51) function was successful. T he pr es e nta t io n s pac e is i nv a li d. W he n A I D k e y s are s pe c if i ed wi t h S TA RT K E Y S TR O K E I N T E R C E PT ( 50 ), n o n - A I D k e y s a re i nh ib ite d w he n Eh ll ap i tr ie s to w r ite in va li d k e y s to th e p rese ntati on spa c e. S TA RT K E Y S T R O K E I N TE R C E PT ( 5 0 ) w a s n o t ca ll ed p ri or to ca ll in g GE T KEY (5 1) . A sy s t e m err or oc c ur re d. T he ope ra tor e nte re d an i nva li d com bi na t io n of ke ys f o r t h i s p re s e ntat i o n spa c e . T he re a r e n o k e y s t r o k e s a v a i l a b l e o n t h e q u e u e . T he k ey s t r ok e q ue ue ov er f lo w ed a nd k ey s t ro k es w er e l os t .

8 9 20 25 31

Discussion

None.

58

Chapter 3 WebConnect Ehllapi Function Calls

PAUSE (18)

Description This function allows your application to wait for a specified amount of time for an event to occur. This function is used in place of timing loops to wait for an event to occur. If a prior START HOST NOTIFICATION (23) function has been called, a host event can end a PAUSE (18) function. Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. The value must be 18. Not applicable. The data string length contains the pause duration in half-second increments. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

Re tu rn C od e

0 9

De fi ni ti o n

T he wa it dur ati on expi re d. A n i n te r na l syste m e r r o r o c cu r r e d ; ti m e r e su l ts a r e un pr ed icta bl e. T he ho st se ssio n p rese ntati on spa c e or Op er ator I n f o r m a t i o n A r e a ( O I A ) w a s u pd at e d . U s e t h e Q U E RY H O S T U P D AT E ( 2 4 ) f u n c t i o n f o r a d d i t io n a l in for m ation.

26

Discussion

A practical maximum value for the PAUSE (18) function is 2400 half seconds. You should not use the PAUSE (18) function for the following tasks: · · · Delay for several hours Delay for more than 20 minutes before checking the system time-of-day clock and proceeding with the Ehllapi program execution Applications that require a high-resolution timer. The time interval created by the PAUSE (18) function is approximate.

The FPAUSE or IPAUSE options in the SET SESSION PARAMETERS (9) function affect the length of the pause set by the PAUSE (18) function.

WebConnect Ehllapi Programmer's Reference Guide

59

When a pause has been satisfied by a host event, call the QUERY HOST UPDATE (24) function prior to the next PAUSE (18) function to determine which host session had a presentation space update, an Operator Information Area update, or both. If the IPAUSE option is used, the PAUSE (18) function is satisfied with the pending event until the QUERY HOST UPDATE (24) function is completed.

60

Chapter 3 WebConnect Ehllapi Function Calls

Paste Text From Clipboard to Presentation Space (210)

Description Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Return Parameter Data String Length Return Code

C od e

0 1 9 S u c ce s s N ot C on ne c t ed S y s t e m E rr or

This function instructs the WebConnect applet to paste text from system clipboard into emulation presentation space. Use the CONNECT PRESENTATION SPACE (1) function. Your Ehllapi application. The value must be 208. Not Applicable. Not Applicable. Not Applicable. Not Applicable. Not Applicable.

De fi n it io n

Discussion

This function supports WebConnect COM Object interface. Same as Menu item Edit> Paste in WebConnect Applets.

WebConnect Ehllapi Programmer's Reference Guide

61

POST INTERCEPT STATUS (52)

Description This function informs Ehllapi that a keystroke obtained through the GET KEY (51) function was accepted or rejected by the application. If the keystroke is rejected, the function returns an audible beep. The START KEYSTROKE INTERCEPT (50) function is the prerequisite call for this function. Ehllapi must pass the following parameters to this function. The value must be 52. The calling 2-character data string can contain:

By te P os it io n De fi n it io n

T hi s p o s i t i o n c o n ta i n s o n e o f t h e f o l l ow in g: · Th e 1 -l et t e r s h ort nam e I D o f t he pr es e nta t io n s pa c e . · A b la nk or nu ll in di ca tin g a fun c tio n cal l ag ai nst the c u r r e n t c o n n e c t e d p r e s e n ta t i o n s pa c e . T hi s p o s i t i o n c o n ta i n s o n e o f t h e f o l l ow in g: A Fo r a n a c ce pt e d k e y st r ok e . R F or a r ej ec t ed k ey s t r ok e.

Prerequisite Calls Supplied Parameters Function Number Data String

1

2

Data String Length Presentation Space Position Returned Parameters Return Code

Not applicable (2 is implied). Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

R et u rn Co d e

0 1 2 8 9

De fi n it io n

T h e P O S T I N T E R C E PT S TAT U S ( 52 ) f u n c t i o n w a s successful. T h e p re se ntati o n spa c e w as i nva l i d. A n i nva li d op tio n w a s sp eci f ie d. N o pr ior S TA RT K E Y S T R O K E I NT E RC E PT (50 ) f u n c t i o n w as c a l le d f o r t h e p r e s e ntat i o n s pa c e s h o rt n am e I D . A system error occurred.

Discussion

None.

62

Chapter 3 WebConnect Ehllapi Function Calls

QUERY CLOSE INTERCEPT (42)

Description This function allows Ehllapi to determine if the user attempted to close the presentation space while the START CLOSE INTERCEPT (41) function was set. The START CLOSE INTERCEPT (41) function is the prerequisite call for this function. Ehllapi must pass the following parameters to this function. The value must be 42. One-character short name ID of the host presentation space. Not applicable (implied length of 1 byte). Not applicable. This function returns the following parameters to your application program.

Co d e

0 1 8 9 26

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code

D ef in it io n

T h e Q U E RY C L O S E I N T E R C E PT ( 42 ) f u n c t i o n w a s s u c c e s s f u l; a c l o se i n t e r c e p t e v e n t d i d n ot o c c u r. T h e p re s e n tat i o n s pa c e I D w as i nv a l i d . N o p r i o r S TA RT C L O S E I N T E R C E PT ( 4 1 ) f u n c t i o n w as c al le d f o r t h is h os t pr es e nta t io n s pa ce . A s y s t em e rro r o c c urr ed . A c l o s e i n t e r c e pt o cc u r r e d s i n c e t h e l a s t Q U E RY C L O S E I N T E R C E PT ( 4 2 ) f u n c t i o n c a l l .

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide

63

QUERY CURSOR LOCATION (7)

Description The QUERY CURSOR LOCATION (7) function indicates the current position of the cursor in the host-connected presentation space by returning the cursor position. Use this function to ensure that the cursor is at the correct location in the presentation space prior to sending data using the SEND KEY (3) function. Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. The value must be 7. Not applicable. Not applicable. Not applicable. This function returns the following parameters to your application program. This is the presentation space position of the cursor.

C o de

0 1 9

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Data String Length Return Code

De f in it io n

T h e Q U E RY C U R S O R L O C AT I O N ( 7) f u n c t i o n w a s s u c c e ss f u l. T he p r o g r a m w as n ot c u r r e n t l y c o n n e c t e d t o t h e host session. A s y s t e m e rr or oc c ur re d.

Discussion

Use the CONVERT POSITION (99) function to find the actual row and column position. The returned position is relative to the starting position (1,1). For additional information, refer to the CONVERT POSITION (99) function on page 26.

64

Chapter 3 WebConnect Ehllapi Function Calls

QUERY FIELD ATTRIBUTE (14)

Description The QUERY FIELD ATTRIBUTE (14) function returns the attribute byte of the field containing the input presentation space position. The information is returned in the Data String Length parameter. Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. The value must be 14. Not applicable. Not applicable. The position within the presentation space. This function returns the following parameters to your application program. The length is as follows: · · Return Code If the screen is formatted, the length is the attribute value. If the screen is unformatted, the length is 0.

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Data String Length

The following return codes are valid:

C o de

0 1 7 9 24

De fi ni ti o n

T h e Q U E RY F I E L D AT T R I B U T E ( 14 ) f u n c t i o n w a s s u c c e ss f u l. T he p r o gr am w a s n o t c u r r e n t l y c o n n e c t e d t o t h e h os t session. T he h o s t p r e s e n tat io n s pa c e p os i t i o n w as i nv a l i d . A s y s t e m e rr or oc c ur re d. T he a ttr i b u te b yte w a s n o t fo u n d ( un f o r ma tte d p r e s e nta t i o n s pa c e ).

Discussion

The following table defines the returned 3270 field attributes. Attribute bytes are equal to, or greater than, X'C0'.

Bi t P o s it i o n

0- 1 2

De fi ni ti o n

B o t h = 1 , f i e ld a t t r i b u t e b y t e . U np ro t e c t e d o r p r o t e ct e d :

0 = Unprotected data field 1 = Protected data field.

WebConnect Ehllapi Programmer's Reference Guide

65

Bi t P os it io n

3

De fi n it io n

A lp h a n u m e r i c o r n um er ic:

0 = Alphanumeric data 1 = Numeric data only. 00 01 10 11 = = = = Normal intensity, pen not detectable Normal intensity, pen detectable High intensity, pen detectable Non-display, pen not detectable.

I n t e n si t y / S e l e c t o r - P e n- De t e c t i o n ( I / S P D ) : 4- 5

6 7

R es e rv ed M od if y D a ta Ta g ( MD T ) :

0 = The field has not been modified 1 = The field has been modified.

The following table defines the returned 5250 field attributes.

Bi t P os it io n

F i eld at t r ib ut e f la g 0

De fi n it io n 0 = Not a field attribute byte 1 = Field attribute byte. 0 = Non-display 1 = Display.

Vi s ib il it y 1

2

Unprotected/protected 0 = Unprotected data field 1 = Protected data field.

I n t e n si t y

3

0 = Normal 1 = High. 000 = Alphanumeric: all characters allowed 001 = Alphabetic only: uppercase and lowercase letters, comma, period, hyphen, blank, and Dup key allowed 010 = Numeric shift: automatic shift for numerics 011 = Numeric only: numbers 0-9, comma, period, plus, minus, blank, and Dup key allowed 100 = Reserved 101 = Digits only: numbers 0-9 and Dup key allowed 110 = Magnetic stripe reader data only 111 = Signed numeric: numbers 0-9, plus, minus, and Dup key allowed. 0 = Field has not been modified 1 = Field has been modified.

F i eld type

4- 6

M od ifi ed /Un m odi fi ed 7

66

Chapter 3 WebConnect Ehllapi Function Calls

QUERY HOST UPDATE (24)

Description The QUERY HOST UPDATE (24) function allows Ehllapi to determine if the host has updated the host presentation space, Operator Information Area (OIA), or both since: · · the START HOST NOTIFICATION (23) function was called, or, the previous call to the QUERY HOST UPDATE (24) function was called.

The data string must specify the target presentation space. To check for updates, you do not need to be connected to the host presentation space. Prerequisite Calls Supplied Parameters Function Number Data String The START HOST NOTIFICATION (23) function is a prerequisite call for this function. Ehllapi must pass the following parameters to this function. The value must be 24. This may be one of the following: · · Data String Length Presentation Space Position Returned Parameters Return Code One-character short name ID of the host presentation space. A blank or a null indicating the currently connected presentation space.

Not applicable (1 is implied). Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

C o de

0 1 8 9 21 22 23

De fi ni ti o n

T h e Q U E RY H O S T U P D AT E ( 24 ) f u n c t i o n w a s s u c c e s s f u l a n d n o u p d a t e s w er e m ad e s i n c e t h e l as t c a l l . A n i n v a l id h o s t p re s e n tat i o n s pa c e w a s s p e c i f i e d . N o pr io r S TA RT HO S T N O T I F I C AT I O N ( 23 ) f un ct i on w a s c al le d f o r t h e h o s t p r e s e n ta t i o n s pa c e . A s y s t e m e rr or oc c ur re d. T he O pe ra t or I nf o rm at i on A r ea ( O I A ) w as u pd at ed . T he p r e s e n ta t i o n s pa c e w a s u p d a t e d . T he O pe ra t or I nf o rm at i on A r ea a nd t he ho s t pre s en ta t io n s pa c e w e r e u p d a t e d.

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide

67

QUERY SESSIONS (10)

Description The QUERY SESSIONS (10) function: · · Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Data String Returns the valid number of started host sessions Returns a 12-byte description of each presentation space session controlled by the Ehllapi application.

No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. This value must be 10. This is a preallocated string of 12 times the number of active host sessions. This is the number of active host sessions times 12. Not applicable. This function returns the following parameters to your application program. The returned data string contains the short name ID, long name, host session type, and presentation space size of the host sessions. The format is as follows:

By te Position

1 2- 9 10 11- 12 S ho rt n am e I D . L on g n am e o f s es s io n. S es s io n t y p e, w he re H = h os t a nd P = pe rs on al c o mp u t e r. T h e p r e s e n tat io n s pa ce s i z e . T h i s i s a b i n a r y n um be r a nd i s n ot i n d is p l a y f o r m a t . I f t h e s e s s i o n t y p e i s H a nd is a pr int se s s io n, t h e v al ue is 0 .

D ef in it io n

Data String Length Return Code

This is the number of started host sessions. The following return codes are valid:

R et ur n Code

0 2 9

De f in it io n

T h e Q U E RY S E S S I O N S ( 1 0 ) f u n c t i o n w a s s u c ce s s f u l . T h e str i n g l e n g th w as i nva l i d . A syst em er ror occu rr ed.

68

Chapter 3 WebConnect Ehllapi Function Calls

Discussion

The number of active sessions is returned in the length field if the application receives an RC=2 or RC=0. If RC=2, the value in the returned Data String Length parameter can be used in issuing another QUERY SESSIONS (10) call with the correct parameters. The host returns one of the following presentation space sizes: · · The configured PS size if the SET SESSION PARAMETERS (9) function call was issued with the CFGSIZE option specified. The current PS size if no SET SESSION PARAMETERS call was issued, or if a SET SESSION PARAMETERS (9) function call was issued with the NOCFGSIZE option specified.

WebConnect Ehllapi Programmer's Reference Guide

69

QUERY SESSION STATUS (22)

Description Prerequisite Calls Supplied Parameters Function Number Data String The QUERY SESSION STATUS (22) function allows you to obtain specific information about your session. No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. This must be 22. This is one of two values: · · Data String Length Presentation Space Position Returned Parameters Data String The short name ID of the target presentation space plus 17 bytes for returned data. A blank or a null indicating the currently connected presentation space plus 17 bytes for returned data.

A minimum of 18 bytes. Not applicable. This function returns the following parameters to your application program. A data string of 18 bytes is returned. The bytes are defined as follows:

B yt e

1 2 -9 10 Short name ID. Long name of session. S essio n type , w h er e D = 327 0 ho st, E = 32 70 p ri nte r, F = 52 50 , an d G = 5 250 pr in ter. S es s io n c ha ra c t er is t i cs ( ex pr es s e d as a b in ar y n um be r c on ta in in g t h e s es s i on c har ac t e ri s t ic s by t e ) a s f ol lo ws : 0 EAB 1 PSS 2 -7 R es e rv ed . 11 I f b it 0 ( E A B ) = 0 , t h e s e s s i o n h a s b as e a t t r i b u t e s. I f b i t 0 ( E A B ) = 1 , t h e s e s s i o n h as e x t e n de d a t t r i b u t e s . I f b it 1 ( P S S ) = 0 , t h e s e s s i on d o e s n o t s u p p o r t p ro g r a mm e d sym b o l s. I f b it 1 ( P S S ) = 1 , t h e s e s s i on s u p p o r ts p ro g r a m m e d s y m b o ls . T he n u m b e r o f r ow s i n t h e h o s t p r e s e n ta t i o n s pa c e ( i. e . , t h e n u m b e r o f h os t r o w s c u r r e n t l y b ei n g u s e d b y th e h ost pr og ra m) . T hi s is a bin ar y nu mb er an d i s n ot i n d is pl ay f o rm at . Fo r t y p es E o r G, t he v al ue is 0 . T he n um be r of co lu m ns i n t he h os t p re s en tat i on s pac e ( i. e . , t h e n u m b e r o f h os t c o l u m n s c u r re n t l y b e i n g u s e d b y t h e h o s t p ro gr am ). T hi s i s a b i n a r y n um be r a n d i s n ot i n d is p l a y f o r m a t . Fo r t y p es E o r G, t h e v a l u e i s 0 . T he h o s t c o d e pag e n um be r, e x p r e s s e d a s a b i n a r y n um be r.

D ef i n i t i on

12 -1 3

14 -1 5

16 -1 7

70

Chapter 3 WebConnect Ehllapi Function Calls

By t e

18 R es er v ed .

D ef in it io n

Return Code

The following return codes are valid:

C o de

0 1 2 9

D ef i ni ti o n

T h e Q U E RY S E S S I O N S TAT U S ( 2 2 ) f u n c t i o n w a s s u c c e ss f u l. T he s e s s i o n r eq u e s t e d w as i nv a l i d . A n in v al id st ri ng l en gt h w as m ade . A s y s t e m e rr or oc c ur re d.

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide

71

QUERY SYSTEM (20)

Description Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Data String The QUERY SYSTEM (20) function is used by Ehllapi to determine information about the system running the Ehllapi application. No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. This value must be 20. This is a preallocated string of 35 bytes. Not applicable (implied length is 35). Not applicable. This function returns the following parameters to your application program. A string of 35 bytes may be returned The bytes are defined as follows:

Bi t P os it io n

1 2- 3 4- 32 33- 35

De fi n it io n

E hll ap i ve rsi on num b er. E hll ap i l ev e l n um be r. E hll ap i d ate . R es e rv ed .

Return Code

The following return codes are valid:

Re t ur n C o de

0 9

De fi n it io n

T h e Q U E RY S Y S T E M ( 20 ) f u n c t i o n w a s s u c c e s s f u l. A sy s t e m err or oc c ur re d.

Discussion

None.

72

Chapter 3 WebConnect Ehllapi Function Calls

RECEIVE FILE (91)

Description The RECEIVE FILE (91) function is used to transfer a file from the host session to your personal computer session. This function lets you include the appropriate file transfer receive command within your WebConnect Ehllapi application. No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. The value must be 91. The data string must consist of between 1 and 128 bytes, and is formatted as follows: localfilename shortname:hostfilename [filetransferoptions] The localfilename may give the local drive or path specification. Refer to the We b Co n n e c t U s e r a n d R e f e r e n c e G u i d e for additional information on the format of the host file name and file transfer options. For file transfer options, also refer to Chapter 2 of this manual under the Ehllapi.ini Summary Section. Example If Ehllapi were to receive the personal computer file TEST NOTE A from CMS presentation space B, the data string would be as follows: TEST.DOC B:TEST NOTE A (ASCII CRLF The length of the data string is 34. Data String Length This is the length of the data string in number of bytes. This parameter is overridden if in EOT mode. Valid values are between 1 and 128. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

C o de De fi ni ti o n

A p ro bl e m o c c u r re d i n t h e s y s t e m o r i n t h e w a y t h a t the da ta stri ng w a s speci f ie d. A para m eter er ro r occu rr ed o r a da ta st ri ng l en gth w as spe c ifi ed that w a s t o o s h o rt o r t o o l o n g ( 0 b y t e s o r m o r e t h a n 1 2 8 b y t e s ) f o r t h e E h l l a p i b uff e r. T h e f i l e t r a n s f e r w a s u n s u c c e s s f u l. T h e f i l e t r a n s f e r w a s c o m pl e t e . T he f i l e t r a n s f e r w a s c o m pl et e , b u t h a s s e g m e n t e d re c o r d s . A s y s t e m e rr or oc c ur re d.

Prerequisite Calls Supplied Parameters Function Number Data String

Presentation Space Position Returned Parameters Return Code

2

3 4 9

WebConnect Ehllapi Programmer's Reference Guide

73

Co d e

27 34 11 0

De fi n it io n

T h e f i l e t ra n s f e r e n d e d b y a n AT T N , o r, i f t i m eo ut w as s p e c i f i e d b y S E T S E S S I O N PA R A M E T E R S ( 9) , th e ti me o u t e xp ir e d . H o s t f i l e n o t f o u nd . S peci f ie d p re s entati on spa c e i s al re ady i n u s e. T he er ro r c od es re po rt e d by E h ll ap i a re g re at e r t ha n 3 0 0 . To d e t e r mi ne t h e e r r o r c o d e, s u b t r ac t 3 0 0 a nd r ef e r t o t h e TR A N S xx x F i le Tr an sf er M e ssa ge s in A ppe nd ix C .

30 0+ x

N o t e : The RECEIVE FILE (91) function is not supported for the 5250 emulation session or the 3270 or 5250 printer session. Discussion When calling the RECEIVE FILE (91) function, you must not currently: · · · Be connected to the same session Have another file transfer application active on the same session Have another Ehllapi application active on the same session.

If already linked to the host session, a TRANSxxx (i.e., 300+x return code) error message (see Appendix C) is received. If connected with the CONNECT PRESENTATION SPACE (1) function to the host session, disconnect using the DISCONNECT PRESENTATION SPACE (2) function. Four options under the SET SESSION PARAMETERS (9) function affect the RECEIVE FILE (91) function. The session options are: · · · · QUIET/NOQUIET STRLEN/STREOT TIMEOUT=c/TIMEOUT=0 EOT=c

For additional information on these options, refer to the listing for the SET SESSION PARAMETERS (9) function.

74

Chapter 3 WebConnect Ehllapi Function Calls

RELEASE (12)

Description The RELEASE (12) function unlocks or releases the currently connected host presentation space that was locked with the RESERVE (11) function. Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This value must be 12. Not applicable. Not applicable. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

Code

0 1 9

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code

De fi ni t io n

T he R E LE A S E (1 2) f un c t io n w as s uc c e s s f ul . T he p r o g r a m w as n ot c u r r e n t l y c o n ne ct e d t o t h e h os t s e s s i o n . A sy s t e m e rr or oc c ur re d.

Discussion

If a host presentation space that is reserved by the RESERVE (11) function is not released, the keyboard is locked out of that session until one of the following events occurs: · · · The DISCONNECT (2) function is called. The RESET SYSTEM (21) function is called. Your Ehllapi application ends.

WebConnect Ehllapi Programmer's Reference Guide

75

RESERVE (11)

Description The RESERVE (11) function locks or reserves the currently connected host presentation space to block input from the user. Therefore, it prevents a terminal operator from entering data. The reserved host presentation space remains locked until one of the following occurs: · · · · Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code The DISCONNECT PRESENTATION SPACE (2) function is executed. The RELEASE (12) function is executed. The RESET SYSTEM (21) function is executed. Your Ehllapi application ends.

Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to calling this function. Ehllapi must pass the following parameters to this function. The value must be 11. Not applicable. Not applicable. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

Code

0 1 5 9

De f in it io n

T h e R E S E RV E ( 11 ) f u n c t i o n w as s u c c e ss f u l. T h e p rog ra m w a s not cu rr en tly co nne cted to the host session. T h e p re s e ntat i o n s pa c e w as i nh ib i t e d . A syst em er ror occu rr ed.

Discussion

Use the RESERVE (11) function: · To prevent a user from gaining access to a host session (to which your Ehllapi program has sent a series of transactions) until your program finishes. To lock out keyboard input. The application must release the presentation space before keyboard input can be accepted.

·

76

Chapter 3 WebConnect Ehllapi Function Calls

RESET SYSTEM (21)

Description The RESET SYSTEM (21) function reinitializes Ehllapi to its starting state, at which time the following events occur: · · · · · · · Session parameter options are reset to their defaults. Event notification is stopped. Reserved host sessions are released. Connected host presentation spaces are disconnected. Current status of the keystroke intercept is stopped. Current status of the host sessions is updated. Current status of the close intercept is stopped.

Use the RESET SYSTEM (21) function during initialization or at the end of a program to reset the system to the initial condition. Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. The value must be 21. Not applicable. Not applicable. Not applicable. This function returns the following parameters to your application program. The following return codes are valid

C od e 0 9 De fi ni ti o n

T h e R E S E T S Y S T E M ( 21 ) f u n c t i o n w a s s u c c e s s f u l. A s y s t e m e rr or oc c ur re d.

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide

77

SEARCH FIELD (30)

Description The SEARCH FIELD (30) function examines a field within the connected host presentation space for the occurrence of a specified string. If the target string is found, the SEARCH FIELD (30) function returns the position of the string numbered from the beginning of the host presentation space. The upper left corner (i.e., row 1, column 1) is position 1. N o t e : The SEARCH FIELD (30) function can be used to search protected or unprotected fields. However, this search can only be accomplished in a field-formatted host presentation space. Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. The value must be 30. The target data string for search. This is the length of the target data string. This parameter is not applicable when in the EOT mode. The position identifies the target field. For SRCHALL, this parameter may be the presentation space position of any byte within the target field. For SRCHFROM, this parameter is the beginning point of the search for SRCHFRWD or the ending point of the search for SRCHBKWD. This function returns the following parameters to your application program. The following codes are valid:

Le ng t h

= 0 > 0

Returned Parameters Data String Length

De fi n it io n

T he s t ri ng w as no t f ou nd . T he s t ri ng w as f ou nd at t h e i nd ic at e d h os t p res e ntat i on spa c e p os it i on .

Return Code

The following return codes are valid:

Re t ur n C o de

0

De fi n it io n

T he S E A R C H F I E LD (3 0) f u n ct i o n w a s s u c c e s sf u l.

78

Chapter 3 WebConnect Ehllapi Function Calls

Re tu rn C od e

1 2 7 9 24

De fi ni ti o n

T he p r o gr am w a s n o t c u r r e n t l y c o n n e c t e d t o t h e h os t session. T he Da ta St ri ng L en gt h wa s t oo s ma ll or t oo la rg e ( i .e ., 0 o r g r e a te r th a n th e p r e se ntati o n spa c e si ze ) . T he h o s t p r e s e n tat io n s pa c e p os i t i o n w as i nv a l i d . A s y s t e m e rr or oc c ur re d. T h e s e a r c h s t r in g w a s n ot f o u n d , o r t h e h o s t pr es e nta t io n s pac e w as un f or ma t t ed .

Discussion

Four session options under the SET SESSION PARAMETERS (9) function affect the SEARCH FIELD (3) function: · · · · SRCHALL/SRCHFROM STRLEN/STREOT SRCHFRWD/SRCHBKWD EOT=c

Use the SET SESSION PARAMETERS (9) function to specify whether searches go forward (i.e., when SRCHFRWD is used) or go backward (i.e., when SRCHBKWD is used). The SEARCH FIELD/SEARCH PRESENTATION SPACE function normally checks the entire field/PS, as SRCHALL is the default mode. However, you can use the SET SESSION PARAMETERS function to specify SCHFROM. In this mode, the PS position parameter does more than identify the target field. It also provides a beginning and ending point for the search: · If the SRCHFRWD option is in effect, the search for the designated string begins at the specified PS position and proceeds toward the end of the field/PS. If the target string is not found, the search stops at the end of the field/PS. If the SRCHBKWD option is in effect, the search for the designated string begins at the end of the field/PS and proceeds backward toward the specified PS position. If the target string is not found, the search stops at the PS position specified in the PS position parameter.

·

The SRCHFROM option is useful when searching for a keyword that may occur more than once in the host presentation space. The SEARCH PRESENTATION SPACE function is useful in determining when the host presentation space is available. If your Ehllapi application is expecting a specific prompt or message before sending data, the SEARCH PRESENTATION SPACE function allows you to check for a prompt message before continuing.

WebConnect Ehllapi Programmer's Reference Guide

79

SEARCH PRESENTATION SPACE (6)

Description The SEARCH PRESENTATION SPACE (6) function allows Ehllapi to examine the host presentation space for the occurrence of a specified string. Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. The value must be 6. This is the target data string of the search. This is the length of the target data string. When in EOT mode, this parameter is not applicable. This is the position within the host presentation space where the search is to begin (i.e., when the SRCHFRWD option is used) or to end (i.e., when the SRCHBKWD option is used). This parameter is overridden when the SRCHALL (i.e., default) option is used. This function returns the following parameters to your application program. The following codes are valid:

L en g t h

= 0 > 0

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position

Returned Parameters Data String Length

De fi n it io n

T h e s t r in g w a s n ot f o u n d . T h e s t r in g w as f o u n d a t t h e i nd ic a t e d h o s t p re s e n tat i o n s pa c e p os i t i o n.

Return Code

The following return codes are valid:

C od e 0 1 2 7 9 24 De fi n it io n

T h e S E A R C H P R E S E N TATI O N S PA C E ( 6) f unc t i on was successful. T h e h os t p res e ntat i on s pa c e w as n ot c on ne c t ed . A n e rr or w a s m a d e i n s p e ci f y i n g pa r a m e t e r s. T h e h os t p re s e ntat i o n s pa c e p o s i t i o n w as i n v a l id . A s y s t em er ro r o cc u rr ed . T h e s e a r c h s t r i n g w a s n o t f o u nd .

80

Chapter 3 WebConnect Ehllapi Function Calls

Discussion

You might use the SEARCH PRESENTATION SPACE (6) function to determine when the host presentation space is available. If the Ehllapi application is expecting a specific prompt or message prior to sending data, you might use the SEARCH PRESENTATION SPACE (6) function to check for a prompt before continuing. The SEARCH PRESENTATION SPACE (6) function normally scans the host presentation space for the first occurrence of the specified string: · · The returning length is set to 0 if the string is not located. The returning length is set to the string's beginning location in the host presentation space if the string is found. This location denotes a position in the host presentation space based on the layout where the upper left corner (i.e., row 1, column 1) is position 1.

Four sets of parameters under the SET SESSION PARAMETERS (9) function affect the SEARCH PRESENTATION SPACE (6) function: · · · · SRCHALL/SRCHFROM STRLEN/STREOT SRCHFRWD/SRCHBKWD EOT=c

Use the SET SESSION PARAMETERS (9) function to specify SRCHBKWD. When this option is selected, the search operation locates the last occurrence of the string. The SEARCH PRESENTATION SPACE (6) function normally checks the entire presentation space, as SRCHALL is the default mode. To provide a beginning or ending point for the search, use the SRCHFROM option in the SET SESSION PARAMETERS (9) function in conjunction with the following two options: · SRCHFRWD option: The search for the designated string begins at the specified presentation space position and moves toward the end of the host presentation space. If the target string is not found, the search stops at the end of the host presentation space. The SRCHFROM option is useful when searching for a keyword that may occur more than once in the host presentation space. SRCHBKWD option: The search for the designated string begins at the end of the presentation space and moves backward toward the specified presentation space position. If the target string is not found, the search stops at the presentation space position specified in the Presentation Space Position parameter.

·

WebConnect Ehllapi Programmer's Reference Guide

81

Select all Text Within Current Presentation Space (211)

Description The Select All Text within current Presentation Space (211) function instructs the WebConnect applet to select all emulation text within current presentation space. Use the CONNECT PRESENTATION SPACE(1) function. Your Ehllapi application. The value must be 208. Not Applicable. Not Applicable. Not Applicable. Not Applicable. Not Applicable.

C o de

0 1 9 S u c ce s s N ot C on ne c t ed S y s t e m E rr or

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Return Parameter Data String Length Return Code

De f i n i t i o n

Discussion

This function is added to support WebConnect COM Object interface. Same as Menu item Edit> Select All in WebConnect Applets.

82

Chapter 3 WebConnect Ehllapi Function Calls

SEND FILE (90)

Description This function is used to transfer a file from the personal computer session to the host session. This function allows you to include the appropriate file transfer send command within your WebConnect Ehllapi application. No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. The value must be 90. The data string must consist of between 1 and 128 bytes, and is formatted as follows: localfilename shortname:hostfilename [filetransferoptions] The localfilename may give the local drive or path specification. Refer to the WebConnect Ehllapi User Guide for additional information on the format of the host file name and file transfer options. For file transfer options, also refer to E h l la p i3 2 . i n i S u m m a r y, pa g e 1 8 . Example If the Ehllapi program were to send the personal computer file TEST.DOC to CMS presentation space B, the data string length would be 34 and the data string would be: TEST.DOC B:TEST NOTE A (ASCII CRLF This is the length of the data string in number of bytes. This parameter is overridden if in EOT mode. Valid values are between 1 and 128. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

C od e

1

Prerequisite Calls Supplied Parameters Function Number Data String

Data String Length

Presentation Space Position Returned Parameters Return Code

De fi ni ti o n

I nv a li d h os t p res e ntat i on spa c e s ho rt n am e I D . A p ro bl e m o c c u r re d i n t h e s y s t e m o r i n t h e w a y t h a t the da ta stri ng w a s speci f ie d. A para m eter er ro r occu rr ed o r a da ta st ri ng l en gth w as spe c ifi ed that w a s t o o s h o rt o r t o o l o n g ( 0 b y t e s o r m o r e t h a n 1 2 8 b y t e s ) f o r t h e E h l l a p i b uff e r. T h e f i l e t r a n s f e r w a s u n s u c c e s s f u l. T h e f i l e t r a n s f e r w a s c o m pl e t e . T he f i l e t r a n s f e r w a s c o m pl et e , b u t h a s s e g m e n t e d re c o r d s .

2

3 4

WebConnect Ehllapi Programmer's Reference Guide

83

C o de

5 9 27 11 0 L oca l fi l e n o t f o u n d .

De fi n it io n

A sy s t e m err or oc c ur re d. T he f i l e t r a ns f e r e n d e d b y a n ATT N o r, i f t i m e o u t w a s sp ecifi ed by S E T SE SSIO N PA RA ME T E R S (9 ), t he ti me o u t e xp ir e d . S peci f ie d p re s entati on spa c e i s al re ady i n u s e. T he er ro r c od es re po rt e d by E h ll ap i a re g re at e r t ha n 3 0 0 . To d e t e r mi ne t h e e r r o r c o d e, s u b t r ac t 3 0 0 a nd r ef e r t o t h e TR A N S xx x F i le Tr an sf er M e ssa ge s in A ppe nd ix C .

30 0+ x

N o t e : The RECEIVE FILE (91) function is not supported for the 5250 emulation session or the 3270 or 5250 printer session. Discussion When calling the SEND FILE (90) function, you must not currently: · · · Be connected to the same session Have another file transfer application active on the same session Have another Ehllapi application active on the same session.

If already linked to the host session, a TRANSxxx (i.e., 300+x return code) error message (see Appendix C) is received. If connected with the CONNECT PRESENTATION SPACE (1) function to the host session, disconnect using the DISCONNECT PRESENTATION SPACE (2) function. Four options under the SET SESSION PARAMETERS (9) function affect the SEND FILE (90) function. The session options are: · · · · QUIET/NOQUIET STRLEN/STREOT TIMEOUT=c/TIMEOUT=0 EOT=c

For additional information on these options, refer to the listing for the SET SESSION PARAMETERS (9) function.

84

Chapter 3 WebConnect Ehllapi Function Calls

SEND KEY (3)

Description This function allows you to send a string of one or more keystrokes to the currently connected host presentation space. Define all attention identifier (AID) keys (e.g., the Enter and PA1 keys) and the strings of keystrokes to be sent with the data string parameter. Keystrokes appear to the target session as though you entered them. Host fields that are numeric-only or input-protected must be treated accordingly. Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code

Co d e

0 1 2 4 5 9

Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This value must be 3. This is a string of keystrokes, with a maximum of 255 bytes. This is the length of the source data string. If in the EOT mode, this parameter is overridden. Not applicable. This function returns the following parameters to your application program.

D ef in it io n

T h e k e y s t r o k e s w e r e s e n t ; t h e s ta t u s w a s n or ma l. T he p r o g r a m w as n ot c u r re nt l y c o n n e c t e d t o t h e h o s t session. A n i n c o r r e c t pa r a m e t e r w a s pas s e d t o E hl l a p i . T he h o s t s e s s i o n w as b us y. T h e r e f o r e , a ll o f t h e keystrokes could not be sent. Tar ge t s es s io n i np ut w as i nh ib it e d. K e y s t ro k es w er e re je c t e d o r i n v a li d k e y s t r o k e m n e m o n ic s w e r e s e n t . A l l keystrokes could not be sent. A s y s t e m e rr o r o c c u r re d .

N o t e : To increase the performance of the SEND KEY (3) function, refer to the NORESET option of the SET SESSION PARAMETERS (9) function. If the NORESET option is not requested, a reset mnemonic is always prefixed to the keystroke string. This action resets all states that can be reset except for input-inhibited states.

WebConnect Ehllapi Programmer's Reference Guide

85

Discussion

Four sets of parameters under the SET SESSION PARAMETERS (9) function are related to this function: · · · · AUTORESET/NORESET STRLEN/STREOT EOT=c ESC=c

See the discussion about session options under the SET SESSION PARAMETERS (9) function call on page 92 for more information. When the keyboard is locked or busy, keystrokes cannot be sent to the host session. Check the keyboard status with the WAIT (4) function. By default, the length of the data string must be explicitly defined by using the data string length parameter. The length of the data string can be implicitly defined by using the EOT delimiter specified by the SET SESSION PARAMETERS (9) function. A compound character coding scheme is used to send special control keys. This compound coding scheme: · Example Uses ASCII characters to indicate one keystroke and is comprised of the @ sign (default escape character) followed by the key code.

To type in the sequence LOGON ABCDE followed by the Enter key, code the string: · · LOGON ABCDE@E: Refer to Keyboard Mnemonics beginning on page 87 for a complete list of these mnemonics. Allows an ASCII string representation of all necessary keystroke codes without requiring the use of complex hexadecimal key codes.

When explicitly defining length (see above discussion), the value for the data string length parameter passed by the application must be calculated. Allow 2 bytes for compound keystrokes such as @E and allow 4 bytes for the compound keystrokes such as @A@C. To specify an escape character other than @, use the ESC=c parameter in the SET SESSION PARAMETERS (9) function. For a higher level of performance, use the COPY STRING TO FIELD (33) function or the COPY STRING TO PRESENTATION SPACE (15) function rather than sending keystrokes with the SEND KEY (3) function. Special control keys (see Tables 3 through 5) can only be sent by SEND KEY (3). Keystroke strings with embedded AID keys are sent to the host in multiple passes. Each pass sends a string up to, and including, the first AID key. Ehllapi internally adjusts the length of the string and the

86

Chapter 3 WebConnect Ehllapi Function Calls

starting position for each pass. Some keystrokes may be lost because of AID key processing, depending on the host application. Sending a list of keystrokes with more than one embedded AID key is not recommended. Any request that updates the presentation space is rejected while @P (i.e., Print) is being processed. The mnemonic @A@R (i.e., Device Cancel) cancels the request and resets the state if a Busy State or Intervention Required occurs during such a print request. Keyboard Mnemonics ASCII characters that represent the special function keys of the personal computer keyboard are provided by keyboard mnemonics. A mnemonic abbreviation code allows you to easily remember these special keys. For the most common keys, an alphabetic key code is used. For example, the Left Tab key is represented by B and the Clear key is represented by C. Uppercase and lowercase alphabetic characters are mnemonic abbreviations for different keys. N o t e : Uppercase and lowercase alphabetic characters are mnemonic abbreviations for different keys. The following tables list the supported ASCII mnemonic keys for 3270 and 5250 terminal emulation.

ASC II M n em o n ic @B @C @D @E @F @H @I @J @L @N @O @P @R @T @U @V @X @Y @Z

C l ear D el et e E nt e r E ra se E O F H el p Insert J u mp

1

De fi n it io n

L ef t Ta b Y Y Y Y Y N Y Y Y Y N Y Y Y Y Y Y Y Y

327 0

Y Y Y Y Y Y Y Y Y Y N Y Y Y Y Y Y N Y

525 0

C ur s o r L e f t N ew L in e S pa c e P ri nt R es e t R i ght Ta b C ur s or U p C ur s or D ow n D B C S (R es e rv ed ) 1 C aps L oc k ( N o a c t i o n ) 1 C ur s or R igh t

WebConnect Ehllapi Programmer's Reference Guide

87

AS CI I M n e mo n ic

1.

D ef in it io n

32 70

52 50

Th is m n em on ic i s n ot i m pl em en ted wi thi n th e Web Co nn ect em ul ati on .

M n em o n ic @0 @1 @2 @3 @4 @5 @6 @7 @8 @9 @a @b @c @d @e @f @g @h @i @j @k @l @m @n @o @q @s @t @u @v @x @y @z

1.

De f i n i t i o n

H om e PF1/f1 PF2/f2 PF3/f3 PF4/f4 PF5/f5 PF6/f6 PF7/f7 PF8/f8 PF9/f9 P F 1 0/ f 1 0 P F 11/ f 11 P F 1 2/ f 1 2 PF13 PF14 PF15 PF16 PF17 PF18 PF19 PF20 PF21 PF22 PF23 PF24 En d 1 S c r lk ( No ac t i on ) 1 N um Lo ck (N o a c tio n) Pa ge Up Pa ge Do w n PA 1 PA 2 PA 3

1

32 70

Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N N N Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y N N Y Y N N N

52 50

T hi s mn em on ic i s no t im pl em en ted by th e Web Co nn ect em u la t io n.

88

Chapter 3 WebConnect Ehllapi Function Calls

A S C II M n em o n ic @A@C @A@D @A@E @A@F @A@H @A@I @A@J @A@L @A@N @A@O @A@Q @A@R @A@T @A@U @A@V @A@X @A@Y @A@Z

Tes t

De fi ni t io n

N N N Y Y N Y Y N N Y N Y N N N N Y

327 0

Y N Y Y Y Y N Y N N Y N N N N N N Y

525 0

Word D el et e F ie ld E x i t E r as e I np ut System Request In se r t To g g l e C ur s or S el ec t C u r s o r L ef t F a s t Get Cursor 1 L o ca te Cu r so r 1 Attention D ev i c e C an c el 1 Pr in t Pr esen ta tio n S pa c e C ur s or U p F as t C ur s or D o wn F as t H ex a d e c i m a l C md (F u nc t i on) K e y C ur s or R i gh t F as t (s e e N ot e)

1T hi s mn em on ic i s no t im pl em en ted by th e Web Co nn ect em u la t io n.

N o t e : The Cursor Fast functions perform the same as normal cursor functions. That is, the Cursor Fast functions move one single character per request rather than two characters per request.

ASC II M n em o n ic @A@9 @A@a @A@b @A@c @A@d @A@e @A@f @A@g @A@h @A@i @A@j

De f i n i t i o n

R e ve rse Vi de o (5 25 0= De stru ctive B ac k s pa c e ) D e st r u cti v e B ackspa ce ( f o r 5 2 5 0 m o d e su p p o r t e d @ A @ 9 a s d e s t r u c t i ve b a c k s pa c e ) Underscore R e se t R ev e rs e Vid eo Red P in k G re en Yel lo w B lu e Tur qu oi s e W hi t e

327 0

N N N N N N N N N N N

525 0

N N N N N N N N N N N

WebConnect Ehllapi Programmer's Reference Guide

89

AS CI I M n e mo n ic @A@l @A@y @A@z

D ef i n i t i o n

Re s et H os t C o lo rs Fo rw a rd Wor d Ta b B ac k w ar d Wor d Ta b

32 70

N N N

52 50

N N N

ASC II M n e mo n ic a-z A-Z 0-9 ~ @@ # ! $ % & ` ( ) * + . : ; < > = ? { } [ ]

De fi ni t io n a-z A-Z 0-9 ~ @ # ! $ % & ` ( ) * + . : ; < > = ? { } [ ]

Mnemonic @@ @/ @$ @<

@

De f in it io n

Ove rru n o f qu eu e ( onl y in the G E T K E Y f u n ct i o n ) A l t er na t e c ur s or B a c k spa c e

90

Chapter 3 WebConnect Ehllapi Function Calls

SET CURSOR (40)

Description Prerequisite Calls Supplied Parameter Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code

Co d e

0 1 4 7 9

This function sets the position of the cursor within the currently connected host presentation space. Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This value must be 40. Not applicable. Not applicable. This is the desired cursor position in the connected host presentation space. This function returns the following parameters to your application program.

D ef in it io n

T h e c u rs o r w a s s u c ce s s f u l l y l o c a t e d a t t h e s pe ci f i ed p os i t io n. T h e p ro gr am w as n o t c u r re nt l y c o n n e c t e d t o t h e h o s t s e s s io n . T h e s e s s i o n w as b us y. A cu r s o r l o ca ti o n wa s sp e ci f i e d th a t w a s l e ss th a n (< ) 1 or gr ea ter th an (> ) th e m a xi m um p re se ntati on s pa c e p os i t io n. A s y s t em e rro r o c c urr ed .

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide

91

SET SESSION PARAMETERS (9)

Description This function allows you to make changes to certain default session options in Ehllapi. The default values for session options are in effect when Ehllapi is loaded. These values can be changed by including the desired value in the data string parameter. Specified values remain in effect until one of the following occurs: · · · A new value is specified by a subsequent SET SESSION PARAMETERS (9) function execution. The RESET SYSTEM (21) function is executed. The application ends.

#

1

F un c ti on Na me

CONNECT P RE S E NTAT I O N S PA C E SEND KEY WA I T COPY P RE S E NTAT I O N S PA C E SEARCH P RE S E NTAT I O N S PA C E COPY P RE S E NTAT I O N S PA C E TO S T R I N G C O P Y S T R I N G TO P RE S E NTAT I O N S PA C E PA U S E S E A R C H F I E LD

S es si on O pt io n

C O N L O G / C O N P H Y S ( pag e 9 8 ) S T R LE N/ S T RE O T (pa ge 93) EO T= c ( pa ge 93 ) ES C= c ( pa ge 96 ) A U TO R E S E T / N O R E S E T (pag e 9 6 ) T WA I T / LWA I T / N WA I T ( pa ge 96 ) N O AT TR B / AT T R B ( pa ge 94 ) N O E A B / E A B ( pa ge 97 ) XL AT E / NO XL AT E (pag e 9 7 ) S T R LE N/ S T RE O T (pa ge 93) EO T= c ( pa ge 93 ) S R C H A LL / S R C H FR O M ( pa ge 94 ) S R C H FRW D/ S R CH B K W D ( page 94 ) N O AT TR B / AT T R B ( pa ge 94 ) N O E A B / E A B ( pa ge 97 ) XL AT E / NO XL AT E (pag e 9 7 ) S T R LE N/ S T RE O T (pa ge 93) EO T= c ( pa ge 93 ) N O E A B / E A B ( pa ge 97 ) F PA U S E / I PA US E ( pa ge 95 ) S T R LE N/ S T RE O T (pa ge 93) EO T= c ( pa ge 93 ) S R C H A LL / S R C H FR O M ( pa ge 94 ) S R C H FRW D/ S R CH B K W D ( page 94 ) S T R LE N/ S T RE O T (pa ge 93) EO T= c ( pa ge 93 ) N O E A B / E A B ( pa ge 97 ) N O AT TR B / AT T R B ( pa ge 94 ) N O E A B / E A B ( pa ge 97 ) XL AT E / NO XL AT E (pag e 9 7 ) ES C= c ( pa ge 96 ) T WA I T / LWA I T / N WA I T ( pa ge 96 ) S T R LE N/ S T RE O T (pa ge 93) EO T= c ( pa ge 93 ) N O Q U I E T / Q UI E T (pag e 9 5 ) T I M E O U T =0 / T I M E O U T =c ( pag e 95 ) S T R LE N/ S T RE O T (pa ge 93) EO T= c ( pa ge 93 ) N O Q U I E T / Q UI E T (pag e 9 5 ) T I M E O U T =0 / T I M E O U T =c ( pag e 95 )

3 4 5

6

8

15 18 30

33

C O P Y S T R I N G TO F I E LD C O P Y F I E L D TO S T RI N G GET KEY

34 51

90

S E N D FI L E

91

RECEIVE FILE

92

Chapter 3 WebConnect Ehllapi Function Calls

Prerequisite Calls Supplied Parameters Function Number Data String

No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. This value must be 9. This is the string containing the desired values of those session options that are to be changed, as follows: · · The values are separated by commas or blanks. The data string can contain any of the values listed below in the Session Options Section.

Data String Length Presentation Space Position Session Options Length of Data String

This is the explicit length of the source data string. The STREOT option is not allowed. Not applicable. Session options are presented in the following tables. The first value in each table is the default session parameter. The following session values determine how the data string length is defined for the Ehllapi functions: · · · · · · · SEND KEY (3) SEARCH PRESENTATION SPACE (6) COPY STRING TO PRESENTATION SPACE (15) SEARCH FIELD (30) COPY STRING TO FIELD (33) SEND FILE (90) RECEIVE FILE (91).

Va lu e

STRLEN STREOT

De f in it io n

T hi s o pti on is u s ed wh en an expl ici t le ng th i s pa ssed for al l s t ri n g s. T hi s o pti on i s u s ed w he n the str in g l eng ths ar e no t expl ici t ly c o d e d . S ou rc e d ata s t r in gs e n d i n a n E O T c h a ra c t e r.

EOT Character Used as Delimiter

The value in the following table specifies the character to be used as the end of transmission (EOT) delimiter in source data strings for Ehllapi functions: · · SEND KEY (3) SEARCH PRESENTATION SPACE (6)

WebConnect Ehllapi Programmer's Reference Guide

93

· · · · ·

COPY STRING TO PRESENTATION SPACE (15) SEARCH FIELD (30) COPY STRING TO FIELD (33) SEND FILE (90) RECEIVE FILE (91)

Val u e D ef in it io n

Use this value to specify the EOT character for string t e r m i n a t o rs w h e n i n t h e S TR E O T m o d e . D o n o t l e a v e a b la nk b e t w e e n t h e e q u a l s i g n a n d t h e v a l ue f o r t h e c . Th e v a lu e f o r c m us t b e a 1 -b yt e l it e ra l ch ar ac t e r s t r in g. B in ar y 0 i s t h e d efa u l t. E O T =c N ot e : T he E O T c h ara c t er s pe ci f i ed b y t hi s v al ue is us e d t o d ete rm in e th e en d o f a da ta stri ng pa ra me ter onl y w he n the S TR E O T o p t i o n i s i n e ff e c t . I f y o u c h o o s e t h e S T R E O T a nd E O T o p t i o ns a n d d o n ot e n d d a ta s t r in gs w it h t h e E O T ch ara c ter, th e r esu lts a re un pr edi cta bl e.

Search

The values in the following table affect the Ehllapi functions: · · SEARCH PRESENTATION SPACE (6) SEARCH FIELD (30)

Va lu e

S R C H AL L

D ef in i ti on

U s e t h i s v a l u e t o s c a n t h e e n t i r e h os t pr es e nta t io n s pac e or f ie ld . U s e t h i s v a l u e t o s ta r t f r o m a s p e ci f i e d pr ese nta tio n space po si ti on ( f or SR C HF RW D) or t o e n d a t a s p e c i f i e d p r e s e n ta t i o n s pa c e p os i t i o n (f o r S RC H B K WD ) . U s e t h i s v a l u e t o s e a r ch i n a n a s c e n di n g ( f r om po siti on 0 to 19 20) di re ctio n. U s e th is val ue to se ar ch in a d escen di ng (fr om po siti on 19 20 to 0) di re ctio n. A se ar ch i s s a t i s f i e d i f t h e f i r s t ch a r a c t e r o f t h e tar g e t st r i n g i s l o c a t e d w i t h i n t h e b ou n d s s p e c i f i e d f o r t h e s e a rc h .

S R C HF R O M

S R C HF RWD

S RC H B KW D

No te: S R CH F RWD an d S RC H B K WD a re ign or ed un less th e S R C HF R O M s e s s i o n o p t i on i s s e t .

Attribute Byte Treatment

The values in the following table affect the Ehllapi functions: · · · COPY PRESENTATION SPACE (5) COPY PRESENTATION SPACE TO STRING (8) COPY FIELD TO STRING (34)

94

Chapter 3 WebConnect Ehllapi Function Calls

Val u e

N O ATT R B ATT R B

D ef in it io n

Th is v al ue c onv e rts a ll un kn ow n v a lu es t o b la nk s . T h i s v a l u e pa s s e s b ac k a ll c o d es t h a t d o n o t h a v e an A S C II eq ui val en t as th eir or ig in al val ue s.

Pause

The values in the following table affect the Ehllapi PAUSE (18) function.

Val ue

F PA US E

De fi ni t io n

T hi s va lu e ca uses a ful l- du ra t io n pau s e. A pa use i s s a t i s f i e d f o r t h e l e n gt h o f t i m e s p e c i f i e d i n t h e PA U S E ( 18 ) f u n c t i o n . T hi s va lu e a ll ow s for an in ter ru pti bl e pau s e. An AID key or an update from the host satisfies a pause de pe ndi ng on ho w th e S TART H O ST N O T I F I C AT I O N ( 2 3 ) f u n c t i o n i s e x e c u t e d .

I PA U S E

File Transfer

The values in the following tables affect the file transfer Ehllapi functions: · · SEND FILE (90) RECEIVE FILE (91)

These options are not supported for 5250 sessions:

Val ue

NOQUIET QUIET

De fi n it io n

T hi s v al ue di s pl ay s S E N D a nd R E C E I V E m es s a ges . T hi s va lu e d oe s not disp la y SEN D an d R E C E IVE messages.

Val ue

T I M E O UT = 0

De fi n it io n

T hi s va lu e d oe s not auto m ati ca ll y issu e a n AT TN during file transfer function execution. This is sta nda rd for op er ator con t ro l o f the SEN D an d R E C E I V E f u n c t i o ns . D o n ot l e a v e a b l a n k b et w e e n the eq ua l si gn a nd the 0.

WebConnect Ehllapi Programmer's Reference Guide

95

Val u e

De f i n i t i o n

T he v al ue f or c s p e c i f i e s t h e d e l a y a f t e r w hi ch a n AT TN i s i s s u e d t e r m i n a t i n g t h e f i l e t r a n s f e r. To b e v a l id , c m us t b e e n t e r ed a s a 1 -b y t e l i t e r a l ch a ra c te r st r i n g w i t h n o p re ce di ng b l a n ks ( i.e ., n o bl an ks be twe en the equ al sig n a nd the va lu e fo r c ) . E a c h v a l u e f o r c fro m the li st bel ow te ll s Ehl l api h o w ma n y 3 0- se c o n d cycl e s i t sh o u l d a cce p t p r i o r t o t e r mi n a t i n g f i l e t r a ns f e r. Ch ar acte r Valu e (i n m in ute s): 1 0. 5 2 1. 0 3 1. 5 4 2. 0 5 2. 5 6 3. 0 7 3. 5 8 4. 0 9 4. 5 J 5.0 K 5. 5 L 6. 0 M 6.5 N 7.0

TI M E O U T= c

Escape Characters

The following values are used to define the escape character for keystroke mnemonics and affect the Ehllapi functions: · · SEND KEY (3) GET KEY (51)

Va lu e De fi n it io n

U se t hi s v al ue t o s pe c if y t h e e s c ape c ha ra ct e r f or k e ys t r ok e m ne mo ni c s . To be v a li d, t he v a lu e f o r c mu st b e e n te r e d a s a 1 -b yt e l ite r a l c h a ra c t e r s t r i n g w it h n o p r e c e d i n g b la nk s ( e . g . , do no t pl ace a bl an k spa c e b etw ee n th e e qua l sig n a nd th e va lu e fo r c ) . A b l a n k i s n ot a v a l id e s c a p e c h a r a c t e r. T h e @ c h a r a c t e r i s t h e d efa u l t.

ESC= c

Reset

The following values determine whether Ehllapi automatically places a reset before a string sent by the SEND KEY (3) function.

Val u e

A U TO R E S E T

Definition

T his v a lu e a ll ow s Eh ll ap i to re se t al l i nh ib ite d c o n d i t i on s b y p re f i x i n g a ll s t r i n g s o f k e y s s e n t usi ng t he S E N D KEY (3 ) fu ncti on wi th a re set. T his v a lu e d oe s n ot A U TO RE SET. T h is o pti on i n cr e a se s th e p e r fo r m an ce o f th e SEN D KE Y (3 ) fun c tio n.

NO RE SET

Wait

The following values affect the Ehllapi functions: · WAIT (4)

96

Chapter 3 WebConnect Ehllapi Function Calls

·

GET KEY (51)

Valu e

T WA I T

D ef in i ti on

T h i s v a l u e a l l o w s t h e WA I T ( 4 ) f u n c t i o n t o w a i t u p t o a m i n u t e p r i o r t o t i m i n g o ut w a i t i n g f o r a h os t r es p o n s e . W h e n t h i s v a l u e i s u s e d, t h e G E T K E Y ( 51 ) fu ncti on w a its up to a m i nut e or un til a k e y s t ro k e i s q ue u e d b e f o r e r et u r ni ng . T h is v al ue al lo ws th e WA IT ( 4 ) f u n c t i o n t o w a i t i n d ef i n i t e l y f o r a h o s t r e s p o ns e . W h e n t h i s v a l u e i s u s e d , t h e G E T K E Y ( 51 ) f u n c t i o n w a i ts u nt i l a k e y st rok e i s q ue ued b ef o re r et u rn ing . Th is v al ue i s n ot r ec o m m e n d e d b ec a u s e c o n t r ol d o e s n o t r e t u r n to the Eh ll api ap pl ica t io n u nti l th e h ost i s a v ai la bl e. T h is v al ue al lo ws th e WAI T ( 4 ) f u n c t i o n a n d t h e G E T K E Y ( 5 1 ) f u n c t i o n t o ch e c k t h e s ta t u s a nd r et u r n i m m e d i a t e ly ( i. e . , t h e re i s n o w a i t ) .

LWAI T

N WA I T

Trace

The following values enable or disable the Ehllapi trace option so as to debug an Ehllapi program. For additional information about the Ehllapi trace option, see Appendix A.

Valu e

T RO F F T RO N

D ef i ni ti o n

U s e t h i s v a l u e t o t u r n t h e t r a c e o ff . Tr a c e a l so i s tu rn ed off w he n th e Eh ll ap i p ro gr am en ds. U s e t h i s v a l u e t o t u r n t h e t r a c e o n. W he n T R O N i s o n, a ll ex e cu t ed E h ll api f u nc t io ns a re t ra ce d.

Extended Attribute Bytes

The following values affect the Ehllapi copy functions: · · · · · COPY PRESENTATION SPACE (5) COPY PRESENTATION SPACE TO STRING (8) COPY STRING TO PRESENTATION SPACE (15) COPY STRING TO FIELD (33) COPY FIELD TO STRING (34)

Val ue

NOEAB

De fi ni t io n

U se t h i s v a l u e t o pas s d ata o n l y ( i. e . , n o E A B s ) . U se t hi s v al ue t o pas s p re se ntat i on s pa c e d ata w i t h e x t e n de d a t t r i b u t e b y t e s ( E A B s ) . Tw o c ha rac t e rs a re rec e iv e d f o r e ve ry o ne t ha t is di s pl ay ed . Th er ef o re , a b uff e r t w ic e t h e s iz e o f t he p r e s e n ta t i o n s pa c e m u s t b e a l l o c a t e d . A s a n e x a mp le , u s e 2 x 1 9 2 0 f o r a M od el 2 s c r e e n .

EAB

The following values affect the Ehllapi copy-from-host functions: · · · COPY PRESENTATION SPACE (5) COPY PRESENTATION SPACE TO STRING (8) COPY FIELD TO STRING (34)

WebConnect Ehllapi Programmer's Reference Guide

97

Valu e NOXLATE XLATE

D ef i ni ti o n

E A B s a re no t t ra ns la t ed . E x t e n d e d a t t r i b u t e b y t e s ( E A B s ) a re t r a ns l a t e d t o th e p er so na l co mp u te r co l o r g r a p h i cs a d a p te r ( C G A ) f o r ma t .

Connect

The values in the following table affect the CONNECT PRESENTATION SPACE (1) function for a connect presentation space process.

Valu e CONLOG CONPHYS D ef i ni ti o n

D ur in g c o n n e c t i o n, d o n ot r ai s e t h e p r e s e ntat i o n s pa c e w i n d o w t o t h e f o r e g r o u n d . C O N L O G i s c o n s i d e r e d a l og ic a l c o n ne c t i o n. D ur in g a s uc c es s f u l C O N N E C T P R E S E N TAT I O N S PA C E ( 1 ) c a l l , t h i s o p t i o n r ai s e s t h e ta r g e t p re s entat i on s pa c e w in do w t o t h e f o reg ro un d.

OIA Format

The values in the following table affect the format of the operator information area (OIA) image returned by the COPY OIA (13) function.

N o t e : The 5250 sessions always return a copy of the OIA in ASCII format. The OLDOIA option is accepted but ignored.

Va lu e

OLDOIA NEWOIA

D ef i n i t i o n

R e t u r ns s e s s i o n 's O I A i n I B M 3 2 7 0 P C f o r ma t . F o r m o r e i n f o r m a t i o n , s e e C O P Y O I A ( 13 ) pag e 3 3 . R e t u r ns a c o p y o f t h e se s s i o n 's O I A i n A S C I I fo rm at.

Presentation Space Size

The values in the following table affect the presentation space size that is returned by the QUERY SESSIONS (10) function.

Va lu e

NOCFGSIZE CFGSIZE

D ef i n i t i o n

R e t u r ns t h e c u r re nt s i z e o f t h e c o n n e c t e d p re s e n ta t i on s pa c e . R e t u r ns t h e c o n f i g u r e d s i z e o f t h e c o n n e c t e d p re s e n ta t i on s pa c e . T h i s o pt i o n i gn or es a ny o v er ri de of th e con f ig ur ed si ze b y the ho st.

Non Display Fields

The values in the following table affect the copy functions COPY PRESENTATION SPACE (5), COPY PRESENTATION SPACE TO STRING (8), and COPY FIELD TO STRING(15).

98

Chapter 3 WebConnect Ehllapi Function Calls

Val ue

DIS P L AY

De f i n i t i o n

C op y n o n d is p l ay f i e l d s i n t h e p re s e ntat i o n s pa c e to the ta rge t bu ff er ar ea i n t he sa me m ann er as d is p l ay f i e l d s . C u r r e n t a pp li c a t i o n s f u n c t i o n n orm a ll y. D o n ot c o py n on d is p la y f ie ld s in t he p re s en tat i on s pac e t o t h e targ et b uff e r a re a. C op y t he non d is pl ay f i el ds t o t h e targ et b uff e r as a st r in g o f nul l c h a r a c t e r s . Th i s a ll o w s a p p l i c a t i o n s t o d i sp l a y t h e c o p i e d b uff e rs i n t h e p r e s e ntat i o n w i nd ow w it h o u t d is p l ay i n g c o n f i d e n t i al i n f o r m at i o n , s u c h a s pas s w o r d s .

NO DIS P L AY

Keystroke Retry

The values in the following table affect the SEND KEY (3) function. Keystrokes are not processed if the keyboard is blocked or in use. The options determine whether the function tries to resend the keystrokes until a 4-minute timeout occurs, or if the function returns immediately after determining the keyboard is blocked or in use.

Val ue

R E T RY N O R E T RY

De f i n i t i o n

C o n t i n u e s t o a t t e m pt t o s e n d k e y s t r o k e s u nt i l t h e y a re se n t , o r u nt i l a 4 - m i n u t e t i m e o u t o c c u r s . R e t u r n s i m m e d i a t e ly a f t e r d e t e r mi n i n g t h e k e yb oa rd is b loc k e d o r i n u se .

Returned Parameters Data String Length

The SET SESSION PARAMETERS (9) function returns the following parameters to your application program. The data string length parameter returns the number of valid session parameters in the data string that were set if invalid session options were found in the input data string. The data string length parameter remains unchanged if no invalid session options were found in the input data string.

Return Code

The following return codes are valid:

C o de

0 2 9

D ef in it io n

Th e s e s si o n par am et e r s w e r e s u c c e s sf u l l y s e t . One or mo re pa ra m eter s w ere in v al id . A s y s t em er ro r o cc u rr ed .

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide

99

START CLOSE INTERCEPT (41)

Description This function: · · Allows the application to intercept close requests generated when the user attempts to close the session. Intercepts the close request and discards it until a STOP CLOSE INTERCEPT (43) function is requested.

After using the START CLOSE INTERCEPT (41) function, the application program can use the QUERY CLOSE INTERCEPT (42) function to determine if a close request has occurred. Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. This value must be 41. This is the one-character short name ID of the host presentation space. The length must be 1. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

C o de

0 1 2 9

De fi n it io n

T he S TA RT C L O S E I NT E RC E PT (4 1) f u n c t i o n w as s u cc e s s f u l . A n i nv a l id h o s t p r e s e n ta t i o n s pa c e w a s s p e ci f i e d . A pa ra me ter er ro r oc c u rr ed. A sy s t e m err or oc c ur re d.

Discussion

None.

10 0

Chapter 3 WebConnect Ehllapi Function Calls

START HOST NOTIFICATION (23)

Description The START HOST NOTIFICATION (23) function: · Begins a process in which Ehllapi determines if the designated host presentation space or Operator Information Area (OIA) has been updated. After the START HOST NOTIFICATION (23) function is used, Ehllapi can use the QUERY HOST UPDATE (24) function to determine the occurrence of a host event. Allows the selected host session to end a pause started by the PAUSE (18) function (if your application is using the IPAUSE option in the SET SESSION PARAMETERS (9) function).

·

Prerequisite Calls Supplied Parameters Function Number Data String

No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. This value must be 23. The data string should contain the following byte positions.

B yt e P o s it i o n

1

De fi ni ti o n

T hi s shou ld con tai n o ne of th e fo ll ow i ng:

· ·

A specific host presentation space short name ID. A blank or null indicating a request against the currently connected host presentation space. This requests notification of presentation space update only. This requests notification of OIA update only. The requests notification of both presentation space and OIA update.

T hi s shou ld con tai n o ne of th e fo ll ow i ng:

P

2

O B

Data String Length Presentation Space Position Returned Parameters Return Code

This is 2. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

C od e 0 1 2 De fi ni ti o n

T h e S TA RT H O S T N O TI F I C AT I O N ( 2 3 ) f u n c t i o n w a s s u c c e ss f u l. An in val id host p re s en tati on space w a s sp eci f ie d. A n e r r o r w a s m ad e i n d es i g n a t i n g pa r a m e t e r s .

WebConnect Ehllapi Programmer's Reference Guide 101

C o de 9

De fi n it io n

A sy s t e m err or oc c ur re d.

Discussion

The START HOST NOTIFICATION (23) function can be issued by an application on several host sessions. The PAUSE (18) function can notify the application when one or more of the host sessions (i.e., PS, OIA, or both) have changed. The QUERY HOST UPDATE (24) function can be used to determine whether PS, OIA, or both have changed. As long as the options remain the same as those issued during the initial START HOST NOTIFICATION (23) functions, subsequent START HOST NOTIFICATION (23) functions have no effect.

10 2

Chapter 3 WebConnect Ehllapi Function Calls

START KEYSTROKE INTERCEPT (50)

Description This function allows Ehllapi to filter any keystroke typed in the presentation space. The filtered keystrokes can be: · · · · Prerequisite Calls Supplied Parameters Function Number Data String Received through the GET KEY (51) function and sent to the same or another session with the SEND KEY (3) function. Accepted and rejected through the POST INTERCEPT STATUS (52) function. Replaced by other keystrokes with the SEND KEY (3) function. Used to trigger some other process.

No prerequisite calls are needed for this function. Ehllapi must pass the following parameters to this function. This value must be 50. The 6-character data string can contain the code positions:

Co d e Positi on · ·

D ef in it io n

One of t he fo ll ow i ng :

1

The 1-character short name ID for the presentation space. A blank or null indicating a request against the currently connected host presentation space. For AID keystrokes only. For all keystrokes.

A code character: 2

D L

3 -6

T he da ta i n the s e po si ti ons is ig no re d by Ehl la pi . If a m i g r a ti n g p r o g r a m h as d ata i n th e se p o si ti o n s, n o e r r o r o c c u r s . T h i s d a ta i s a cc e p t e d b y E h l l a pi t o pr ovid e co mpa t ib il ity w i t h m ig ra t in g ap pl ica t io ns.

Data String Length Presentation Space Position Returned Parameters Return Code

The length is variable. For migrating applications, up to 256 characters. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

C od e

0 1

De fi ni ti o n

T h e S TA RT K E Y S TR O K E I N T E R C E PT ( 50 ) f u n c t i o n w a s s u c c e s sf u l. T he p r e s e n ta t i o n s pa c e w a s i n v a l id .

WebConnect Ehllapi Programmer's Reference Guide 103

C o de

2 4 9

De fi n it io n

A n i nv al id op t io n w as s p ec if ied . R eso ur ce w as u nava il ab le (i .e., a no t her ap pl ica t io n i s c o n n e c t e d o r i n t e r c e p t i n g k e ys t r o k e s ) . A sy s t e m err or oc c ur re d.

Discussion

Ehllapi returns only attention identification (AID) keys to the application program if the data string parameter contains the D option code. Ehllapi sends non-AID keys to their intended presentation space.

10 4

Chapter 3 WebConnect Ehllapi Function Calls

STOP CLOSE INTERCEPT (43)

Description This function allows the application to turn off the START CLOSE INTERCEPT (41) function. When the application issues the STOP CLOSE INTERCEPT (43) function, subsequent close requests result in a normal stop sent to the logical terminal session. The START CLOSE INTERCEPT (41) function is the prerequisite call for this function. Ehllapi must pass the following parameters to this function. This value must be 43. This is the one-character short name ID of the host presentation space. Not applicable. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

Co d e 0 1 8 9 D ef in it io n

T he S TO P C L O S E I N T E R C E PT ( 4 3 ) f u n c t i o n w a s s u c c e s s f u l. A n in va li d h os t p re se ntat i on s pa c e w as s p ec i f ie d. N o p r e v i ou s S TA RT C LO S E I N T E R C E PT ( 41 ) f un c t io n w as u s ed. A s y s t em e rro r o c c urr ed .

Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide 105

STOP HOST NOTIFICATION (25)

Description The STOP HOST NOTIFICATION (25) function stops: · The QUERY HOST UPDATE (24) function from determining if the designated host presentation services or Operator Information Area (OIA) have been updated. The host events for the designated session from affecting the PAUSE (18) function.

· Prerequisite Calls Supplied Parameters Function Number Data String

The START HOST NOTIFICATION (23) function is the prerequisite call for this function. Ehllapi must pass the following parameters to this function. This must be 25. This is one of two strings: · · · The one-character short name ID of the target presentation space. OR A blank or a null indicating the currently connected presentation space.

Data String Length Presentation Space Position Returned Parameter Return Code

Not applicable (implied length of 1 byte). Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

Co d e

0 1 8 9

D ef i n i t i on

T h e S TO P H O S T N O T I F I C AT I O N ( 2 5 ) f u n c t i o n w a s s u c c e ss f u l. An in val id host p re s en tati on space w a s sp eci f ie d. N o p re vi ou s S TA RT H O S T NO TI F I C AT I O N (2 3) f u n c t i o n w a s i s s u e d. A s y s t e m e rr or oc c ur re d.

Discussion

None.

10 6

Chapter 3 WebConnect Ehllapi Function Calls

STOP KEYSTROKE INTERCEPT (53)

Description The STOP KEYSTROKE INTERCEPT (53) function ends your application program's ability to intercept keystrokes. This function should be used in conjunction with the START KEYSTROKE INTERCEPT (50) function. The START KEYSTROKE INTERCEPT (50) function is the prerequisite call for this function. Ehllapi must pass the following parameters to this function. This must be 53. This is one of two strings: · · Data String Length Presentation Space Position Returned Parameters Return Code The one-character short name ID of the target presentation space. A blank or a null indicating the currently connected presentation space.

Prerequisite Calls Supplied Parameters Function Number Data String

Not applicable (implied length of 1 byte). Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

Co d e

0 1 8 9

D ef in it io n

T h e S TO P K E Y S T R O K E I N T E R C E PT ( 53 ) f u n c t i o n w a s s u c c e s s f u l. T h e h os t p re s e n ta t i on s pa c e w as i nv a l i d . N o pr io r S TA RT K E Y S T R O K E I N T E R CE PT (5 0) f u n c t i o n w as c a l l e d f or t hi s p re s e n ta t i on s pa c e . A s y s t em e rro r o c c urr ed .

Discussion

None.

WebConnect Ehllapi Programmer's Reference Guide 107

WAIT (4)

Description This function checks the status of the host presentation space. Use this function to allow time for the host to respond to requests from your application. If the session is waiting for any reason, the WAIT (4) function causes Ehllapi to wait for a specified time to determine if the condition clears. The specified time is determined by options in the SET SESSION PARAMETERS (9) function. Prerequisite Calls Supplied Parameters Function Number Data String Data String Length Presentation Space Position Returned Parameters Return Code Use the CONNECT PRESENTATION SPACE (1) function to connect to a presentation space prior to issuing this function. Ehllapi must pass the following parameters to this function. This value must be 4. Not applicable. Not applicable. Not applicable. This function returns the following parameters to your application program. The following return codes are valid:

Co d e

0 1 4 5 9

D ef in i ti on

T he ke y bo ar d w as u nl oc k ed an d re ad y f or in pu t . T he a p p l i c a t i o n p r o g r a m w as n ot c o n n e c t e d t o a v a l id s e s s io n . A ti m eou t occu rre d w h il e sti ll wa iti ng for a h ost response. I n p ut i s i n h i b i t e d . A s y s t e m e rr o r o c c u r re d .

Discussion

The WAIT (4) function gives other functions such as SEND KEY (3) enough time to complete. Use the SET SESSION PARAMETERS (9) function to request the TWAIT, LWAIT, or NWAIT options. Each option specifies the amount of time that the WAIT (4) function uses. Use the WAIT (4) function to determine if the host Operator Information Area (OIA) is inhibited.

10 8

Chapter 3 WebConnect Ehllapi Function Calls

The WAIT (4) function has been executed when the return code is 0 and the keyboard unlocks. However, the original transaction may not have been completed. To search for expected keyword prompts, use the SEARCH FIELD (30) function or the SEARCH PRESENTATION SPACE (6) function combined with the WAIT (4) function. N o t e : The 3270 terminal emulation sessions wait until a host response occurs. 5250 sessions wait until all input-inhibited conditions clear.

WebConnect Ehllapi Programmer's Reference Guide 109

11 0

Chapter 3 WebConnect Ehllapi Function Calls

Appendix A: Ehllapi Return Codes and Debugging

This appendix describes the standard return codes for WebConnect Ehllapi. It also provides debugging information.

How To Use Return Codes

Return codes are important in running your Ehllapi program. Check for return codes as a prerequisite for continuing your program. Return codes indicate successful completion, error conditions, and, in some instances, status information.

Standard Return Code Descriptions

Standard return codes presented in the following table are used by most of the Ehllapi functions. Standard return codes are explained here so that you can use a common error-handling routine in your Ehllapi program. Please note that these standard return codes can have slightly different interpretations when used with individual functions. Furthermore, some return codes are specific to individual functions and are detailed only in the individual function discussion. Therefore, always refer to each individual function for a complete explanation of its return codes.

Tab le A-1: Re tu rn C od e Desc ription s

R et u rn Co d e

0 1 2 3 4

Ex pl an at i on

F u n c t i o n w a s s u c c e s s f u l o r n o h o s t u p d a t e s h a v e o c c u r r e d s i n c e l as t c a l l is s u e d . T h e p re s e ntat i o n s pa ce s h o rt s e s s i o n I D w as i nv a l i d o r t h e a p p l i c a t i o n w a s n o t co nn ecte d. A par am et e r e rr or o c c ur red . Th e f i l e t r a ns f e r w a s c o m p l e t e . Execu t i o n o f th e fu n cti o n w as i n h i b i te d be c aus e t he ta rge t pr es e nta t io n s pa ce wa s bu sy.

WebConnect Ehallapi Programmer's Reference Guide 111

Table A-1 : R etur n Code Des criptions

Re tu rn C od e

5 6 7 8 9 10 11 12 20 21 22 23 24 25 26 27 28 31 34 110 99 9 999 7 999 8 999 9

E x p l a n a ti on

E x ec u t io n o f t he f un c t io n w as i nh ib it e d be c au s e t he ta rg et p re se ntat i on s pa c e w as lo c k ed . D ata e r r o r o cc u r r e d b e c a us e o f a n i nv a l id par am et e r ( e. g . , l e n g t h e r r o r c a u s e d tru ncat ion ). T h e p r e s e n tat i o n s pa c e p os i t i o n w as i nv a l i d . A p re r e q u i s i t e f u n c t i o n w a s n ot i s su e d . A s y s t em e rro r o c c ur red . T he functi on nu mb er wa s no t sup por ted by th e e mu la t io n p rog ra m. T h e r e s o u r c e t h a t y o u r e q u e s t e d w as n o t a v a il ab le . T he se ssio n w as sto ppe d. I n v a l i d k e y s t r o k e c a u s e d b y t h e E S C = o p t i o n. T he ope ra tor in for ma t io n a rea w as u pda ted . T h e p r e s e n tat i o n s pa c e w a s u p d a t e d. Bo th th e op er ato r i nfo rm ati on ar ea a nd the pr esen ta tio n space we re up da ted. T he str in g w a s not f oun d o r th e p rese ntati on spa c e w as n ot fo rm atte d. N o k e y s t r o k e s w e r e a v a i l a b l e i n t h e i np ut q u e u e . A ho st e ve nt oc c u rr ed. S e e t he Q UE RY H O S T U P D AT E (2 4) f un c t io n f or d etai ls . File transfer was ended by an Attn. T he fie ld l e n gth w as 0. K e y s t r o k e q u e u e o v e rf l o w ( k e y s t r o k e s w e r e l o s t ) . H os t f i l e n o t f o u n d . p r e s e n ta t i o n s pa c e w a s c o n n e c t e d . A n u n k n ow n f u n c t i o n w as s p e c i f i ed . A n em ul at o r a nd E hl la pi re vi s io n e rr or oc c ur re d. An in va li d sh or t na me or syste m er ror occu rre d. C har acte r 2 i n th e d a ta str in g w as n ei t h e r P nor R .

11 2

Ehllapi Return Codes and Debugging

Windows Environment and Multiple Ehllapi Requests

The non-preemptive environment of Windows causes a multitude of different timing and event processing scenarios. Therefore, a discussion of WebConnect Ehllapi's timing issues follows. For each application, WebConnect Ehllapi only processes one Ehllapi request at a time. The WebConnect Ehllapi product uses a PeekMessage loop in its architecture. This means that resources periodically are shared with other Windows applications when the Client portion of Ehllapi is paused waiting for a response from the Server portion. During this PeekMessage loop, other applications can request attention from Windows, including the Ehllapi application itself. Typical examples of these types of events are keyboard events, mouse events, and timer events. these mouse and keyboard events can cause reentry into the user's Ehllapi application which could then reenter the Ehllapi services. Since the Ehllapi services are "blocking" in nature (process only one call at a time) an error code 1001 will be returned. This indicates that the previous Ehllapi call had not completed when the Ehllapi call was executed.

WebConnect Ehallapi Programmer's Reference Guide 11 3

Ehllapi Debugging Controlling Trace

Ehllapi has a built in trace capability that is enabled and disabled by the Session Parameters, TRON and TROFF. Ehllapi has additional control of the trace, determined by settings in the EhllapiiniI file under the [OPTIONS] section. This file should reside in the current directory. To override the TRON/TROFF Session Parameters and enable tracing all the time, the following entry must be set in the [OPTIONS] section of the Ehllapi.ini file.

TraceAlways=Yes

To trace to a disk file, one of the following entries should be set in the [OPTIONS] section of the Ehllapi.ini file.

FileMode=Overwrite

or

FileMode=Append

In Overwrite mode, the trace file is always truncated to zero-length each time it is opened. In Append mode new trace data is appended to the end of the trace file if it already exists. The trace file is specified using two entries in the [OPTIONS] section of the Ehllapi.ini file:

Path=pathname\ File=filename

If no pathname is specified, the trace file is created in the current directory. If no filename is specified, the trace file is assigned the name, Ehllapi.TRC.

Trace Format

All function calls are traced at input and output. Each trace event includes a description field, time stamp, function name, function parameters, application ID of caller, and any input or output data with ASCII translation.

11 4

Ehllapi Return Codes and Debugging

Appendix B: Ehllapi Function Summary

Table B-1: Eh llap i Fu n ctio n Sum mary

# Fu n ct io n N am e

C O N N E C T P R E S E N TAT I O N S PA C E DISCONNECT P R E S E N TAT I O N S PA CE

Da ta Stri n g

I np u t : 1 ch ar acte r sho rt n a m e ID O u tp u t: N one I np u t : N / A O u tp u t: N one I np u t : St ri ng of ke y s t ro k es O u tp u t: N one I np u t : N / A O u tp u t: N one I np u t : D ata s t ri ng to h old PS O u tp u t: C on t ent s o f h os t P S I np u t : Tar ge t d a ta str in g fo r se ar c h O u tp u t: N one I np u t : N / A O u tp u t: N one I np u t : D ata s t ri ng to h old PS Output: Co nt e nts o f ho s t PS I np u t : St ri ng co ntai ni ng se ssio n o pti ons t o b e c ha ng ed (sepa rat ed b y co m ma or bl an k) O u tp u t: N one I np u t : Sh ou ld be st ri ng 1 2 ti m es n u m b er o f a c t i v e host sessions O u tp u t: St ri ng co ntai ni ng host name of system

D ata St r in g L en g th

I n pu t : N / A ( 1 im pl ie d) O u tp u t: N one I n pu t : N / A O u tp u t: N one I n pu t : L e n g t h o f s o u r c e s t r in g ( u p t o 2 5 6 ) o r N / A ( if STREOT) O u tp u t: N one I n pu t : N / A O u tp u t: N one I n pu t : N / A (l eng th i m pl ie d) O u tp u t: N one I n pu t : L e n g t h o f tar ge t da ta stri ng or N/A (if STREOT) O u tp u t: 0 , > 0 I n pu t : N / A O u tp u t: P S posi t io n o f cur s or I n pu t : L e n g t h o f d a ta str in g O u tp u t: N one I n pu t : L e n g t h o f s o u r c e d a ta s t r in g or N/A (if STREOT) O u tp u t: N um be r of v al i d pa ra me ter s in the d a ta str in g I n pu t : 1 2 t i m e s n u m b er o f a c t i v e h o s t s e s s io n s O u tp u t: N one

PS P os it io n

I n p ut : N/A O u tp u t: N on e I n pu t : N / A O u tp u t: N on e

Re t ur n Co d es

O u tp u t: 0 , 1, 4, 5, 9, 11 O u tp u t: 0 , 1, 9

1

2

3

SEND KEY

I n pu t : N / A O u tp u t: N on e I n pu t : N / A O u tp u t: N on e I n pu t : N / A O u tp u t: N on e I n pu t : Position within PS O u tp u t: N on e I n pu t : N / A O u tp u t: N on e I n pu t : Lo ca t io nw he r e cop y be gi ns O u tp u t: N on e

O u tp u t: 0 , 1, 2, 4, 5, 9 O u tp u t: 0 , 1, 4, 5, 9 O u tp u t: 0 , 1, 4, 5, 9

4

WA I T

5

C O P Y P R E S E N TAT I O N S PA C E

6

S E AR C H P R E S E N TAT I O N S PA C E

O u tp u t: 0 , 1, 2, 7, 9, 24 O u tp u t: 0 , 1, 9 O u tp u t: 0 , 1, 2, 4, 5, 7, 9

7

Q U E RY C UR S O R LO CATI O N

8

C O P Y P R E S E N TAT I O N S PA C E TO S T R I N G

9

S E T SE SSIO N PA R AM E TE RS

I n pu t : N / A O u tp u t: N on e

O u tp u t: 0 , 2, 9

10

Q U E RY S E S S I O N S

I n pu t : N / A O u tp u t: N on e

O u tp u t: 0 , 2, 9

WebConnect Ehallapi Programmer's Reference Guide 11 5

Tab le B - 1 : E h ll ap i F un ct i on S u m m ar y

#

11 12

F un ct i on N am e

RE SERVE RELEASE

D ata Str in g

I n p ut : N / A O u tp u t: N on e I n p ut : N / A O u tp u t: N on e I n p ut : Ta rg et da ta str in g O u tp u t: A 1 0 3 - b y t e s t r in g

Da ta St ri ng L en g t h

I n p ut : N / A O u tp u t : N on e I n p ut : N / A O u tp u t : N on e I n p ut : M i ni mu m of 1 03 by t e s O u tp u t : N on e I n p ut : N / A O u tp u t : I f sc r ee n for ma tted , le ng th is attr ib ute val ue ; if s c r ee n u n f o r ma t t e d , length is 0 I n p ut : L en gt h of s o u rc e d a ta s t r in g O u tp u t : N on e I n p ut : P au se du ra tio n i n 0. 5 second in c re me nts O u tp u t : N on e I n p ut : N / A (35 im pl i ed) O u tp u t : N / A I n p ut : N / A O u tp u t : N on e

PS Positi on

I n p ut : N / A O u tp u t : N on e I n p ut : N / A O u tp u t : N on e I n p ut : N / A O u tp u t : N on e

R et u rn Co d es

O u tp u t : 0 , 1, 5, 9 O u tp u t : 0 , 1, 9 O u tp u t : 0 , 1, 2, 4, 5, 9

13

COPY OIA

14

Q U E RY F I E LD AT T R I B UT E

I n p ut : N / A O u tp u t: N on e

I n p ut : Position within PS O u tp u t : N on e I n p ut : Lo cati on in PS wh er e cop y beg in s O u tp u t : N on e I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 1, 7, 9, 24

15

C O P Y S T R I NG TO P R E S E N TAT I O N S PA C E

I n p ut : A S C I I string to copy to PS O u tp u t: N on e

O u tp u t : 0 , 1, 2, 5, 6, 7, 9

18

PA U S E

I n p ut : N / A O u tp u t: N on e I n p ut : 3 5 b y t e s t ri n g O u tp u t: Eh ll ap i ver si on nu mb er, le vel nu mb er, a nd date I n p ut : N / A O u tp u t: N on e I n p ut : 1 c h a ra c t e r, s h o rt name ID or bl an k/nul l for c u r re n t ly connected PS plus 17 bytes for re tur n d ata O u tp u t: 1 8 b y t e da ta str in g I n p ut : 2 c h a ra c t e r s , s h o r t na me ID an d P (P S upd ate o nl y ), O ( O I A u pd at e on ly) or B (P S an d OIA up da te) O u tp u t: N on e I n p ut : 1 c h a ra c t e r, s h o rt name ID or bl an k/nul l for c u r re n t ly connected PS O u tp u t: N on e

O u tp u t : 0 , 9, 26

20

Q U E RY S Y S T E M

I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 9

21

RESET SYSTEM

I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 9

22

Q U E RY S E S S I O N S TAT U S

I n p ut : M i ni mu m of 1 8 b y t es O u tp u t : N on e

I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 1, 2, 9

23

S TA R T H O S T N O T I F I C AT I O N

I n p ut : 2 O u tp u t : N on e

I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 1, 2, 9

24

Q UE RY HO S T U P D AT E

I n p ut : N / A (1 im pl i ed) O u tp u t : N on e

I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 1 , 8 , 9 , 2 1, 22 , 23

11 6

Ehllapi Function Summary

Table B-1: Eh llap i Fu n ctio n Sum mary

# Fu n ct io n N am e Da ta Stri n g

I np u t : 1 ch a r a c t e r, s h o rt nam e I D o r bl ank/n ul l fo r cu rr en t ly co nn ecte d PS O u tp u t: N one I np u t : Tar ge t d a ta str in g fo r se ar c h O u tp u t: N one I np u t : 2 ch ar acte rs 1 b b, Tb , P b , N b, N P, N U , P P, P U O u tp u t: N one I np u t : 2 ch ar acte rs 1 b b, Tb , P b , N b, N P, N U , P P, P U O u tp u t: N one I np u t : Da ta to b e co pi ed to tar get fie ld O u tp u t: N one I np u t : Tar ge t d a ta str in g O u tp u t: St ri ng co ntai ni ng data f r o m i d e nt i f i e d fie ld in host P S I np u t : N / A O u tp u t: N one I np u t : 1 ch ar acte r sho rt n a m e ID O u tp u t: N one I np u t : 1 ch ar acte r sho rt n a m e ID O u tp u t: N one I np u t : 1 ch ar acte r sho rt n a m e ID O u tp u t: N one I np u t : 6 ch a r a c t e r s , s h o rt nam e I D a nd D (AID o nl y ) or L (al l ke y s ) ch ar acte rs i n posi t io ns 3 -6 ig nor ed O u tp u t: N one

D ata St r in g L en g th

PS P os it io n

Re t ur n Co d es

25

S TO P H O S T N O T I F I CAT I O N

I n pu t : N / A ( 1 im pl ie d) O u tp u t: N one

I n pu t : N / A O u tp u t: N on e

O u tp u t: 0 , 1, 8, 9

30

S E A RC H F I E L D

I n pu t : L e n g t h o f tar ge t str i n g o r N/A (i f ST R E O T) O u tp u t: 0 , > 0 I n pu t : N / A ( 2 im pl ie d) O u tp u t: 0 , > 0

I n pu t : Ta rge t fie ld O u tp u t: N on e I n pu t : L o ca t i o n i n f ie ld wh er e fin d b egi ns O u tp u t: N on e I n pu t : L o ca t i o n i n f ie ld wh er e fin d b egi ns O u tp u t: N on e I n pu t : Lo ca t io n o f ta r g e t f i e l d O u tp u t: N on e I n pu t : So ur ce lo c ati on O u tp u t: N on e I n pu t : Cu rs o r po si ti on in P S O u tp u t: N on e I n pu t : N / A O u tp u t: N on e

O u tp u t: 0 , 1, 2, 7, 9, 24

31

F I N D F I E LD P O S I T I O N

O u tp u t: 0 , 1, 2, 7, 9, 24 , 28

32

F I ND F I E L D L E N GT H

I n pu t : N / A (2 im pl ie d) O u tp u t: 0 , > 0 I n pu t : L e n g t h o f s o u r c e s t r in g ( N / A when STREOT) O u tp u t: N one I n pu t : N um be r o f bytes to copy O u tp u t: N one

O u tp u t: 0 , 1, 2, 7, 9, 24 , 28

33

C O P Y S T R I N G TO F I E L D

O u tp u t: 0 , 1, 2, 5, 6, 7, 9, 24

34

C O P Y F I E L D TO S T R I N G

O u tp u t: 0 , 1, 2, 6, 7, 9, 24

40

S E T C U RS O R

I n pu t : N / A O u tp u t: N one I n pu t : 1 O u tp u t: N one

O u tp u t: 0 , 1, 4, 7, 9 O u tp u t: 0 , 1, 2, 9

41

S TA RT C L O S E I N TE R CE P T

42

Q U E RY C L O S E I N T E R C E P T

I n pu t : N / A O u tp u t: N one

I n pu t : N / A O u tp u t: N on e

O u tp u t: 0 , 1, 8, 9, 26

43

S TO P C L O S E I N TE RC E P T

I n pu t : N / A O u tp u t: N one

I n pu t : N / A O u tp u t: N on e

O u tp u t: 0 , 1, 8, 9

50

S TA R T K E Y S T R O K E INTERCEPT

I n pu t : 6 O u tp u t: N one

I n pu t : N / A O u tp u t: N on e

O u tp u t: 0 , 1, 2, 4, 9

WebConnect Ehallapi Programmer's Reference Guide 11 7

Tab le B - 1 : E h ll ap i F un ct i on S u m m ar y

# F un ct i on N am e D ata Str in g

I n p ut : 1 c h a ra c t e r s h o r t na me ID an d s t r i n g t o h ol d k e y s t ro k e d a ta O u tp u t: B y t e position 1, 2, 3-8 I n p ut : 2 c h a ra c t e r s , s h o r t na me ID an d A ( a c ce pt ) o r R (r ej ect) O u tp u t: N on e I n p ut : 1 c h a ra c t e r, s h o rt name ID or bl an k/nul l for c u r re n t ly connected PS O u tp u t: N on e I n p ut : L oc al f i l e n am e, s ho rt na m e: h os t f i l e n am e, f i l e t ra ns f e r op t io ns O u tp u t: N on e I n p ut : L oc al f i l e n am e, s ho rt na m e: h os t f i l e n am e, f i l e t ra ns f e r op t io ns O u tp u t: N on e I n p ut : 1 c h a ra c t e r s h o r t na me ID an d P (p osi t io n) o r R (c o lu mn ) O u tp u t: N on e

Da ta St ri ng L en g t h

I n p ut : N / A (8 im pl i ed) O u tp u t : N um be r of ASCII m nem o nic b y t es re tur ne d

PS Positi on

R et u rn Co d es

51

GET KEY

I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 1, 5, 8, 9, 2 0 , 2 5 , 31

52

P O S T I N T E R CE P T S TATU S

I n p ut : N / A (2 im pl ie d) O u tp u t : N on e

I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 1, 2, 8, 9

53

S TO P K E Y S TR O K E INTERCEPT

I n p ut : N / A (1 im pl ie d) O u tp u t : N on e

I n p ut : N / A O u tp u t : N on e

O u tp u t : 0 , 1, 8, 9

90

SEND FILE

I n p ut : L en gt h of da ta stri ng ( up to 12 8) or N/A (i f STREOT) O u tp u t : N on e I n p ut : L en gt h of da ta stri ng ( up to 12 8) or N/A (i f STREOT) O u tp u t : N on e I n p ut : R ow (w he n R ) o r N / A ( wh en P) O u tp u t : 0 (w he n R ) o r 1 a n d th e m ax im u m r ow nu mb er (w he n P )

I n p ut : N / A O u tp u t : N on e

O u tp u t : 1 , 2, 3, 5, 9, 2 7 , 110 , 30 0+ x

91

RE C E IVE F I LE

I n p ut : N / A O u tp u t : N on e

O u tp u t : 2 , 3 , 4 , 9 , 2 7, 3 4 , 110 , 30 0+ x

99

CONVERT POSITION or C O N V E R T R O W CO L

I n p ut : C ol um n (w h en R ) or PS po si ti on (w h en P ) O u tp u t : N on e

O u tp u t : 0 , >0, 9998, 99 99

1. The b symbol indicates a required blank space.

11 8

Ehllapi Function Summary

Appendix C: PC File Transfer Messages

The information for each file transfer status or error message includes an explanation of the probable cause. In most cases, the message explanations apply to three IBM host applications: CICS/VS, TSO, and VM/CMS. The following list shows you the status and error messages that might appear when you transfer a file. Messages are displayed with a TRANS prefix. All status messages (file transfer operation, progress, and completion) and error messages appear in the emulator command session window.

Table C-1: PC File Tran sfer Mes sag e Definitio ns (Sh eet 1 of 3)

Mes sa ge

E rr or i n f i l e t r a n s f e r : f i l e t r a n s f e r c a n c e l e d TR A N S 00 E x pl an ati on T h is e rr or me ssa ge occur s on ly w he n th e te rm in al em ul ato r i s op er ati ng th e C I C S / V S a pp li ca t io n. T h e C I C S / V S f il e t ran s f er t ra ns a cti on d e te cte d a n e r r o r d ur in g th e fi l e t ra n s f er co m ma nd ope ra tio n. A n e rro r i n t he d ata b ei ng tran sfer re d o r a n un id en tifi ed syst em er ro r m ig ht h ave o c c ur re d. F i le t ra ns f e r c om m an d b ei ng p ro c es s ed TR A N S 01 E x pl an ati on T h e m es s a g e i n d ic a t e s t h a t t h e s y s t e m h a s s ta rt e d p r o c e s s i n g t h e f i l e t ra n s f e r c o m ma nd . Number of bytes of file sent so far: ==> nnnn N u m b e r o f b y t e s o f f i l e r ec e i v e d s o f a r : = = > n n n n TR A N S 02 E x pl an ati on The message indicates the file transfer's progress. In addition, the message tells you the current number of bytes s e nt t o t he h os t o r t h e n um be r o f by t es c u rr en t l y r ec e i v e d b y t h e l o c a l d i s k f i l e . F i l e t r a ns f e r c o m p l e t e TR A N S 03 E x pl an ati on The message indicates that the file transfer operation has completed successfully. A new file is stored either at the h os t o r at t h e l o c a l s y s t e m w i t h t h e f i l e n am e a nd c h a r a c t e ri s t ic s s p e c if i ed in t he c om ma nd . F i l e t r a ns f e r c o m p l e t e , w i t h r e c o r ds s e g me nt e d E x pl an ati on If this message appears when you use the TSO or VM/CMS application, the file transfer operation has completed. Any record e x c e e di n g t h e s e t l o g i c a l r e c o r d l e n g t h ( lr ec l ) i s d iv i d e d -- i t i s c o n v e r t e d t o m ul t i pl e r e c o r ds . N o a c t io n i s n e c e s s a r y. I f thi s m e ssage ap pe ars w h e n yo u u s e C I C S /V S , th e se n d co m m an d o p e r a ti on co m pl ete d s u c c e s s f u l l y ; h ow e v e r, a t l e a s t o n e o f t h e d a ta r ec o r d s s e n t t o t h e h o s t e x c e e de d t h e m ax i m u m l og ic a l r ec o rd l en gt h (3 2, 7 67) c ha ra ct ers ) . T he re co rd ha s bee n s e pa ra t ed in t o m ul t ip le se gm en ts--e ach se gm en t ap pe ar s a s a se pa ra te i t em i n th e tem p ora ry sto ra ge que ue . L oc a l f i l e s p e c i f i c a t i o n i nc o r r e c t : f i l e t r a ns f e r c a n c e l e d TR A N S 05 E x pl an ati on A n i nva li d l ocal fi le nam e wa s supp li ed in the com m and .

D ef i n i t i o n

TR A N S 04

WebConnect Ehallapi Programmer's Reference Guide 11 9

Tab le C-1 : PC F ile Tra nsfe r Messag e Definition s (Sh eet 2 of 3)

Me ssa g e

C o m ma nd i n co m pl e t e : f i l e t r a n sf e r c a n c e l e d T RA N S 0 6 Expl an ati on A f i l e t r a ns f e r c o m m an d w as i s s u e d w it h o u t t h e r eq ui re d a rg u m e n ts . C a n n o t l i n k t o h os t : f i l e t r a ns f e r c a n c e l e d T RA N S 0 7 Expl an ati on T he m e ssa ge in di cates a pr og ram e rr or. T he fil e t ran sfer is o per ati ng im pr op er ly. C o m ma nd t r a ns m i t e rr or : f i l e t r a n s f e r c a n c e l e d T RA N S 0 8 Expl an ati on The message occurs if either a program error exists or there was a problem with the command string. Un kno wn ho st er ro r: fi le tra nsfer can c el ed T RA N S 0 9 Expl an ati on T he m e ssa ge in di cates a pr og ram e rr or. T he fil e t ran sfer is o per ati ng im pr op er ly. Ho st ha s no t re sp on de d w ith in tim e out per io d: fi le tra nsfe r can c el ed T RA N S 1 0 Expl an ati on T h e h os t h as c e a s e d t o r es p o nd t o t h e f i l e t r a ns f e r r e q u e s t . Lo st co ntact w it h ho st: tra nsfe r can c el ed T R AN S 11 Expl an ati on The message occurs if there is a problem with the connection to the IBM host session. E r r o r w r i t i n g f i l e t o h os t : f i l e t r a ns f e r c a n c e l e d Er ror re ad in g file fro m h o s t : f i l e t r a ns f e r c a n c e l e d Expl an ati on T h i s i n d ic a t e s t h a t t h e h os t a p p l i c a t i o n h as a p ro bl e m w i t h t h e h o s t f i l e . Re qu ir ed ho st sto ra ge un avai la bl e: fi le tra nsfe r can c el ed T RA N S 1 5 Expl an ati on If the message appears while you are using the TSO or VM/CMS application, more available storage is needed on the host s y st e m . If the message appears while you are using the CICS/VS application, the CICS/VS file transfer transaction cannot find enough s t o r a g e f o r i ts c o n t r o l b l o c k s , I / O b u ff e r s , o r s a v e a r e a s . I n c o r r e c t r e q u e s t c o d e: f i l e t r a ns f e r c a n c e l e d T RA N S 1 6 Expl an ati on T h e m e s s a ge i n d i c a t e s t h a t a n i nv a l i d f i l e t r a ns f e r c o m m an d h a s b e e n i s s u e d. T h e c o m m a n d i s re je ct ed. I n v a i l d f i l e n a m e : f i l e t r a n sf e r c a n c e le d T RA N S 1 7 Expl an ati on The message appears when you are using the TSO application. The dataset name is missing from the command string, or the na me d d ata set i s ei the r a non seq ue nti al datase t or a n onpa rti tio ned da ta set. M i s s i n g o r i n c o r re c t d a tas e t n a m e : f i l e t r a n s f e r c a n ce le d T RA N S 1 7 Expl an ati on The message appears when you are using the CICS/VS application. CICS/VS detects an unrecongnizable filename suppplied in the command string. The command is rejected. I n c o r r e c t o p t i o n s p e c i f i e d : f i l e t ra n s f e r c a n ce le d T RA N S 1 8 Expl an ati on T he host app li cati on de tects a n u nr eco gni zab le op tio n su ppl ie d i n the co m ma nd stri ng . T he co m ma nd is r ej ec t ed . Er ror w hi le re adi ng or wr it ing to h os t d is k : f i le t ra ns f e r c an c el ed T RA N S 1 9 Expl an ati on T he m e ssa ge ap pea rs w he n yo u a re usin g th e T S O or VM /C MS ap pl icati on . T he re is i nsuff i c ie nt s pa c e f o r d ata i n t h e h o s t .

D ef in i ti on

T RA N S 1 3 T RA N S 1 4

12 0

PC File Transfer Messages

Table C-1: PC File Tran sfer Mes sag e Definitio ns (Sh eet 3 of 3)

Mes sa ge

Error handling host file: file transfer canceled E x pl an ati on The message appears when you are using the CICS/VS application. An error occurred in one of the user exits when handling the f i l e . D u r i n g a c o m ma nd -t o- re c ei v e o pe ra t io n, t h is me s s age c a n b e c aus e d by a m is m at c h o f t h e C I C S da tas e t n am e e nt e r e d a s t h e h o s t f i l e n a m e a n d t h e d atas e t n am e t h a t t e m p o r a r i l y r e s i d es i n t h e f i r s t r e c o r d o f t h e C I C S s t o ra ge f il e a s si gn ed t o y o ur dis p la y s tat ion . T he er ro r c an al s o o c cu r f r om t he de t ec t i on of a n e rr or w hi l e co nstr ucti ng or r ea di ng th e fi l e. Du r i n g a co mm a n d - to - s e n d o pe ra t i o n , th e m essa g e c an b e ca use d by t he C I C S /V S a ppl ica t io n's in abi li ty to st ore the Wi nd ow s di sk fil e i n i ts a s si gn ed C I CS t em po rar y sto rag e fil e; it al so ca n b e fr o m d e te cti on o f a n e rr or w hi le a u se r p ro gr am w as r e a d i ng t h e f il e da ta . K ey b o a r d i nh ib it e d : f i l e t r a ns f e r c a n c e l e d TR A N S 25 E x pl an ati on T h e h os t s e s s i o n i s u n a b l e t o a c c e p t t h e f i l e t r a n s f e r o pe ra t i o n , b e c a u s e t h e k e y b o a r d i s l o c k e d . U n re co v er ab le sy s t e m e rr or : f il e t r an s f er c anc e le d TR A N S 26 E x pl an ati on T h e m essa ge ind ica tes a pr ogr am er ro r. T he fil e tr an sfer i s op er ati ng im pr op erl y. C o m m u ni c a t i o n s e q u e n c e w i t h h o s t d is r u p t e d f i l e t r a n s f e r c a n c e l e d TR A N S 27 E x pl an ati on T h e f i l e t r a ns f e r o p e r a t i on h a s b e e n a bo rt e d -- t h e A t t e n t i on k e y f u n c t i o n h as b e e n e n t e r ed . F i l e n o t f o u nd : f i l e t r a n s f e r c a n c e ll e d T R A N3 4 E x pl an ati on T h e m essa ge app ea rs w he n you ar e u s in g th e VM /C M S ap pl ica t io n. T he ap pl ica t io n can no t use the f il e n a m e e n t e r ed i n t h e f i l e t r a n s f e r co m ma nd . Th e f i l e t r a ns f e r c o m m a n d i s r e j e ct e d b y t h e a pp li c at i on .

D ef i n i t i o n

TR A N S 19

WebConnect Ehallapi Programmer's Reference Guide 121

12 2

PC File Transfer Messages

Appendix D: Compile and Link Ehllapi Program

Ehllapi Application Program Development

This section provide detail and examples on compiling and linking an Ehllapi application program in the UNIX and Windows OS environments.

1.

Write an Ehllapi application program using Microsoft C Visual Basic. Your Ehllapi application program uses the hllc() function call to perform functions. Compile the application program. Link the object code with the standard C Visual Basic libraries and the required Ehllapi components. Execute the Ehllapi application program.

N o t e : To test the application: 1) Start We b C o n n e c t A p p l e ts (3270 or 5250) 2) Enable Ehllapi setting.

2. 3. 4.

Putting the Pieces Together for Windows OS

The following is the procedure for creating a hypothetical application program "demo.exe."

1. 2.

Compile the source code into object code. Link demo.obj with the MSVC system library, and ehllapi32.lib library, using the demo.def file. ehllapi.lib is an implicit library that allows the application to load the ehllapi32.dll dynamically.

WebConnect Ehallapi Programmer's Reference Guide 123

12 4

Compile and Link Ehllapi Program

Index

C

Compile and Link EHLLAPI Program, 123 CONNECT PRESENTATION SPACE (1) summary, 115 CONVERT POSITION (99) summary, 118 CONVERT POSITION or CONVERT ROWCOL (99) summary, 118 CONVERT ROWCOL (99) summary, 118 Copy and Append Selected Text to Clipboard (209), 28 COPY FIELD TO STRING (34) summary, 117 COPY OIA (13), 33 summary, 116 COPY PRESENTATION SPACE (5), 39 summary, 115 COPY PRESENTATION SPACE TO STRING (8) summary, 115 Copy Selected Text to Clipboard (208), 46 COPY STRING TO FIELD (33), 47 summary, 117 COPY STRING TO PRESENTATION SPACE (15) summary, 116 EHLLAPI.INI, 114 executing functions, 15

F

file transfer messages, 119 FIND FIELD LENGTH (32), 52 summary, 117 FIND FIELD POSITION (31), 54 summary, 117 function call 10 QUERY SESSIONS, 68 11 RESERVE, 76 12 RELEASE, 75 13 COPY OIA, 33 14 QUERY FIELD ATTRIBUTE, 65 18 PAUSE, 59 2 DISCONNECT PRESENTATION SPACE, 51 20 QUERY SYSTEM, 72 208 Copy Selected Text to Clipboard, 46 209 Copy and Append Selected Text to Clipboard, 28 21 RESET SYSTEM, 77 210 Paste Text From Clipboard to Presentation Space, 61 211 Select all Text Within Current Presentation Space, 82 22 QUERY SESSION STATUS, 70 23 START HOST NOTIFICATION, 101 24 QUERY HOST UPDATE, 67 25 STOP HOST NOTIFICATION, 106 3 SEND KEY, 85 30 SEARCH FIELD, 78 31 FIND FIELD POSITION, 54 32 FIND FIELD LENGTH, 52 33 COPY STRING TO FIELD, 47 4 WAIT, 90 40 SET CURSOR, 91 41 START CLOSE INTERCEPT, 100

D

debugging, 114 DISCONNECT PRESENTATION SPACE (2), 51 summary, 115 dynamic link library (DLL), 15

E

ehllapi.dll, 18

Index

125

42 QUERY CLOSE INTERCEPT, 63 43 STOP CLOSE INTERCEPT, 105 5 COPY PRESENTATION SPACE, 39 50 START KEYSTROKE INTERCEPT, 103 51 GET KEY, 56 52 POST INTERCEPT STATUS, 62 53 STOP KEYSTROKE INTERCEPT, 107 6 SEARCH PRESENTATION SPACE, 80 7 QUERY CURSOR LOCATION, 64 9 SET SESSION PARAMETERS, 92 90 SEND FILE, 83 91 RECEIVE FILE, 73 99 CONVERT POSITION, 26 99 CONVERT ROWCOL, 26 executing, 15 return codes, 111

Q

QUERY CLOSE INTERCEPT (42), 63 summary, 117 QUERY CURSOR LOCATION (7), 64 summary, 115 QUERY FIELD ATTRIBUTE (14), 65 summary, 116 QUERY HOST UPDATE (24), 67 summary, 116 QUERY SYSTEM (20), 72 summary, 116 QUERY SESSIONS (10), 68 summary, 115 QUERY SESSION STATUS (22), 70 summary, 116

G

GET KEY (51), 56 summary, 118

R

RECEIVE FILE (91), 73 summary, 118 RELEASE (12), 75 summary, 116 RESERVE (11), 76 summary, 116 RESET SYSTEM (21), 77 summary, 116 Return Code, 24 return codes, 111

H

hllapi(), 15

K

keyboard mnemonics, 87

O

OIA group bit meanings, 35, 38

P

Paste Text From Clipboard to Presentation Space (210), 61 PAUSE (18), 59 summary, 116 PC file transfer messages, 119 POST INTERCEPT STATUS (52), 62 summary, 118 presentation space, 14

S

SEARCH FIELD (30), 78 summary, 117 SEARCH PRESENTATION SPACE (6), 80 summary, 115 Select all Text Within Current Presentation Space (211), 82 SEND FILE (90), 83 summary, 118 SEND KEY (3), 85

126

Index

keyboard mnemonics, 87 summary, 115 SET CURSOR (40), 91 summary, 117 SET SESSION PARAMETERS (9), 92 summary, 115 short name, 14 START CLOSE INTERCEPT (41), 100 summary, 117 START HOST NOTIFICATION (23), 101 summary, 116 START KEYSTROKE INTERCEPT (50), 103 summary, 117 STOP CLOSE INTERCEPT (43), 105 summary, 117 STOP HOST NOTIFICATION (25), 106 summary, 117 STOP KEYSTROKE INTERCEPT (53), 107 summary, 118 supplied parameters data string length buffer size, 20

T

toolkit, 12 trace log file, 18, 114

W

WAIT (4), 90 summary, 115 winhllapi(), 15, 20, 25

Index

127

128

Index

Information

EHllapi Programmer's Reference Gudie

128 pages

Report File (DMCA)

Our content is added by our users. We aim to remove reported files within 1 working day. Please use this link to notify us:

Report this file as copyright or inappropriate

227820


Notice: fwrite(): send of 207 bytes failed with errno=104 Connection reset by peer in /home/readbag.com/web/sphinxapi.php on line 531