Professional Documents
Culture Documents
HLLAPI Reference
Manual
Reflection
WRQ
for IBM
Copyright
19942000 by WRQ, Inc. All rights reserved. No part of this publication may be reproduced, transmitted,
transcribed, stored in a retrieval system, or translated into any language, in any form by any means, without
the written permission of WRQ, Inc.
Adobe Systems Incorporated Adobe, Acrobat, and Acrobat Reader are registered trademarks.
Compaq Computer Corporation DEC, LAT, VAX, and OpenVMS are registered trademarks.
HiT Software, Inc. HiT Software, HiT ODBC, and HiT DB2 are trademarks.
International Business Machines Corporation AT, IBM, PS/2, IBM Communications Server for Windows NT,
and AS/400 are registered trademarks.
Microsoft Corporation Microsoft, MS-DOS, Windows, Windows NT, and Visual Basic are registered trademarks.
All other brand and product names mentioned in this manual are the trademarks of their respective owners.
Customer Service
WRQ Corporate Headquarters European Headquarters
1500 Dexter Avenue North The Netherlands
Seattle, WA 98109 USA +31.70.375.11.00
+1.206.217.7100 +31.70.356.12.44 FAX
+1.206.217.0293 FAX
800.872.2829
Technical Documentation
Visit the following Web site to download the PDF (Portable Document Format) version
of this and other WRQ manuals: support.wrq.com/manuals/.
Table of Contents
Reflection for IBM HLLAPI Reference ........................................................................................................................ 1
HLLAPI Help Reference ........................................................................................................................................................ 5
EHLLAPI Functions Alphabetical List ................................................................................................................................ 6
EHLLAPI Functions Numerical List .................................................................................................................................... 8
Connect Presentation Space (1) ........................................................................................................................................10
Disconnect Presentation Space (2) ...................................................................................................................................12
Send Key (3) ............................................................................................................................................................................13
Wait (4) .....................................................................................................................................................................................15
Copy Presentation Space (5) ..............................................................................................................................................16
Search Presentation Space (6) ...........................................................................................................................................18
Query Cursor Location (7) ...................................................................................................................................................20
Copy Presentation Space to String (8) .............................................................................................................................21
Set Session Parameters (9) ..................................................................................................................................................23
Query Sessions (10) ...............................................................................................................................................................30
Reserve (11) ............................................................................................................................................................................31
Release (12) .............................................................................................................................................................................32
Copy OIA (13) .........................................................................................................................................................................33
Query Field Attribute (14) ...................................................................................................................................................42
Copy String to Presentation Space (15) ...........................................................................................................................44
Pause (18) ................................................................................................................................................................................46
Query System (20) .................................................................................................................................................................48
Reset System (21) ..................................................................................................................................................................49
Query Session Status (22) ....................................................................................................................................................51
Start Host Notification (23) .................................................................................................................................................53
Query Host Update (24) .......................................................................................................................................................54
Stop Host Notification (25) .................................................................................................................................................56
Project Name Chapter 1 Reflection for IBM HLLAPI Reference TEMPLATE: docs_v4 D:\working\hllapi\hllapi.fm 1.14.00 10:54am
2 Reflection for IBM HLLAPI Reference
DOS HLLAPI support for 3270 sessions running under Windows 95 and Windows NT.
For both 3270 and 5250 sessions, you can create and use HLLAPI applications that communicate
with a host through Reflection, connect multiple HLLAPI applications, and connect 16-bit
HLLAPI applications to Reflection.
Registering 32-bit HLLAPI Applications
If you have HLLAPI applications that use IBMs 32-bit HLLAPI specification, you must register
them using the Reflection HLLAPI Application Setup Utility. Adding your HLLAPI applications
to the Windows registry tells Reflection to use the IBM 32-bit HLLAPI specification for these
applications rather than the 16-bit HLLAPI specification.
Reflection continues to support HLLAPI applications that use the 16-bit HLLAPI interface and
provides the unique ability to simultaneously run applications that use the new 32-bit specifi-
cation and the 16-bit specification.
The Reflection HLLAPI Application Setup utility (Hllsetup.exe) is installed in the main
Reflection folder. Refer to HLLAPI Application Setup utilitys online help for help registering
your HLLAPI applications.
HLLAPI Reference
HLLAPI Reference
HLLAPI Function
Description
Connect Presentation Space connects and links a HLLAPI application to an RIBM Presentation
Space (PS). Reflection allows up to 16 RIBM presentation spaces to be run simultaneously.
Prerequisite
An RIBM presentation space must be configured with a unique short name before any HLLAPI
applications can connect to it.
Call Parameters
Your client application program must pass the following parameters to this function:
Function number 1
Data string A letter of the alphabet (A-Z) which represents the RIBM
presentation space short name.
Data length Not applicable.
PS position Not applicable.
Return Codes
Remarks
Connect Presentation Space (1) connects you to one RIBM presentation space. If a HLLAPI
application tries to connect to a new RIBM presentation space while already connected, the
application will be disconnected and then the application will attempt to connect to the new
RIBM RIBM presentation space. The application will be disconnected from the old RIBM
presentation space even if ConnectPS does not complete successfully.
The following functions disconnect the client application from the connected RIBM presen-
tation space:
HLLAPI Function
Description
Disconnect Presentation Space (2) disconnects your client application from its currently
connected RIBM presentation space.
After calling this function, you cannot call functions that depend on a connection to an RIBM
presentation space: You will be automatically disconnected from your currently connected RIBM
presentation space when you connect to another presentation space.
Remarks
Disconnect Presentation Space (2) does not restore the values in Set Session Parameters (9) when
you exit the client application. You may call the Reset System (21) function to restore to the
default values.
Reflection for IBM HLLAPI Reference 13
HLLAPI Function
Description
Send Key (3) is used to send a string of up to 255 keystrokes to the currently connected RIBM
presentation space as if they had been entered by an operator. The keyboard must be unlocked
and not in a busy state. Send Key (3) allows sessions to exchange keystrokes that are not available
from the keyboard, or are not represented by an ASCII value. For example, an operator may not
be able to produce the keystrokes necessary for a session, so Send Key (3) can produce the appro-
priate keystroke.
Prerequisites
Connect Presentation Space (1).
Call Parameters
Function Number 3
Data String The string can be a maximum of 255 characters including
keystrokes and ASCII mnemonics which the client sends to
host presentation space.
Length String length, if STRLEN is used. Not used if STREOT
option is used and in such case, the string must end with an
EOT.
PS Position Not applicable
Return Codes
Remarks
You can use all keyboard combinations to represent a string sent to the RIBM presentation
space, including 3270 and 5250 function keys in ASCII mnemonics, by using an escape
character (default value is @) followed by the appropriate key code.
Each key code represents the actual key that is being sent. When sending text keystrokes, be
sure the codes are entered just as you want them to be received, including case.
If your keystroke string is longer than 255 characters (which is Send Keys), you can use one or
more calls to the Send Key (3) function. If you need to send numerous keystrokes, it is faster to
use Copy String to Presentation Space (15) or Copy String to Field (33). An efficient way to
send a large amount of data to the RIBM presentation space is to first use Copy String to
Presentation Space (15) to send the text and then finish the string with another call to Send
Key (3) to send the AID. Use the Query Field Attribute (14) function to check the status of the
receiving field.
To ensure that the keyboard is not locked, your application may call the Wait (4) function.
After the first AID key is sent, keystrokes are no longer accepted and the rest of the string is
ignored.
The following Set Session Parametes (9) values affect this function:
AUTORESET/NORESET
STRLEN/STREOT
EOT=c
ESC=c
The following HLLAPI Style Bits affect this function: Error on Bad Escape, Terminate Send
Key at AID, Error on Send Key Past AID. Search for Hllapi style bits in the Reflection for
IBM online help for more information.
Reflection for IBM HLLAPI Reference 15
HLLAPI Function
Wait (4)
Description
The Wait (4) function determines whether the RIBM presentation space can accept keystrokes
from a HLLAPI application. The Wait (4) function can be used to query the current status on the
XCLOCK and/or XSYSTEM parameter of the OIA.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 4
Data String Not applicable
Length Not applicable
PS Position Not applicable
Return Codes
Remarks
The Wait (4) function by itself may not be a sufficient method for determining when the host is
ready for input. To verify that the correct host panel is displayed on RIBM presentation space,
you might want to search for specific keywords or prompts, using the Search Field (30) function,
Query Cursor Location (7) function, or Search Presentation Space (6) function.
The following Set Session Parameters (9) values affect this function:
TWAIT/LWAIT/NWAIT
16 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Copy Presentation Space (5) function copies the contents of the entire RIBM presentation
space into a string buffer. The size of the buffer will be the size of the RIBM presentation space
unless you decide to copy extended attributes (EABs), in which case it will be more. If you copy
EABs, the string length must be at least twice the size of the RIBM presentation space for the EAB
values to fit into the buffer.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 5
Data String The data buffer defined in the client application program should be as
large as the RIBM presentation space of the entire display buffer. If
EABs are set up to be copied, this buffer must be at least double the size
for the model.
Length Not applicable.
PS Position Not applicable.
Return Parameters
Contains the entire contents of the RIBM presentation space. The size of this parameter is
depends on the value you entered in the Data String parameter.
Return Codes
Remarks
Your client application can determine the size of the RIBM presentation space by calling
Query Sessions (10). To determine if EABs are set, can call Query Field Attribute (14).
If you need to copy only a field or a specific part of the RIBM presentation space, use Copy
Presentation Space to String (8) or Copy Field to String (34) instead.
Copy Presentation Space (5) translates the entire RIBM presentation space to ASCII code.
EABs and other characters not represented by an ASCII value are translated to blanks. To copy
EABs and ATTRIBs, set the Set Session Parameter, EAB and ATTRB parameter respectively.
The following Set Session Parameters (9) values affect this function:
ATTRB/NOATTRB
EAB/NOEAB.
XLATE/NOXLATE
The following HLLAPI Style Bits effect this function: Propogate EAB, Wait a Second, Translate
5250 Attributes to 3270, and Always Blank. Search for Hllapi style bits in the Reflection for
IBM online help for more information.
18 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Search Presentation Space (6) function looks for the specified string. The search can start
from a specified position on the RIBM presentation space and scan forward or backward from
that position. The method of scanning is specified by Set Session Parameters (9), SRCHALL,
SRCHFROM, SCRCHFRWD, SRCHBKWD.
This function is useful if you are looking for a particular keyword on a host screen.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 6
Data String Data string to search for, which you define in the client
program. The string is case sensitive.
Length Target buffer length.
PS Position RIBM presentation space position where to start the search
function (SRCHFRWD), or to end (SRCHBKWD). If
SRCHALL is set, this parameter is ignored.
Return Parameters
This function returns a length parameter. Length:
Return Codes
Remarks
The Search Presentation Space (6) function searches for a specific host string, a panel, or a
message from the host on the RIBM presentation space. If your client application requires a
specific panel or message before sending data back to the host, you can use Search Presentation
Space (6) to find the string.
Use this function in conjunction with the Wait (4) function to determine whether the host
application is ready for input. First wait for input enable, then search for the correct host panel
defining a key string with Search Presentation Space (6).
This function is case-sensitive. The string you look for must be an exact match.
The following Set Session Parameters (9) values affect this function:
SRCHALL/SRCHFROM
SCRCHFRWD/SRCHBKWD
20 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Query Cursor Location (7) function returns the cursor position in the currently
connected RIBM presentation space.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 7
Data String Not applicable
Length Not applicable
PS Position Not applicable
Return Parameter
Length: RIBM presentation space position of the cursor location.
Return Codes
Remarks
This function is useful in conjunction with the Wait (4) function to synchronize with the host
application panel appropriate for next input.
Reflection for IBM HLLAPI Reference 21
HLLAPI Function
Description
The Copy Presentation Space (8) to String function copies the RIBM presentation space to a
string in your client application.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 8
Data String Defined data string to hold the entire content of the RIBM
presentation space.
Return Parameter
Data String Contents of the copied string from the RIBM presentation space.
Return Codes
Remarks
The upper left corner of the RIBM presentation space is defined as position 1 and the last
position is the maximum number of the presentation space.
The following Set Session Parameters (9) values affect this function:
ATTRB/NOATTRB
EAB/NOEAB
XLATE/NOXLATE
The following HLLAPI Style Bits effect this function: Propogate EAB, Copy PS to String
Beyond End, Wait a Second, Translate 5250 Attributes to 3270, and Always Blank. Search for
Hllapi style bits in the Reflection for IBM online help for more information.
Reflection for IBM HLLAPI Reference 23
HLLAPI Function
Description
The Set Session Parameters function lets the HLLAPI client program specify default values for
several HLLAPI functions.
The values are divided into a number of sets which affect the HLLAPI functions.
The session parameters are reset using Reset System (21) function.
Prerequisites
None.
Call Parameters
Function Number 9
Data String A text string containing the session parameters. These parameter
can be contained in a list delimited by commas or spaces.
Length Length of source data string.
PS Position Not applicable.
NOATTR/ATTR
Specifies whether to translate character attributes to ASCII values or not. This parameter
affects Copy Presentation Space (5), Copy Presentation Space to String (8), and Copy Field
String (34) functions.
Parameter Description
ATTRB Keep original values in their original EBCDIC code.
NOATTRB (default) Translates non-ASCII values to blanks (20H).
24 Reflection for IBM HLLAPI Reference
EAB/NOEAB
Specifies if a copy function should include extended attributes (EABs). These functions are used
with Copy Presentation Space (5), Copy Presentation Space to String (8), Copy String to Presen-
tation Space (15), and Copy Field to String (34).
Parameter Description
EAB Data string includes extended attribute bytes (EABs), producing two
characters for each screen character. Allocatea buffer twice the size of the
RIBM presentation space.
NOEAB EABs are not included in data string. Allocate the size of the RIBM presen-
tation space (default).
STREOT/STRLEN
Determines how the length of a data string is determined.
Parameter Description
STRLEN (default) The client application copies a string with an explicit length.
STREOT Strings end with a character defined in the EOT parameter.
EOT
The EOT character is used to define a EndOfText character in a data string. This function is used
in Send Key (3), Search Presentation Space (6), Copy String to Presentation Space (15), Search
Field (30), Copy String to Field (33), Send File (90), and Receive File (91).
Parameter Description
EOT=char where char is a character that specifies the end of a data string. 0 binary
is the default value. A blank is not accepted as EOT. This parameter is
used only if the STREOT option is used.
Reflection for IBM HLLAPI Reference 25
XLATE/NOXLATE
Specifies if EABs are translated to CGA format or not.
Parameter Description
XLATE EABs are translated to CGA format (default).
NOXLATE Skips EAB translation.
CONLOG/CONPHYS
These parameters are ignored.
ESC Parameter
Specifies the Esc character. This parameter is used by Send Key (3) and Get Key (51).
Parameter Description
ESC=char Specifies the escape character for keystroke mnemonics (@ is the
default). Blank is not a valid escape value.
AUTORESET/RESET
This parameter is used by Send Key (3) and Get Key (51).
Parameter Description
AUTORESET (default) Automatically sends Reset with strings with Send Key (3)
function to unlock the input inhibited condition that might exist.
NORESET Does not send a Reset in a data string.
SEARCHALL/SRCHFROM
Specifies how HLLAPI should search the RIBM presentation space. These parameters are used
with Search Presentation Space (6) and Search Field (30).
Parameter Description
SRCHALL Searches the entire RIBM presentation space or field (default).
SRCHFROM Searches from a specified beginning location of the RIBM presentation
space or field.
26 Reflection for IBM HLLAPI Reference
SEARCHFRWD/SRCHBKWD
Parameter Description
SCRCHFRWD Searches forward through the RIBM presentation space (default).
SRCHBKWD Searches backward through the RIBM presentation space.
TRON/TROFF
Specifies debug tracing. A file will be created in the TEMP directory (or Windows directory if
the TEMP environment variable isnt set). The name of the file is Hll*.tmp, where * is a
random
hex number between 0 and FFFFF. The file will be appended for as long as that instance of the
HLLAPI DLL is loaded in memory. Subsequent instances will create new files.
Trace Parameter
Parameter Description
TRON Turns trace on.
TROFF (default) Turns trace off.
Wait Parameter
Specifies the characteristics of a wait period.
Parameter Description
TWAIT (default) For Wait (4), waits up to 60 seconds before timing out on
XCLOCK or XSYSTEM. For Get Key (51) TWAIT waits until a key is
in the buffer (normal or AID key based on Start Keystroke Intercept
(50) option, D or L ), and then returns control to the client HLLAPI
program.
LWAIT For Wait (4), waits until XCLOCK/XSYSTEM clears on OIA. For Get
Key (51), LWAIT does not return control to your HLLAPI program
until it has intercepted a keystroke (normal or AID key based on Start
Keystroke Intercept (50) option, D or L).
NWAIT No waiting period. For Wait (4), checks status and returns immediately.
For Get Key (51) immediately, keystroke not available.
Reflection for IBM HLLAPI Reference 27
FPAUSE/IPAUSE
Specifies type of pause. This parameter is used by the Pause (18) function.
Parameter Description
FPAUSE Full pause. The HLLAPI client program can set the duration of the
pause in the Pause (18) function (default).
IPAUSE Interruptible pause; Start Host Notification (23) or any host system
event will end a pause.
NOQUIET/QUIET
Specifies whether the Send File (90) or Receive File (91) functions will send messages to the
RIBM presentation space and display them to the operator.
Parameter Description
NOQUIET Displays messages.
QUIET Does not display messages.
TIMEOUT
Specifies the number of 30-second cycles HLLAPI waits before terminating the file transfer with
Ctrl+Break. This parameter is used with the Send File (90) or Receive File (91) functions.
Parameter Description
TIMEOUT=0 A Ctrl+Break is issued after 30 seconds: Blanks are not allowed.
TIMEOUT=char Specifies the number of 30-second cycles to wait until HLLAPI issues a
Ctrl + Break and terminates the file transfer. c=character which defines
how many 30 second cycles are acceptable before a Ctrl+Break is issued.
No blanks are allowed
1 0.5 30
2 1.0 60
3 1.5 90
4 2.0 120
5 2.5 150
28 Reflection for IBM HLLAPI Reference
6 3.0 180
7 3.5 220
8 4.0 240
9 4.5 270
J 5.0 300
K 5.5 330
L 6.0 360
M 6.5 390
N 7.0 420
RESUME/NORESUME
Specifies how Connect Presentation Space (1) affects a DOS session.
Parameter Description
RESUME Resumes a DOS session while the host session is active.
NORESUME Suspends DOS session while the host session is active.
BLANK/NOBLANK
Specifies how Copy Presentation Space (5) and Copy Presentation Space to String affects
unknown values NOATTRIB and NOEAB are specified.
Parameter Description
BLANK Converts unknown values to X00.
NOBLANK Converts unknown values to X20.
Reflection for IBM HLLAPI Reference 29
NEWOIA/OLDOIA
Specifies in which format the Copy OIA (13) function returns its data.
Parameter Description
OLDOIA Data OIA is returned in 3270 PC format. The 5250 OIA image is
always returned in ASCII.
NEWOIA Data OIA is returned in ASCII format.
NEWRET / OLDRET
Specifies how the Query Cursor Location (7) function returns cursor position data.
Parameter Description
NEWRET Query Cursor Location (7) returns the cursor position in the Length
or Location parameter.
OLDRET Query Cursor Location (7) returns the cursor position in the Return
Code parameter.
Return Parameter
Length: Number of valid session parameters that were set. Invalid session parameters
will not return.
Return Codes
0 APIOK Successful.
2 APIPARAMETERERROR There was one or more unrecognized parameter value;
all recognized values accepted.
9 APISYSERROR System error.
30 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Query Sessions function returns a 12 byte data string for each started RIBM presentation
space. The data string contains information about RIBM presentation space names and size of
RIBM presentation space. It also returns a data length parameter which holds the number of
active RIBM presentation spaces.
Prerequisites
None.
Call Parameters
Function Number 10
Data String Data string for session parameters.
Length 12 bytes * the number of started host RIBM presen-
tation spaces. Max size is 12 * 16 (192).
PS Position Not applicable.
Return Parameters
Length The number of started host RIBM presentation spaces.
10 H = host.
11-12 RIBM presentation space size. For example, an IBM model 2 is 1920.
Return Codes
0 APIOK Successful
2 APIPARAMETERERROR Invalid string length
9 APISYSERROR System error
Reflection for IBM HLLAPI Reference 31
HLLAPI Function
Reserve (11)
Description
The Reserve function blocks an operator from entering any information on the RIBM presen-
tation space via the keyboard. You should use this function if you need total control of the
RIBM presentation space and need to prevent other input.
Prerequisite
Connect Presentation Space (1).
Call Parameters
Function Number 11
Data String Not applicable.
Length Not applicable.
PS Position Not applicable.
Return Codes
Remarks
The Reserve (11) function is very useful if your application is sending a series of keystrokes to a
host panel and you want to prevent the users from accessing the RIBM presentation space
until the transactions are completed.
Your HLLAPI application needs to unlock the RIBM presentation space with Release (12),
Disconnect Presentation Space (2), or Reset System (21) functions.
32 Reflection for IBM HLLAPI Reference
HLLAPI Function
Release (12)
Description
The Release function unlocks a RIBM presentation space that was locked using the Reserve (11)
function.
Prerequisite
Connect Presentation Space (1) and Reserve (11)
Call Parameters
Function Number 12
Data String Not applicable.
Length Not applicable.
PS Position Not applicable.
Return Codes
Remarks
RIBM presentation space unlock also occurs automatically when the application program
disconnects from the reserved session with Disconnect Presentation Space (2), connects to
another session with Connect Presentation Space (2), or calls Reset System (21).
Reflection for IBM HLLAPI Reference 33
HLLAPI Function
Description
The Copy Operator Information Area function returns the contents of the operator information
area (OIA) from the currently connected RIBM presentation space. A 103-byte string returns the
data to your client HLLAPI application. The interpretation of the string is different for a 3270
and a 5250 string.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 13
Data String A 103 byte long data string, pre-allocated in your
application program.
Length 103 bytes.
PS Position Not applicable.
Return Parameters
Data String: Data string containing the contents of the identified OIA.
The OIA data string contains the following information:
Byte:
1 OIA Format Byte. This byte is always 1 for 3270, and 9 for 5250.
2 - 81 OIA Image Groups. These bytes contain hexadecimal codes of the
OIA image symbols.
82 - 103 The OIA group indicators. Can be an ASCII character string trans-
latable into graphics characters.
34 Reflection for IBM HLLAPI Reference
Bit 0 Reserved
Bit 1 APL
Bit 2 Kana
Bit 3 Alpha
Bits 4-7 Reserved
Group 3: Shift state
1 byte Data String position 84
Bit 0 User-selectable
Bit 1 Field inherit
Bits 2-7 Reserved
Group 6: Color group 1
1 byte Data String position 87
Bit 0 User-selectable
Bit 1 Field inherit
Bits 2-7 Reserved
Group 7: Insert
1 byte Data String position 88
Bit 0 Selected
Bits 1-7 Reserved
Group 11: Color group 2
1 byte (Data String position 96)
Bit 0 Selected
Bits 1-7 Reserved
Group 12: Communication error
1 byte Data String position 97
Bit 0 Reserved
Bit 1 Printer malfunction
Bit 2 Printer printing
Bit 3 Printer assignment
Bits 4-7 Reserved
Group 14: Graphics
1 byte Data String position 99 not used (reserved)
Group 15: Not used
1 byte Data String position 100 not used (reserved)
Group 16: Autokey play/record status
1 byte Data String position 101 not used (reserved)
Group 17: Autokey abort/pause status
1 byte Data String position 102 not used (reserved)
38 Reflection for IBM HLLAPI Reference
Bits 0 Reserved
Bit 1 Keyboard Shift
Bits 2-7 Reserved
Group 4: Program System Support group 1
1 byte Data String position 85 not used (reserved)
Group 5: Highlight group 1
1 byte Data String position 86 not used (reserved)
Group 6: Color group 1
1 byte Data String position 87 not used (reserved)
Group 7: Insert
1 byte Data String position 88
Remarks
The following HLLAPI Style Bits affect this function: Input Inhibited Position, Wait a Second.
Search for Hllapi style bits in the Reflection for IBM online help for more information.
42 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Query Field Attribute function returns a field attribute byte for a specific RIBM
presentation space position.
The field attribute is returned in the parameter as an integer. This value is converted to
a binary value.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number14
4-5 I/SPD
00 = Normal intensity, pen not detectable
01 = Normal intensity, pen detectable
10 = High intensity, pen detectable
11 = Non-Display, pen not detectable
6 Reserved
7 MDT
0 = Field has not been modified
1 = Field has been modified
Return Codes
Remarks
This function determines the RIBM presentation space target field when you use the
following functions:
HLLAPI Function
Description
The Copy String to Presentation Space (15) function copies an ASCII data string to a defined
position on the RIBM presentation space.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 15
Data String A string of ASCII characters you want to copy into an unformatted
position on RIBM presentation space.
Length Contains the total length of the string to copy, including EABs, if
the EAB parameter is selected. This parameter is ignored if you have
selected the STREOT parameter using Set Session Parameters (9).
PS Position RIBM presentation space position where copying begins.
Return Codes
Remarks
The data string must be the same size or smaller than the size of the RIBM presentation space
buffer size or the size of the target area.
Non-ASCII characters in the data string are translated into blanks in the RIBM presentation
space.
If EABs are set, the input string should contain the appropriate EABs following each ASCII
character.
This function is also affected by the STRLEN/STREOT and EOT option, defined in Set Session
Parameters (9). To send AID keys to RIBM presentation space, use the Send Key (3) function.
For example, the most efficient way to send a host command to the host session is to send the
ASCII string with the Copy String to Presentation Space (15) function and then send the Enter
AID key with the Send Key (3) function.
The cursor location will not be updated with the Copy String to Presentation Space (15)
function. To copy to the current cursor position, use the Query Cursor Location (7), and place
the returning parameter value in the presentation space position parameter when you call this
function.
The following HLLAPI Style Bits effect this function: Modify Protected Field, Transmit
Modified Protected Fields, Dont Wrap at presentation space End. Search for Hllapi style
bits in the Reflection for IBM online help for more information.
46 Reflection for IBM HLLAPI Reference
HLLAPI Function
Pause (18)
Description
The Pause (18) function is used to add a pause to a host session sequence. The function halts for
a specified amount of time, or until a host event satisfies the pause.
Prerequisites
A Start Host Notification (23) function call is required if the IPAUSE parameter is selected using
Set Session Parameters (9).
Call Parameters
Function Number 18
Data String Not applicable.
Length Sets the duration of the pause. This parameter must be an
integer between 0 and 65535. The pause is set in half-second
increments. For example, 1 = 0.5 seconds, 60 = 30 seconds,
120 = 1 minute (60 seconds), etc.
PS Position Not applicable.
Return Codes
Remarks
An event happens when either the RIBM presentation space, or OIA is updated during a
session. If you need to terminate the pause for this type of event, select the IPAUSE parameter
in Set Session Parameters (9). Only then will the Pause function terminate.
If your client application is not connected to a RIBM presentation space the pause will wait the
full duration, disregarding the pause parameter. If the IPAUSE parameter is selected using Set
Session Parameters (9), the pause queue needs to clear before next function call. To reset the
pause queue prior to the next Pause (18) function call, you must call the Query Host Update
(24) function.
The Pause (18) function is not an efficient method of pausing if you need to wait for long
periods of time. Do not use the Pause (18) function if your application needs to pause longer
than 20 minutes. The Pause (18) function is not an exact timekeeper, and should not be used
for applications that require precise timing.
The following Set Session Parameters (9) values affect this function:
FPAUSE/IPAUSE
48 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Query System (20) function lets your HLLAPI application determine settings and other
values related to the system. The function returns a 35-byte long string with HLLAPI-related
information such as version number, level number, date, etc.
Prerequisites
None.
Call Parameters
Function Number 20
Data String A 35-byte data string. The return parameter contains the
system information.
Length Not applicable (35 is implied).
PS Position Not applicable.
Return Parameter
This function returns a 35 byte long string with system information.
Data String
Bytes
Return Codes
Remarks
You must allocate a 35-byte string to receive the returning data string parameter.
HLLAPI Function
Description
The Reset System (21) function reinitializes the HLLAPI to its starting state. This function can
also be used to ensure that HLLAPI is loaded.
You can use this function when you start or terminate your HLLAPI program.
Prerequisites
None.
Call Parameters
Function Number 21
Data String Not applicable.
Length Not applicable.
PS Position Not applicable.
Return Codes
Remarks
The system resets the following:
If you need to restore all values, call this function when you are exiting your HLLAPI application.
To restore selected session values, use the Set Session Parameters (9) instead.
In the beginning of an application you can restore values with Reset (21) and ensure that
HLLAPI is loaded. If HLLAPI is not loaded, a return code 1 APINOTCONNECTED will be
returned.
Reset System (21) should be used very sparingly, i.e. during startup only; use Set Session Param-
eters (9) instead to change session parameters.
Reflection for IBM HLLAPI Reference 51
HLLAPI Function
Description
The Query Session Status (22) function returns information about a RIBM presentation space.
The function returns the status information in an 18-byte data string.
The following information is included in the return parameter of Query Session Status (22).
Session type
Session usage
Function Number 22
Data String 18 bytes. The first byte must be either:
a letter A-Z, which indicates the RIBM presentation space
short name.
a (space) which indicates the currently connected
RIBM presentation space.
Length 18 bytes.
PS Position Not applicable.
52 Reflection for IBM HLLAPI Reference
Return Parameters
Data String:
Remarks
The values for Rows and Columns returned in byte 12-15 correspond to the RIBM presen-
tation space buffer size depending on the model.
Reflection for IBM HLLAPI Reference 53
HLLAPI Function
Description
The Start Host Notification (23) function starts monitoring the RIBM presentation space or
operator information area for updates. Following this call, your application must call the
Query Host Update (24) function to check when the host updated the RIBM presentation
space or OIA.
Prerequisites
None.
Call Parameters
Function Number 23
Data String A six-byte long string.
1 RIBM presentation space short name, or blank or null
(request against the currently connected RIBM
presentation space).
2 One of the following characters:
Return Codes
0 APIOK The Start Host function was successful.
HLLAPI Function
Description
The Query Host Update (24) function allows your application to determine if the host has
updated the RIBM presentation space, or operator information area (OIA) since:
The queried RIBM presentation space must be specified in the data string, but your EHLLPI
application program does not need to be connected to current the RIBM presentation space for
updates.
Prerequisites
Your application must call the Start Host Notification (23) function before calling this function.
Call Parameters
Function Number 24
Data String One character A-Z short name for the RIBM presen-
tation space. A space indicates a request for updates to
the requested RIBM presentation space.
Length Not applicable (1 is implied).
PS Position Not applicable.
Reflection for IBM HLLAPI Reference 55
Return Codes
Remarks
To disable the Query Host Update (24) function, and stop monitoring updates, you must
call the Stop Host Notification (25) function.
The Stop Host Notification (25) function ends the Query Host Update function (24).
The following HLLAPI Style Bits effect this function: Query Host Update Protocol,
Wait a Second. Search for Hllapi style bits in the Reflection for IBM online help for
more information.
56 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Stop Host Notification (25) function disables the capability of the Query Host Update
(24) function to determine if the host RIBM presentation space or OIA has been updated.
This function can also be used to stop host events from affecting the Pause function.
Prerequisites
Start Host Notification (23)
Call Parameters
Function Number 25
Data String Short name of the RIBM presentation space or blank or null
indicating a request for the current RIBM presentation space.
Length Not applicable (1 is implied).
PS Position Not applicable.
Return Codes
HLLAPI Function
Description
The Search Field (30) function searches for a text string in protected or unprotected fields of
the RIBM presentation space. When the specified text string is found, the function returns the
RIBM presentation space position.
This function is case-sensitive and requires an exact match of the text string parameter and the
RIBM presentation space content.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 30
Data String Text string to search presentation. End the string with EOT if
the client uses STREOT. See Set Session Parameters (9).
Length Specifies the length of the string you are searching. Not appli-
cable if EOT is used to end the string.
PS Position Specifies the beginning RIBM presentation space position to
search from. If SRCHFROM is set, it also specifies the position
within the field.
Return Parameters
Length:
Return Codes
Remarks
The following Set Session Parameters (9) values affect this function:
Search Parameters
SRCHALL/SRCHFROM
SCRCHFRWD/SRCHBKWD
Reflection for IBM HLLAPI Reference 59
HLLAPI Function
Description
The Find Field Position (31) function returns the position of a target field at the currently
connected RIBM presentation space. This function is useful for searching for either protected
or unprotected fields in a field formatted RIBM presentation space.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 31
Data String Defines the field type.
[space] [space] This field ( )
T[space] This field (T )
N[space] Next field (N ) either protected or unprotected
P[space] Previous field (P ) either protected or unprotected
NP Next protected field (NP)
NU Next unprotected field (NU)
PP Previous protected field (PP)
PU Previous unprotected field (PU)
Length Not applicable (2 is implied)
PS Position Contains the RIBM presentation space position in a
field where the function starts the search.
60 Reflection for IBM HLLAPI Reference
Return Parameters
Length:
0 If return code 28: No such field found. If return code 24: unformatted host
RIBM presentation space.
>0 The returning length is the starting RIBM presentation space position where
the field was found, defined as the first position after the attribute byte.
Return Codes
Remarks
Query Field Attribute (14) returns the field attribute bytes value, and it can also detect an
unformatted RIBM presentation space. If the return parameter length is 0, the RIBM presen-
tation space is unformatted.
Reflection for IBM HLLAPI Reference 61
HLLAPI Function
Description
The Find Field Length (32) function searches the RIBM presentation space for a protected or
unprotected field and returns the field length.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 32
Data String Specifies which field you want to search.
[space] [space] This field ( )
T[space] This field (T )
N[space] Next field (N ) either protected or unprotected
P[space] Previous field (P ) either protected or unprotected
NP Next protected field (NP)
NU Next unprotected field (NU)
PP Previous protected field (PP)
PU Previous unprotected field (PU)
Length Not applicable (2 is implied).
PS Position Contains the presentation space position where you want to
start the search.
62 Reflection for IBM HLLAPI Reference
Return Parameters
Length:
0 If return code 28: No such field found. If return code 24: unformatted
host RIBM presentation space.
>0 Length of the field.
Return Codes
Remarks
The Find Length (32) function returns the number of characters in the requested field in the
RIBM presentation space. The characters are calculated from the start of the target field
including the character before the next attribute byte.
The Find Length (32) function does not wrap, so if a field extends from the end to the
beginning of the RIBM presentation space, this function returns the length from the field
origin to the end of the RIBM presentation space.
If the field attribute is at the end of the RIBM presentation space, the field is assumed to have a
length of zero.
If two field attributes are positioned together, the field length in between them is assumed to
be zero.
Query Field Attribute (14) is useful for finding the current modified or protected field.
Reflection for IBM HLLAPI Reference 63
HLLAPI Function
Description
The Copy String to Field (33) function copies a string of characters, defined in your client appli-
cation, into a specific unprotected field in the RIBM presentation space. It can only be used in a
field-formatted RIBM presentation space with unprotected fields.
Prerequisite
Connect Presentation Space (1).
Call Parameters
Function Number 33
Data String String of data in your application program you want to copy to
the RIBM presentation space. End string with EOT if STREOT is
specified. See Set Session Parameters (9).
Length Length of data. Applicable only if STRLEN is used.
PS Position Position on RIBM presentation space where the string will be copied.
The function transfers the string and places it in the beginning of the
unprotected field.
Return Codes
0 APIOK The Copy String to Field (33) was successful, the string was
copied.
1 APINOTCONNECTED Not connected to RIBM presentation space.
2 APIPARAMETERERROR Parameter error.
5 APIINHIBITED The RIBM presentation space field was protected or locked
or non-ASCII characters was sent to the field.
6 APITRUNCATED Copied; data truncated. The field may be shorter than the
copied string.
7 APIPOSITIONERROR Invalid RIBM presentation space position.
9 APISYSERROR System error.
24 APINOFIELD Unformatted host RIBM presentation space.
64 Reflection for IBM HLLAPI Reference
Remarks
The copy operation ends when one of the following conditions is met:
Note that the Copy String to Field (33) function cannot copy non-ASCII characters or AID
keys to a field. Your application must use the Send Key (3) function to supply AID keys to a
RIBM presentation space.
The following HLLAPI Style Bits effect this function: Modify Protected Field, Transmit
Modified Protected Fields, Dont Wrap at PS End. Search for Hllapi style bits in the
Reflection for IBM online help for more information.
Reflection for IBM HLLAPI Reference 65
HLLAPI Function
Description
The Copy Field to String (34) function copies ASCII characters from a protected or unprotected
field in the RIBM presentation space to a string defined in your application. The RIBM presen-
tation space must be field-formatted.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 34
Data String String to which the program copies the contents of the field.
Length Length of the field. If the field contains EABs, then the length must
be twice the length of the field.
PS Position Any position within the field of the RIBM presentation space. The
copying will always start from the beginning of the field.
Return Parameter
Data String:
This string contains the data that was copied from the field. The first byte of the returned string
contains the start byte of the field in the RIBM presentation space. The length of this string is
either the number of bytes in the specified field, or the number of bytes specified in the Length
parameter. If the Length parameter is shorter than the actual string, the function returns an error
code (6), and the string is truncated.
Return Codes
Remarks
You can specify a presentation space Position anywhere within the field; the copy operation
starts from the beginning of a protected or unprotected field. If your application specifies a
position in the middle of a field the function copies the string from the beginning of that field.
Copy Field To String (34) transfers the string from the beginning of the field to the length
specified in the Length parameter.
Use Find Field Position (31) to find the field's position on the RIBM presentation space and
Find Field Length (32) to calculate the fields length, and then use the return parameters for
these functions in the Data String and Length parameters.
The copy operation ends when one of the following conditions is met:
ATTRB/NOATTRB
EAB/NOEAB
XLATE/NOXLATE
The Copy Field to String (34) function usually translates characters into ASCII, attributes are
translated to blanks.
The following HLLAPI style bits affect this function: Propogate EAB, Wait a Second, Translate
5250 Attributes to 3270, and Always Blank. Search for Hllapi style bits in the Reflection for
IBM online help for more information.
Reflection for IBM HLLAPI Reference 67
HLLAPI Function
Description
The Display Cursor (37) function displays the cursor at a specified location in the RIBM
presentation space.
Prerequisite
None.
Call Parameters
Function Number 37
Data String Presentation space short name.
Length Not applicable.
PS Position Desired cursor position in the RIBM presentation space.
Return Codes
Remarks
The difference between Set Cursor (40) and Display Cursor (37) is that Display Cursor (37)
also takes a data string parameter when a short name is specified, and it does not have
Connect Presentation Space (1) as a prerequisite. Set Cursor (40) does not need the short
name, but you must call Connect Presentation Space (1) to execute it.
68 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Set Cursor (40) function puts the cursor at a desired location in the RIBM presentation
space.
Prerequisite
None.
Call Parameters
Function Number 40
Data String Not applicable.
Length Not applicable.
PS Position Desired cursor position in the RIBM presentation space.
Return Codes
HLLAPI Function
Description
The Start Close Intercept (41) function intercepts a close request, when the user selects the
close option from the emulator.
Data String
a letter A-Z, which indicates the RIBM presentation space short name.
Length 1
Remarks
Reset system will end the close intercept.
70 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Query Close Intercept (42) function returns a code which indicates that the user tried to
close the application.
Prerequisite
Start Close Intercept (41)
Call Parameters
Function Number 42
Data String
a letter A-Z, which indicates the RIBM presentation space short name.
Length 1
0 APIOK A close event did not occur. The Query Close Intercept
(42) function was successful.
1 APINOTCONNECTED Not connected to a RIBM presentation space.
2 APIPARAMETERERROR Parameter error.
8 APINOTAVAILABLE Unavailable operation. Your application did not call Start
Close Intercept (41).
9 APISYSERROR System error.
26 APIPSCHANGED A close intercept has occurred.
Reflection for IBM HLLAPI Reference 71
HLLAPI Function
Description
The Stop Close Intercept (43) function turns off the Start Close Intercept (43) function, and
the user can use the close function.
Prerequisite
Connect Presentation Space (1)
Call Parameters
Function Number 43
Data String
a letter A-Z, which indicates the RIBM presentation space short name.
HLLAPI Function
Description
The Start Keystroke Intercept (50) function starts a process with a set of four functions that
can capture and filter keystrokes entered by a terminal operator. The intercepted keystrokes
may be received through Get Key (51), accepted, or rejected by sending a beep message with
the Post Intercept Status (52) function. A keystroke can then be replaced with another
keystroke using the Send Key (3) function. Your application can stop and disable the process
by calling Stop Keystroke Intercept (53).
Prerequisite
None.
Call Parameters
Function Number 50
Data String
1 a letter A-Z, indicating the HLLAPI short name.
a (space) which indicates the currently connected RIBM presen-
tation space.
2 Option code character:
Return Codes
Remarks
Your application can intercept keystrokes for more than one RIBM presentation space at a
time. If you need to use Send Key (3) to send keystrokes to intercepted RIBM presentation
spaces HLLAPI requires a call to Connect Presentation Space (1).
HLLAPI Function
Description
The Get Key (51) function allows your application to receive the AID keystrokes or all keystrokes
for the sessions that were specified with Start Keystroke Intercept (50).
Prerequisites
Prior call to Start Keystroke Intercept (50).
Call Parameters
Function Number 51
Data String String containing 8 bytes.
1 a letter A-Z, indicating the RIBM presentation space short
name.
a (space) which indicates the currently connected RIBM
presentation space.
2-8 Spaces to receive data in the return parameter.
Length 8 characters.
PS Position Not applicable.
Return Parameters
Return Codes
Remarks
When a keyboard queue overflow resulting in an error code (31) occurs, you may increase the
value of the calling length parameter for Start Keystroke Intercept (50), or call the Get Key (51)
function repeatedly to eliminate the error.
If LWAIT has been specified, Get Key (51) will not return control to the application until there
are keystrokes in the buffer.
76 Reflection for IBM HLLAPI Reference
The following Set Session Parameters (9) values affect this function:
TWAIT/LWAIT/NWAIT
ESC=char
The return parameter contains a RIBM presentation space short name identification, a code
character, and an allocated buffer used for keystroke buffer queues. Below are some examples
and a breakdown of this buffer:
DAc:
AM@4:
ES@A@2:
HLLAPI Function
Description
The Post Intercept Status (52) function analyzes a keystroke and either accepts or rejects it.
If the function rejects the keystroke through Get Key (51), it sounds a beep.
Prerequisite
Start Keystroke Intercept (50).
Call Parameters
Function Number 52
Data String 2-byte data string.
1 a letter A-Z, which indicates RIBM presentation
space short name.
a (space) which indicates for the currently
connected RIBM presentation space.
2 A = Accepted keystroke.
R = Rejected keystroke (beep).
Length Not applicable (2 is implied).
PS Position Not applicable.
Return Codes
HLLAPI Function
Description
The Stop Keystroke Intercept (53) function ends the intercept of keystrokes in the RIBM
presentation space. When the function is successful the terminal operator keystrokes return to
normal, and no keystrokes will intercepted.
Prerequisite
Start Keystroke Intercept (50).
Call Parameters
Function Number 53
Data String One of the following:
1 a letter A-Z, which indicates presentation short
name.
a (space) which indicates for the currently
connected RIBM presentation space.
Length Not applicable (1 is implied).
PS Position Not applicable.
Return Codes
HLLAPI Function
Description
The Send File (90) function transfers a file from your PC to the host RIBM presentation space
using the IND$FILE host file transfer function.
Prerequisite
Connect Presentation Space (1).
Call Parameters
Function Number 90
Data String Send command string. Maximum 128 bytes. Click here for a complete
description of the data string syntax for VM/CMS systems or here for
VMS/TSO systems.
Length Length of parameters string, or EOT if EOT mode is selected.
PS Position Not applicable.
Return Codes
Remarks
You can send a file to CMS, TSO, CICS systems. Send File (90) does not support AS/400 file
transfers.
The target host RIBM presentation space must be ready to receive the file, which means that
you should be logged on to the host computer, have the keyboard enabled, have no other file
transfer running at the same time to the same RIBM presentation space, and have the system
prompt displayed.
The following Set Session Parameters (9) values affect this function:
QUIET/NOQUIET
STRLEN/STREOT
TIMEOUT=c/TIMEOUT=0
EOT=c
Reflection for IBM HLLAPI Reference 81
HLLAPI Function
Description
The Receive File (91) function transfers a file from the host RIBM presentation space to the PC
using the IND$FILE host file transfer function.
Prerequisites
None.
Call Parameters
Function Number 91
Data String Receive command string. Maximum 128 bytes. Click here for a
complete description of the data string syntax for VM/CMS
systems or here for VMS/TSO systems.
Length Length of parameters string, or EOT if EOT mode is selected.
PS Position Not applicable.
Return Codes
HLLAPI Function
Convert (99)
Description
The Convert (99) function converts a position on the RIBM presentation space to a display
row/column coordinate, or a display row/column coordinate to an RIBM presentation space
position.
Prerequisites
None.
Call Parameters
Function Number 99
Data String 2-byte data string.
1 One of the following:
a letter A-Z, which indicates presentation short name.
a (space) which indicates for the currently connected RIBM
presentation space.
2 P or R:
P = converts from Position to Row/Column.
R = converts from Row/Column to Position. See Length and PS
Position parameter below.
Length Row number on the RIBM presentation space. Valid row value is
between 1 and the maximum number of rows depending on the model.
Not applicable when P is specified in the String parameter.
PS Position When R is specified, column number on RIBM presentation space.
Valid column value is between 1 and the max presentation space
position, usually 1920.
When P is specified, the RIBM presentation space position.
A valid value must be between 1 and maximum presentation space
buffer size.
Reflection for IBM HLLAPI Reference 83
Return Parameters
The Convert (99) function does not return parameters.
Return Codes
Remarks
The Convert (99) function does not update the cursor position.
The Convert (99) function calculates the position, taking the model number in consideration.
84 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Connect Window Services (101) function allows the client application to manage the
RIBM presentation space windows.
Prerequisite
None.
Call Parameters
Return Codes
HLLAPI Function
Description
The Disconnect Window Services (102) function disconnects the HLLAPI application and the
RIBM presentation space windows.
Prerequisite
Connect Window Services (101).
Call Parameters
Return Codes
Remarks
When HLLAPI has called Disconnect Window Services (102) it no longer manages the RIBM
presentation space window.
Before you exit the application, exit with a call to Disconnect Window Services (102) so all
connected RIBM presentation spaces will disconnect and no outstanding connection will be
canceled.
86 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Query Window Coordinates (103) function returns window coordinates on the
presentation.
Return Parameters
Data String:
Return Codes
Remarks
This function is not supported for 5250.
HLLAPI Function
Description
The Window Status (104) function can be used to query or change a windows RIBM presen-
tation space size, location, or visibility. You can also move, maximize or minimize a specified
window.
Prerequisite
Connect Window Services (101).
Call Parameters
Return Codes
Remarks
This function is not supported in 5250 sessions.
88 Reflection for IBM HLLAPI Reference
HLLAPI Function
Description
The Change PS Window Name (106) function allows an application to reset or change the
RIBM presentation space window name.
Prerequisite
Connect Window Services (101).
Call Parameters
Return Codes
HLLAPI Function
Description
Run Profile starts an RIBM presentation space with the specified settings file.
Prerequisite
None
Call Parameters
HLLAPI Function
Description
The Get Session HWND (1002) function returns the instance handle of the currently
connected RIBM presentation space.
Prerequisite
None.
Call Parameters
Return Parameters
Data String The instance handle.
Return Codes
EHLLAPI Reference
HLLAPI Reference
Parameter Description
[d:] Defines a disk drive where the PC file will be sent to or received
from. If you dont specify the drive, file transfer defaults to the
current drive.
[path] Path for the PC file to be sent or target file to be received. If you
dont specify the path, it defaults to the Reflection for IBM \User
directory on the PC.
filename File name of the file to be sent or received.
[.ext] File extension of the file to be sent or received.
w: Session's short name for a CMS session (followed by a colon) for
sending or receiving files. A letter between A - Z. If you dont,
the host session in focus would be the target.
fn File name of the file being sent or received from the host session.
[ft] The file type of the host file to be sent or received, if any.
[fm] Optional parameter which indicates the host file mode. If Send
File (90), this parameter indicates to CMS which disk drive the
file is sent to.
(options The Options parameter is preceded by a single left parenthesis.
See below for VM/CMS File Transfer Options.
Reflection for IBM HLLAPI Reference 95
Option Description
BUFSIZE = 2
BUFSIZE = 4
BUFSIZE = 8
BUFSIZE = 32
crlf Deletes the carriage return/line feed characters during Send (90),
and appends them during Receive (91). Text data usually
contains a crlf character at the end of each line. If you delete these
characters the file will be easier to read
lrecl n Specifies that the host file contains fixed-length records. If strings
are shorter than n, the buffers will be padded with space
characters. Send File (90) only.
recfm f Specifies that the file will contain variable length records.
HLLAPI Reference
Parameter Description
[d:] Defines a drive for the PC file to be sent to or received from. If you dont
specify the drive, file transfer defaults to the current drive.
[path] Path for the PC file to be sent or target file to be received.
filename File name of the file to be sent or received.
[.ext] File extension of the file to be sent or received..
w: Sessions short name for a TSO session (followed by a colon) for sending or
receiving files. A letter between A - Z. If you dont, the host session in focus
would be the target.
w: The target session's short name in which you have established a TSO session
(followed by a colon) for sending or receiving files. For example, in session
Session1, A would be the session's short name. If not specified, the first
open mainframe session would be the target.
dsn TSO dataset name you assign to the file when you send it to the host session,
or the TSO dataset name of the file to be received on the PC session.
[(member)] Optional parameter that tells TSO to save (when sending), or if the file was
saved (when receiving) as a partitioned dataset. Partitioned dataset files
save mainframe disk space.
[lpw] Send File (90)
The parameter tells TSO to be password protected. You must create a
password if you want your file protected.
Option Description
append Appends a transferred file to the end of an existing file. append overrides
specified values for the lrecl and recfm options.
ascii Converts ASCII to EBCDIC when EHLLAPI sends a file to the host session,
and converts EBCDIC to ASCII when the PC session receives a file from the
host session. If the file is a text file, ASCII mode is recommended.
crlf Deletes the carriage return/line feed characters during Send (90), and
appends them during Receive (91). Text data usually contains a crlf
character at the end of each line. If you delete these characters the file
will be easier to read
lrecl n Specifies that the host file contains fixed-length records. If strings are
shorter than n, the buffers will be padded with space characters. Send File
(90) only.
blksize(n) Block size of the host file dataset, where n is the length in bytes of a data
block. If you omit blksize, the default is lrecl + 4 for new files. If you are
appending or replacing a dataset, blksize is ignored. Send File (90) only.
recfm(f) The host file will contain fixed-length records. Records are padded with
space characters if they are shorter than that specified with lrecl or the
default length.
recfm(u) Records of undetermined length. Send File (90) only.
recfm(v) Records of variable length records.
-B Do not use structured fields.
-S Structured field file transfer.
space Amount of space to be allocated for a new dataset.
98 Reflection for IBM HLLAPI Reference
HLLAPI Reference
The table below shows the valid AID keys for 3270, 5250, and asynchronous sessions.
3270 AID keys 5250 AID keys Asynchronous AID keys
Attn Clear Function keys
Clear Enter Enter
Cursor Select PF keys Numlock
Enter Help Number Pad /
PF keys PA1 - PA3 Number Pad *
PA1 - PA3 Page Down Number Pad -
System Request Page Up
Print
System Request
Test Request
Reflection for IBM HLLAPI Reference 99
HLLAPI Reference
Byte Description
X0002 WINDOWSTATUS_MOVE
Move the window x or y position (not valid with minimize, maximize, size,
or restore).
X0004 WINDOWSTATUS_ZORDER.
Specifies ZORDER placement.
X0008 WINDOWSTATUS_SHOW
Set the window to visible.
100 Reflection for IBM HLLAPI Reference
Byte Description
X0010 WINDOWSTATUS_HIDE
Set the window to invisible.
X0080 WINDOWSTATUS_ACTIVATE
Activate the window. Use the _ZORDER, otherwise set focus to the window
and place it in the foreground.
X0100 WINDOWSTATUS_DEACTIVATE
Deactivate the window. Use the _ZORDER placement if specified, otherwise
place it in the background.
X0400 WINDOWSTATUS_MINIMIZE
Set the window to minimized (not valid with maximize, restore, size, or move).
X0800 WINDOWSTATUS_MAXIMIZE
Set the window to maximized (not valid with minimize, restore, size, or move).
X1001 WINDOWSTATUS_RESTORE
Restore the window (not valid with maximize, minimize, size, or move).
Bytes 5-6 Specifies the x-coordinate of the upper-left corner of the window. Ignored if
the move option is not set.
Bytes 7-8 Specifies the y-coordinate of the upper-left corner of the window. Ignored if
the move option is not set
Bytes 9-10 Specifies the X window size (width).
Bytes 11-12 Specifies the Y window size (height)
Byte Description
Byte 1 Short name session ID of the desired host session, or space or null for the
current host session.
Byte 2 X02 WINDOWSTATUS_QUERY for query status.
Reflection for IBM HLLAPI Reference 101
Byte Description
X0001 WINDOWSTATUS_SHOW
The window is visible.
X0001 WINDOWSTATUS_HIDE
The window is invisible.
X0001 WINDOWSTATUS_ACTIVATE
The window is activated.
X0001 WINDOWSTATUS_DEACTIVATE
The window is deactivated.
X0001 WINDOWSTATUS_MINIMIZE
The window is minimized.
X0001 WINDOWSTATUS_MAXIMIZE
The window is maximized.
Bytes 5-6 Specifies the x-coordinate of the upper-left corner of the window. Ignored
if the move option is not set.
Bytes 7-8 Specifies the y-coordinate of the upper-left corner of the window. Ignored
if the move option is not set
Bytes 9-10 Specifies the X window size (width).
Bytes 11-12 Specifies the Y window size (height)
Bytes 13-16 Specifies the z-order placement of the window (only valid for the set
option when the _ZORDER option is specified). Valid values are:
X0001 WINDOWSTATUS_FRONT
Place window in front.
X0001 WINDOWSTATUS_BACK
Place window in back.
102 Reflection for IBM HLLAPI Reference
X0001 WINDOWSTATUS_SHOW
The window is visible.
X0001 WINDOWSTATUS_HIDE
The window is invisible.
X0001 WINDOWSTATUS_ACTIVATE
The window is activated.
X0001 WINDOWSTATUS_DEACTIVATE
The window is deactivated.
X0001 WINDOWSTATUS_MINIMIZE
The window is minimized.
X0001 WINDOWSTATUS_MAXIMIZE
The window is maximized.
Bytes 5-6 Specifies the current font height. The size assumes a fixed-pitch font
including any inter-column spacing (this value times the number of
displayed columns should equal the width of the presentation space).
Bytes 7-8 Specifies the current font width. The size includes any inter-line spacing
(this value times the number of displayed rows should equal the height of
the presentation space).
Reflection for IBM HLLAPI Reference 103
Bytes 9-10 Specifies the distance from the left edge of the window to the first
displayed column of the host screen, or zero if the host presentation
space exactly fits the window.
Bytes 11-12 Specifies the distance from the top of the window to the first displayed
row of the host screen, or zero if the host presentation space exactly fits
the window.
Bytes 13-14 Specifies the number of the first visible row of the presentation space.
This is normally one unless only a portion of the presentation space is
visible in the window.
Bytes 15-16 Specifies the number of the first visible column of the presentation space.
This is normally one unless only a portion of the presentation space is
visible in the window.
Bytes 17-20 Specifies the window handle of the emulator session. For Win16 handles,
only positions 17-18 are used.
104 Reflection for IBM HLLAPI Reference
HLLAPI Reference
This table is used when your application is calling Send Key (3) or Get Key (51).
Meaning Mnemonic
@ @@
Alt @A
Alt Cursor @$
Attention @A@Q
Backspace @<
Backtab (Left Tab) @B
Clear @C
Cmd (function) Key @A@Y
Cursor Down @V
Cursor Left @L
Cursor Right @Z
Cursor Select @A@J
Cursor Up @U
Delete @D
Dup @S@x
End @q
Enter @E
Erase EOF @F
Erase Input @A@F
Field Exit @A@E
Field Mark @S@y
Field - @A@-
Reflection for IBM HLLAPI Reference 105
Meaning Mnemonic
Field + @A@+
Help @H
Hexadecimal @A@X
Home @0 (zero)
Insert @I
Insert Toggle @A@I
Local Print @P
New Line @N
Page Up @u
Page Down @v
Print (PC) @A@t
Print Screen @A@T
Record Backspace @A@<
Reset @R
Shift @S
Sys Request @A@H
Tab (Right Tab) @T
Test @A@C
PA1 @x
PA2 @y
PA3 @z
PA4 @+
PA5 @%
PA6 @&
PA7 @
PA8 @(
106 Reflection for IBM HLLAPI Reference
Meaning Mnemonic
PA9 @)
PA10 @*
PF1/F1 @1
PF2/F2 @2
PF3/F3 @3
PF4/F4 @4
PF5/F5 @5
PF6/F6 @6
PF7/F7 @7
PF8/F8 @8
PF9/F9 @9
PF10/F10 @a
PF11/F11 @b
PF12/F12 @c
PF13/F13 @d
PF14/F14 @e
PF15/F15 @f
PF16/F16 @g
PF17/F17 @h
PF18/F18 @i
PF19/F19 @j
PF20/F20 @k
PF21/F21 @l
PF22/F22 @m
PF23/F23 @n
PF24/F24 @o
Reflection for IBM HLLAPI Reference 107
EHLLAPI Reference
WinHLLAPI Reference
HLLAPI Reference
WinHLLAPI Function
Description
The Connect Presentation Space function connects and links a WinHLLAPI application to an
RIBM Presentation Space (PS). Reflection allows up to 16 RIBM presentation spaces to be run
simultaneously.
Prerequisite
An RIBM presentation space must be configured with a unique short name before any
WinHLLAPI applications can connect to it.
Function Calls
WORD WinHLLAPI(
LPWORD CONNECTPS, // Pointer to function number
LPSTR lpbyString, // Pointer to length string
LPWORD lpwLength, // Pointer to length
LPWORD lpwReturnCode) ; // Pointer to return code
Call Parameters
Your client application program must pass the following parameters to this function:
Function number 1
Data string A letter of the alphabet (A-Z) which represents the RIBM
presentation space short name.
Data length Not applicable.
PS position Not applicable.
112 Reflection for IBM HLLAPI Reference
Return Codes
Remarks
Connect Presentation Space (1) connects you to one RIBM presentation space. If a HLLAPI
application tries to connect to a new RIBM presentation space while already connected, the
application will be disconnected and then the application will attempt to connect to the new
RIBM RIBM presentation space. The application will be disconnected from the old RIBM
presentation space even if ConnectPS does not complete successfully.
The following functions disconnect the client application from the connected RIBM
presentation space:
The functions below require that client programs first make a prerequisite call to the Connect
Presentation Space function.
WinHLLAPI Function
Description
The Disconnect Presentation Space (2) function disconnects your client application from its
currently connected RIBM presentation space.
After calling this function, you cannot call functions that depend on a connection to an RIBM
presentation space. You will be automatically disconnected from your currently connected RIBM
presentation space when you connect to another presentation space.
WORD WinHLLAPI(
LPWORD DISCONNECTPS, // Pointer to function number
LPSTR lpbyString, // Pointer to data string
LPWORD lpwLength, // Pointer to length
LPWORD lpwReturnCode) ; // Pointer to return code
Call Parameters
Function Number 2
Data String Not applicable
Length Not applicable
PS Position Not applicable
Return Codes
Remarks
Disconnect Presentation Space (2) does not restore the values in Set Session Parameters (9) when
you exit the client application. You may call the Set Session Parameters (9) or Reset System (21)
function to restore to the default values.
WinHLLAPI Function
Description
Send Key (3) is used to send a string of up to 255 keystrokes to the currently connected RIBM
presentation space as if they had been entered by an operator. The keyboard must be unlocked
and not in a busy state. Send Key (3) allows sessions to exchange keystrokes that are not available
from the keyboard, or are not represented by an ASCII value. For example, an operator may not
be able to produce the keystrokes necessary for a session, so Send Key (3) can produce the appro-
priate keystroke.
Prerequisite
Connect Presentation Space (1).
Function Calls
WORD WinHLLAPI(
Call Parameters
Function Number 3
Data String A string of maximum 255 characters including keystrokes and ASCII
mnemonics which the client sends to host presentation space.
Length String length, if STRLEN is used. Not used if STREOT option is used
and in such case, the string must end with an EOT.
PS Position Not applicable.
116 Reflection for IBM HLLAPI Reference
Return Codes
Remarks
You can use all keyboard combinations to represent a string sent to the RIBM presentation space,
including 3270 and 5250 function keys in ASCII mnemonics, by using an escape character
(default value is @) followed by the appropriate key code.
Each key code represents the actual key that is being sent. When sending text keystrokes, be sure
the codes are entered just as you want them to be received, including the correct case.
If your keystroke string is longer than 255 characters, which is the Send Key functions limit, you
can use several calls to the Send Key (3) function. If you need to send numerous keystrokes, it is
faster to use Copy String to Presentation Space (15) or Copy String to Field (33). An efficient way
to send data to the RIBM presentation space is to first use the Copy String to Presentation Space
(15) to send a large amount of text and then finish the string with another call to Send Key (3) to
send the AID. Use the Query Field Attribute (14) function to check the status of the receiving
field.
To ensure that the keyboard is not locked, your application may call the Wait (4) function.
After the first AID key is sent, keystrokes are no longer accepted and the rest of the string is
ignored.
The following Set Session Parameters (9) values affect this function:
AUTORESET/NORESET
STRLEN/STREOT
EOT=c
ESC=c
Reflection for IBM HLLAPI Reference 117
WinHLLAPI Function
Wait (4)
Description
The Wait (4) function determines whether the RIBM presentation space can accept keystrokes
from a HLLAPI application. The Wait (4) function can be used to query the current status on
the XCLOCK and/or XSYSTEM parameter of the OIA.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
LPWORD WAIT, // Pointer to function number
LPSTR lpbyString, // Pointer to data string
LPWORD lpwLength, // Pointer to length
LPWORD lpwReturnCode) ; // Pointer to return code
WinHLLAPIAsync(hWnd,WAIT,lpbyString,lpwLength,lpwReturnCode)
Call Parameters
Function Number 4
Data String Not applicable.
Length Not applicable.
PS Position Not applicable.
118 Reflection for IBM HLLAPI Reference
Return Codes
Asynchronous Mode
In async mode, the control returns to the client and the presentation space will inform the client
through windows message registered using RegisterWIndowMessage with WinHLLAPIAsync.
An asynchronous Wait (4) call immediately returns control to your WinHLLAPI application,
releasing the application to do other tasks while waiting. However if NWAIT is specified, the
WinHLLAPI Async call will word same the same as WinHLLAPI. Look at the Async event for
more details.
Remarks
The Wait (4) function by itself may not be a sufficient method for determining when the host is
ready for input. To verify that the correct host panel is displayed on RIBM presentation space,
you might want to search for specific keywords or prompts, using the Search Field (30) function,
Query Cursor Location (7) function, or Search Presentation Space (6) function.
Reflection for IBM HLLAPI Reference 119
WinHLLAPI Function
Description
The Copy Presentation Space (5) function copies the contents of the entire RIBM presentation
space into a string buffer. The size of the buffer will be the size of the RIBM presentation space
unless you decide to copy extended attributes (EABs) where it will be more. If you decide to
copy EABs, the string length must be at least twice the size of the RIBM presentation space to
fit the EAB values into the buffer.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 5
Data String The data buffer defined in the client application program should
be as large as the RIBM presentation space of the entire display
buffer. If EABs are set up to be copied, this buffer must be at least
double the size for the model.
Length Not applicable.
PS Position Not applicable.
Return Parameter
Contains the entire contents of the RIBM presentation space. The size of this parameter is
depends on the value you entered in the Data String parameter.
120 Reflection for IBM HLLAPI Reference
Return Codes
Remarks
Your client application can determine the size of the RIBM presentation space by calling Query
Sessions (10). To determine if EABs are set, can call Query Field Attribute (14).
If you need to copy only a field or a specific part of the RIBM presentation space, use Copy
Presentation Space to String (8) or Copy Field to String (34) instead.
Copy Presentation Space (5) translates the entire RIBM presentation space to ASCII code.
EABs and other characters not represented by an ASCII value are translated to blanks. To copy
EABs and ATTRIBs, set the Set Session Parameter, EAB and ATTRB parameter respectively.
The following Set Session Parameters (9) values affect this function:
ATTRB/NOATTRB
EAB/NOEAB
XLATE/NOXLATE
The following HLLAPI Style Bits effect this function: Propogate EAB, Wait a Second, Translate
5250 Attributes to 3270, and Always Blank. See HLLAPI Style Bit topic in R8win.hlp for more
information.
Reflection for IBM HLLAPI Reference 121
WinHLLAPI Function
Description
The Search Presentation Space (6) function looks for the specified string. The search can start
from a specified position on the RIBM presentation space and scan forward or backward from
that position. The method of scanning is specified by Set Session Parameters (9), SRCHALL,
SRCHFROM, SCRCHFRWD, SRCHBKWD.
This function is useful if you are looking for a particular keyword on a host screen.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 6
Data String Data string to search for, which you define in the client
program. Note that the string is case sensitive; upper and
lower case letters need to be an exact match.
Length Target buffer length.
PS Position RIBM presentation space position where to start the search
function (SRCHFRWD), or to end (SRCHBKWD). If
SRCHALL is set, this parameter is ignored.
122 Reflection for IBM HLLAPI Reference
Return Parameters
This function returns a length parameter.
Length:
Return Codes
Remarks
The Search Presentation Space (6) function searches for a specific host string, a panel, or a
message from the host on the RIBM presentation space. If your client application requires a
specific panel or message before sending data back to the host, you can use Search Presentation
Space (6) to find the string.
Use this function in conjunction with the Wait (4) function to determine whether the host
application is ready for input. First wait for input enable, then search for the correct host panel
defining a key string with Search Presentation Space (6).
This function is case-sensitive. The string you look for must be an exact match.
The following Set Session Parameters (9) values affect this function:
SRCHALL/SRCHFROM
SCRCHFRWD/SRCHBKWD
Reflection for IBM HLLAPI Reference 123
WinHLLAPI Function
Description
The Query Cursor Location (7) function returns the cursor position in the currently connected
RIBM presentation space.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 7
Data String Not applicable.
Length Not applicable.
PS Position Not applicable.
Return Parameter
Length: RIBM presentation space position of the cursor location.
Return Code
Remarks
This function is useful in conjunction with the Wait (4) function to synchronize with the host
application panel appropriate for next input.
WinHLLAPI Function
Description
The Copy Presentation Space (8) to String function copies the RIBM presentation space to a
string in your client application.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 8
Data String Defined data string to hold the entire content of the RIBM presen-
tation space.
Since this function is copying from the RIBM presentation space to
a string, you must ensure that the buffer is large enough to hold the
data specified in the length parameter.
Length Length of the target data string to copy.
PS Position Position where the copying should begin.
Reflection for IBM HLLAPI Reference 125
Return Parameter
Data String Contents of the copied string from the RIBM presentation space.
Return Codes
Remarks
The upper left corner of the RIBM presentation space is defined as position 1 and the last
position is the maximum number of the presentation space.
The following Set Session Parameters (9) values affect this function:
ATTRB/NOATTRB
EAB/NOEAB
XLATE/NOXLATE
126 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Set Session Parameters function lets the WinHLLAPI client program specify default values
for several WinHLLAPI functions.
The values are divided into a number of sets which affect the WinHLLAPI functions.
The session parameters are reset using Reset System (21) function.
Prerequisites
None.
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 9
Data String A text string containing the session parameters. These parameter
can be contained in a list delimited by commas or spaces.
Length Length of source data string.
PS Position Not applicable.
Reflection for IBM HLLAPI Reference 127
NOATTR/ATTR
Specifies whether to translate character attributes to ASCII values or not. This parameter
affects Copy Presentation Space (5), Copy Presentation Space to String (8), and Copy Field to
String (34) functions.
Parameter Description
ATTRB Keep original values in their original EBCDIC code. Attribute bytes
are also returned.
NOATTRB (default) Translates non-ASCII values to blanks (20H).
EAB/NOEAB
Specifies if a copy function should include extended attributes (EABs). These functions are
used with Copy Presentation Space (5) , Copy Presentation Space to String (8), Copy String to
Presentation Space (15), and Copy Field to String (34).
Parameter Description
STREOT/STRLEN
Determines how the length of a data string is determined.
Parameter Description
EOT
The EOT character is used to define a EndOfText character in a data string. This function is
used in Send Key (3), Search Presentation Space (6), Copy String to Presentation Space (15),
Search Field (30), Copy String to Field (33), Send File (90) , and Receive File (91)
Parameter Description
EOT=char char is a character to specify the end of a data string. Binary 0 is the
default value. A blank is not accepted as EOT. This parameter is
used only if the STREOT option is used.
XLATE/NOXLATE
Specifies if EABs are translated to CGA format or not.
Parameter Description
CONLOG/CONPHYS
These parameters are ignored.
Esc Parameter
Specifies the Esc character. This parameter is used by Send Key (3) and Get Key (51).
Parameter Description
Reset Parameter
This parameter is used by Send Key (3) and Get Key (51).
Parameter Description
AUTORESET (default) Automatically sends Reset with strings with Send Key (3)
function to unlock the input inhibited condition that might exist.
NORESET Does not send a Reset in a data string.
Reflection for IBM HLLAPI Reference 129
SEARCHALL/SRCHFROM
Specifies how WinHLLAPI should search the RIBM presentation space. These parameters are
used with Search Presentation Space (6) and Search Field (30).
Parameter Description
SEARCHFRWD/SRCHBKWD
Parameter Description
TRON/TROFF
Specifies debug tracing. A file will be created in the TEMP directory (or windows directory if
the TEMP environment variable isn't set). The name of the file is Hll*.tmp, where the
wildcard segment is a random hex number between 0 and FFFFF. The file will be appended for
as long as that instance of the WinHLLAPI DLL is loaded in memory. Subsequent instances
will create
new files.
Wait Parameter
Specifies the characteristics of a wait period.
Parameter Description
TWAIT (default) For Wait (4), waits up to 60 seconds before timing out on
XCLOCK or XSYSTEM. For Get Key (51) TWAIT waits until a key is
in the buffer (normal or AID key based on Start Keystroke Intercept
(50) option, D or L )and then returns control to the client WinHLLAPI
program.
LWAIT For Wait (4), waits until XCLOCK/XSYSTEM clears on OIA. For Get
Key (51) LWAIT does not return control to your WinHLLAPI program
until it has intercepted a keystroke (normal or AID key based on Start
Keystroke Intercept (50) option, D or L ).
NWAIT No waiting period. For Wait (4) checks status and returns immediately
For Get Key (51) NWAIT checks status and returns error code 25
immediately, keystroke not available.
FPAUSE/IPAUSE
Specifies type of pause. This parameter is used by the Pause (18) function.
Parameter Description
FPAUSE Full pause. The HLLAPI client program can set the duration of the
pause in the Pause (18) function (default).
IPAUSE Interruptible pause; Start Host Notification (23) or any host system
event will end a pause.
NOQUIET/QUIET
Specifies whether the Send File (90) or Receive File (91) functions will send messages to the
RIBM presentation space and display them to the operator.
Parameter Description
TIMEOUT
Specifies the number of 30-second cycles WinHLLAPI waits before terminating the file transfer
with Ctrl+Break. This parameter is used with the Send File (90) or Receive File (91) functions.
Parameter Description
RESUME/NORESUME
Specifies how Connect Presentation Space (1) affects a DOS session.
Parameter Description
BLANK/NOBLANK
Specifies how Copy Presentation Space (5) and Copy Presentation Space to String affects
unknown values NOATTRIB and NOEAB are specified.
Parameter Description
NEWOIA/OLDOIA
Specifies in which format the Copy OIA (13) function returns its data.
Parameter Description
NEWRET / OLDRET
Specifies how the Query Cursor Location (7) function returns cursor position data.
Parameter Description
NEWRET Query Cursor Location (7) returns the cursor position in the
Length or Location parameter.
OLDRET Query Cursor Location (7) returns the cursor position in the
Return Code parameter.
Reflection for IBM HLLAPI Reference 133
Return Parameter
Return Codes
0 WHLLOK Successful.
2 WHLLPARAMETERERROR One or more unrecognized parameter values; all
recognized values accepted.
9 WHLLSYSERROR System error.
WinHLLAPI Function
Description
The Query Sessions function returns a 12 byte long data string for each started RIBM presen-
tation space. The data string contains information about RIBM presentation space names and
size of RIBM presentation space. It also returns a data length parameter which holds the
number of active RIBM presentation spaces.
Prerequisites
None.
Function Calls
WORD WinHLLAPI(
Call Parameters
Function Number 10
Data String Data string for session parameters.
Length 12 bytes * the number of started host RIBM presentation spaces.
Max size is 12 * 16 = 192.
PS Position Not applicable.
Return Parameter
Length The number of started host RIBM presentation spaces.
Return Codes
0 WHLLOK Successful.
2 WHLLPARAMETERERROR Invalid string length.
9 WHLLSYSERROR System error.
Reflection for IBM HLLAPI Reference 135
WinHLLAPI Function
Reserve (11)
Description
The Reserve function blocks an operator from entering any information on the RIBM presen-
tation space via the keyboard. You should use this function if you need total control of the
RIBM presentation space and need to prevent other input.
Prerequisite
Connect Presentation Space (1).
Function Call
WORD WinHLLAPI(
Call Parameter
Function Number 11
Data String Not applicable.
Length Not applicable.
PS Position Not applicable.
Return Code
Remarks
The Reserve (11) function is very useful when your application is sending a series of keystrokes
to a host panel, and you want to prevent the users from accessing the RIBM presentation space
until the transactions are completed.
Your WinHLLAPI application needs to unlock the RIBM presentation space with Release (12),
Disconnect Presentation Space (2), or Reset System (21) functions.
WinHLLAPI Function
Release (12)
Description
The Release function unlocks a RIBM presentation space that was locked using the Reserve
(11) function.
Prerequisite
Connect Presentation Space (1) and Reserve (10)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 12
Data String Not applicable.
Length Not applicable.
PS Position Not applicable.
Reflection for IBM HLLAPI Reference 137
Return Codes
Remarks
RIBM presentation space unlock also occurs automatically when the application program
disconnects from the reserved session with Disconnect Presentation Space (2), connects to
another session with Connect Presentation Space (1), or calls Reset System (21).
WinHLLAPI Function
Description
The Copy Operator Information Area function returns the contents of the operator infor-
mation area (OIA) from the currently connected RIBM presentation space. A 103-byte string
returns the data to your client WinHLLAPI application. The interpretation of the string is
different for a 3270 and a 5250 string.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 13
Data String A 103 byte long data string, pre-allocated in
your application program.
Length 103 bytes.
PS Position Not applicable.
Return Parameters
Data String: Data string containing the contents of the identified OIA. The OIA data string
contains the following information:
Byte:
1 OIA Format Byte. This byte is always 1 for 3270, and 9 for 5250.
2 - 81 OIA Image Groups. These bytes contain hexadecimal codes of the OIA
image symbols.
82 - 103 The OIA group indicators. An ASCII character string, which can be trans-
lated into graphics characters.
Reflection for IBM HLLAPI Reference 139
Bit 0 Reserved
Bit 1 APL
Bit 2 Kana
Bit 3 Alpha
Bits 4-7 Reserved
Group 3: Shift state
1 byte Data String position 84
Bit 0 User-selectable
Bit 1 Field inherit
Bits 2-7 Reserved
Group 6: Color group 1
1 byte Data String position 87
Bit 0 User-selectable
Bit 1 Field inherit
Bits 2-7 Reserved
Group 7: Insert
1 byte Data String position 88
Bit 0 Selected
Bits 1-7 Reserved
Group 11: Color group 2
1 byte (Data String position 96)
Bit 0 Selected
Bits 1-7 Reserved
Group 12: Communication error
1 byte Data String position 97
Bit 0 Reserved
Bit 1 Printer malfunction
Bit 2 Printer printing
Bit 3 Printer assignment
Bits 4-7 Reserved
Group 14: Graphics
1 byte Data String position 99 not used (reserved)
Group 15: Not used
1 byte Data String position 100 not used (reserved)
Group 16: Autokey play/record status
1 byte Data String position 101 not used (reserved)
Reflection for IBM HLLAPI Reference 143
Bits 0 Reserved
Bit 1 Keyboard Shift
Bits 2-7 Reserved
Group 4: Program System Support group 1
1 byte Data String position 85 not used (reserved)
Group 5: Highlight group 1
1 byte Data String position 86 not used (reserved)
Group 6: Color group 1
1 byte Data String position 87 not used (reserved)
Group 7: Insert
1 byte Data String position 88
WinHLLAPI Function
Description
The Query Field Attribute function is used to return a field attribute byte for a specific RIBM
presentation space position.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 14
Data String Not applicable.
Length Not applicable.
PS Position RIBM presentation space position.
Return Parameter
Length:
2 Unprotected/Protected
0 = Unprotected data field
1 = Protected field
3 A/N
0 = Alphanumeric data
1 = Numeric data only
4-5 I/SPD
00 = Normal intensity, pen not detectable
01 = Normal intensity, pen detectable
10 = High intensity, pen detectable
11 = Non-Display, pen not detectable
6 Reserved
7 MDT
0 = Field has not been modified
1 = Field has been modified
Return Codes
Remarks
This function is useful to determine the RIBM presentation space target field when you use the
following functions:
WinHLLAPI Function
Description
The Copy String to Presentation Space (15) function copies an ASCII data string to a defined
position on the RIBM presentation space.
Prerequisite
Connect Presentation Space (1)
Function Calls
WORD WinHLLAPI(
Call Parameter
Function Number 15
Data String A string of ASCII characters you want to copy into an
unformatted position on RIBM presentation space.
Length Contains the total length of the string to copy, including
EABs, if the EAB parameter is selected. This parameter is
ignored if you have selected the STREOT parameter using
Set Session Parameters (9).
PS Position RIBM presentation space position where copying begins.
Return Codes
Remarks
The data string must be the same size or smaller than the size of the RIBM presentation space
buffer size or the size of the target area.
Non-ASCII characters in the data string are translated into blanks in the RIBM presentation
space.
If EABs are set, the input string should contain the appropriate EABs following each ASCII
character.
This function is also affected by the STRLEN/STREOT and EOT option, defined in Set Session
Parameters (9).
To send AID keys to RIBM presentation space, use the Send Key (3) function. For example, the
most efficient way to send a host command to the host session is to send the ASCII string with
the Copy String to Presentation Space (15) function and then send the Enter AID key with the
Send Key (3) function.
The cursor location will not be updated with the Copy String to Presentation Space (15)
function. To copy to the current cursor position, use the Query Cursor Location (7), and place
the returning parameter value in the presentation space position parameter when you call this
function.
Reflection for IBM HLLAPI Reference 151
WinHLLAPI Function
Pause (18)
Description
The Pause (18) function is used to add a pause to a host session sequence. The function halts for
a specified amount of time, or until a host event satisfies the pause.
Prerequisites
A Start Host Notification (23) function call is required if the IPAUSE parameter is selected using
Set Session Parameters (9).
Function Call
WORD WinHLLAPI(
Call Parameter
Function Number 18
Data String Not applicable.
Length Sets the duration of the pause.
This parameter must be an integer between 0 and 65535.
The pause is set in half-second increments. For example, 1
= 0.5 seconds, 60 = 30 seconds, 120 = 1 minute (60
seconds), etc.
PS Position Not applicable.
152 Reflection for IBM HLLAPI Reference
Return Code
If your client application is not connected to a RIBM presentation space the pause will wait the
full duration, disregarding the pause parameter. If the IPAUSE parameter is selected using Set
Session Parameters (9), the pause queue needs to clear before next function call. To reset the
pause queue prior to the next Pause (18) function call, you must call the Query Host Update
(24) function.
The Pause (18) function is not a sufficient method to pause if you need to wait for long periods
of time. Do not use the Pause (18) function if your application needs to pause longer than 20
minutes. The Pause (18) function is not an exact timekeeper, and should not be used for
applications that require precise timing.
The following Set Session Parameters (9) values affect this function:
FPAUSE/IPAUSE
Reflection for IBM HLLAPI Reference 153
WinHLLAPI Function
Description
The Query System (20) function lets your WinHLLAPI application determine settings and other
values related to the system. The function returns a 35-byte long string with WinHLLAPI related
information such as version number, level number, date, etc.
Prerequisites
None.
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 20
Data String A 35-byte data string. The return parameter contains the
system information.
Length Not applicable (35 is implied).
PS Position Not applicable.
Return Parameter
This function returns a 35 byte long string with system information.
154 Reflection for IBM HLLAPI Reference
Data String
Bytes
Remarks
You must allocate a 35-byte string to receive the returning data string parameter. Depending
on which WinHLLAPI system you are querying, you will get different return bytes in the return
parameter. Refer to other WinHLLAPI suppliers for documentation regarding their return
parameters.
Reflection for IBM HLLAPI Reference 155
WinHLLAPI Function
Description
The Reset System (21) function reinitializes the WinHLLAPI to its starting state. This function
can also be used to ensure that WinHLLAPI is loaded.
You can use this function when you start or terminate your WinHLLAPI program.
Prerequisites
None.
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 21
Data String Not applicable.
Length Not applicable.
PS Position Not applicable.
Return Codes
Remarks
The system resets the following:
In the beginning of an application you can restore values with Reset (21) and ensure that
WinHLLAPI is loaded. If WinHLLAPI is not loaded, a return code 1 WHLLNOTCON-
NECTED will be returned.
Reset System (21) should be used very sparingly, i.e. during startup only; to restore any
changed session parameters, use Set Session Parameters (9) to change them instead.
Reflection for IBM HLLAPI Reference 157
WinHLLAPI Function
Description
The Query Session Status (22) function returns information about a RIBM presentation space.
The function returns the status information in an 18-byte data string.
The following information is included in the return parameter of Query Session Status (22).
Session type
Session usage
Call Parameters
Function Number 22
Data String 18 bytes. The first byte must be either:
a letter A-Z, which indicates the RIBM presentation
space short name.
a (space) which indicates the currently connected
RIBM presentation space.
158 Reflection for IBM HLLAPI Reference
Length 18 bytes.
PS Position Not applicable.
Return Parameter
Data String:
D = 3270 Host.
F = 5250 Host.
Bit 0: 0 = No EABs.
1 = EABs are on.
16 - 18 Not applicable.
Return Codes
Remarks
The values for Rows and Columns returned in byte 12-15 correspond to the RIBM presentation
space buffer size depending on the model.
Reflection for IBM HLLAPI Reference 159
WinHLLAPI Function
Description
The Start Host Notification (23) function starts monitoring the RIBM presentation space or
operator information area for updates. Following this call, your application must call the Query
Host Update (24) function to check when the host updated the RIBM presentation space or OIA.
Prerequisites
None.
Function Call
WORD WinHLLAPI(
WinHLLAPIAsync(hWnd,STARTHOSTNOTIFICATION,lpbyString,lpwLength,lpwReturnCode)
Call Parameters
Function Number 23
Data String A six-byte long string.
1 RIBM presentation space short name, or blank or null (request
against the currently connected RIBM presentation space).
2 One of the following characters:
B = Both. Notification of OIA and presentation space updates.
O = Notification of any OIA updates.
P = Notification of any RIBM presentation space updates.
3-6 Ignored by WinHLLAPI.
Length 6
PS Position Not applicable.
160 Reflection for IBM HLLAPI Reference
Return Codes
Asynchronous Mode
Start Host Notification (23) can also be called asynchronously using WinHLLAPIAsync. If
successful, a client is notified of any subsequent host updates by windows messages which
must be registered using RegisterWindowsMessage( ) with WinHLLAPIAsync. Please see
WinHLLAPIAsync for details.
Remarks
The Copy OIA (13) function is a superior way of ensuring that the host has completed
processing and that the RIBM presentation space is ready for input. To be sure the correct
host panel is displayed, call Search Presentation Space (6) and search for a keyword within the
panel.
Reflection for IBM HLLAPI Reference 161
WinHLLAPI Function
Description
The Query Host Update (24) function allows your application to determine if the host has
updated the RIBM presentation space, or operator information area (OIA) since:
The queried RIBM presentation space must be specified in the data string, but your EHLLPI
application program does not need to be connected to current the RIBM presentation space
for updates.
Prerequisites
Your application must call the Start Host Notification (23) function before calling this
function.
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 24
Data String One character A-Z short name for the RIBM presentation space. A
space indicates a request for updates to the requested RIBM presen-
tation space.
Length Not applicable (1 is implied).
PS Position Not applicable.
162 Reflection for IBM HLLAPI Reference
Return Codes
Remarks
To disable the Query Host Update (24) function, and stop monitoring updates, you must call
the Stop Host Notification (25) function.
The Stop Host Notification (25) function ends the Query Host Update function (24).
Reflection for IBM HLLAPI Reference 163
WinHLLAPI Function
Description
The Stop Host Notification (25) function disables the capability of the Query Host Update (24)
function to determine if the host RIBM presentation space or OIA has been updated. This
function can also be used to stop host events from affecting the Pause function.
Prerequisites
Start Host Notification (23)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 25
Data String Short name of the RIBM presentation space or blank or null
indicating a request for the current RIBM presentation space.
Length Not applicable (1 is implied).
PS Position Not applicable.
Return Codes
Asynchronous Mode
This function will also stop any asynchronous host updates, i.e. stop sending messages, which
had been started using WinHLLAPIAsync.
164 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Search Field (30) function searches for a text string in protected or unprotected fields of
the RIBM presentation space. When the specified text string is found, the function returns the
RIBM presentation space position.
This function is case-sensitive and requires an exact match of the text string parameter and the
RIBM presentation space content.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 30
Data String Text string to search presentation. End the string with EOT if the client
uses STREOT. See Set Session Parameters (9).
Length Specifies the length of the string you are searching. Not applicable if
EOT is used to end the string.
PS Position Specifies the beginning RIBM presentation space position to search
from. If SRCHFROM is set, it also specifies the position within the field.
Reflection for IBM HLLAPI Reference 165
Return Parameters
Length:
Return Codes
Asynchronous Mode
This function is not supported in asynchronous mode
Remarks
The following Set Session Parameters (9) values affect this function:
Search Parameters
SRCHALL/SRCHFROM
SCRCHFRWD/SRCHBKWD
166 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Find Field Position (31) function returns the position of a target field at the currently
connected RIBM presentation space. This function is useful for searching for either protected
or unprotected fields in a field formatted RIBM presentation space.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 31
Data String Defines the field type.
[space] [space] This field ( )
T[space] This field ("T ")
N[space] Next field ("N ") either protected or unprotected
P[space] Previous field (P ) either protected or unprotected
NP Next protected field ("NP")
NU Next unprotected field ("NU")
PP Previous protected field ("PP")
PU Previous unprotected field ("PU")
Length Not applicable (2 is implied).
PS Position Contains the RIBM presentation space position in a field where the
function starts the search.
Reflection for IBM HLLAPI Reference 167
Return Parameters
Length:
0 If return code 28: No such field found. If return code 24: unformatted
host RIBM presentation space.
>0 The returning length is the starting RIBM presentation space position
where the field was found, defined as the first position after the
attribute byte.
Return Codes
Remarks
Query Field Attribute (14) returns the field attribute bytes value, and it can also detect an
unformatted RIBM presentation space. If the return parameter length is 0, the RIBM presen-
tation space is unformatted.
168 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Find Field Length (32) function searches the RIBM presentation space for a protected or
unprotected field and returns the field length.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameter
Function Number 32
Data String Specifies which field you want to search.
[space] [space] This field ( )
T[space] This field (T )
N[space] Next field (N ) either protected or unprotected
P[space] Previous field (P ) either protected or unprotected
NP Next protected field (NP)
NU Next unprotected field (NU)
PP Previous protected field (PP)
PU Previous unprotected field (PU)
Length Not applicable (2 is implied).
PS Position Contains the presentation space position where you want to start
the search.
Reflection for IBM HLLAPI Reference 169
Return Parameters
Length:
0 If return code 28: No such field found. If return code 24: unformatted host
RIBM presentation space.
>0 Length of the field.
Return Codes
Remarks
The Find Length (32) function returns the number of characters in the requested field in
the RIBM presentation space. The characters are calculated from the start of the target field
including the character before the next attribute byte.
The Find Length (32) function does not wrap, so if a field extends from the end to the beginning
of the RIBM presentation space, this function returns the length from the field origin to the end
of the RIBM presentation space.
If the field attribute is at the end of the RIBM presentation space, the field is assumed to have a
length of zero.
If two field attributes are positioned together, the field length in between them is assumed to
be zero.
Query Field Attribute (14) is useful for finding the current modified or protected field.
170 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Copy String to Field (33) function copies a string of characters, defined in your client
application, into a specific unprotected field in the RIBM presentation space. It can only be
used in a field-formatted RIBM presentation space with unprotected fields.
Prerequisite
Connect Presentation Space (1).
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 33
Data String String of data in your application program you want to copy to
the RIBM presentation space. End string with EOT if STREOT is
specified. See Set Session Parameters (9).
Length Length of data. Applicable only if STRLEN is used.
PS Position Position on RIBM presentation space where the string will be
copied. The function transfers the string and places it in the
beginning of the unprotected field.
Return Codes
Remarks
The copy operation ends when one of the following conditions is met:
Note that the Copy String to Field (33) function cannot copy non-ASCII characters or AID keys
to a field. Your application must use the Send Key (3) function to supply AID keys to a RIBM
presentation space.
172 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Copy Field to String (34) function copies ASCII characters from a protected or unpro-
tected field in the RIBM presentation space to a string defined in your application. The RIBM
presentation space must be field-formatted.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameter
Function Number 34
Data String String to which the program copies the contents of the field.
Length Length of the field. If the field contains EABs, then the length
must be twice the length of the field.
PS Position Any position within the field of the RIBM presentation space.
The copying will always start from the beginning of the field.
Return Parameter
Data String: This string contains the data that was copied from the field. The first byte of the
returned string contains the start byte of the field in the RIBM presentation space. The length
of this string is either the number of bytes in the specified field, or the number of bytes
specified
in the Length parameter. If the Length parameter is shorter than the actual string, the function
returns an error code (6), and the string is truncated.
Reflection for IBM HLLAPI Reference 173
Return Codes
Remarks
You can specify a presentation space Position anywhere within the field; the copy operation
starts from the beginning of a protected or unprotected field. If your application specifies a
position in the middle of a field the function copies the string from the beginning of that field.
Copy Field To String (34) transfers the string from the beginning of the field to the length
specified in the Length parameter.
Use Find Field Position (31) to find the fields position on the RIBM presentation space and Find
Field Length (32) to calculate the fields length, and then use the return parameters for these
functions in the Data String and Length parameters.
The copy operation ends when one of the following conditions is met:
ATTRB/NOATTRB
EAB/NOEAB
XLATE/NOXLATE
The Copy Field to String (34) function usually translates characters into ASCII, attributes are
translated to blanks.
174 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Display Cursor (37) function displays the cursor at a specified location in the RIBM presen-
tation space.
Prerequisite
None.
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 37
Data String Presentation space short name.
Length Not applicable.
PS Position Desired cursor position in the RIBM presentation space.
Return Codes
Remarks
The difference between Set Cursor (40) and Display Cursor (37) is that Display Cursor (37)
also takes Data String parameter where a short name is specified, and it does not have
Connect Presentation Space (1) as a prerequisite, Set Cursor (40), however, does not need the
short name but you must call Connect Presentation Space (1) to execute it.
WinHLLAPI Function
Description
The Set Cursor (40) function puts the cursor at a desired location in the RIBM presentation
space.
Prerequisite
Connect Presentation Space (1)
Function Call
WORD WinHLLAPI(
Call Parameter
Function Number 40
Data String Not applicable.
Length Not applicable.
PS Position Desired cursor position in the RIBM presentation space.
176 Reflection for IBM HLLAPI Reference
Return Codes
WinHLLAPI Function
Description
The Start Close Intercept (41) function intercepts a close request, when the user selects the close
option from the emulator.
WORD WinHLLAPI(
LPWORD STARTCLOSEINTERCEPT, // Pointer to function number
LPSTR lpbyString, // Pointer to data string
LPWORD lpwLength, // Pointer to length
LPWORD lpwReturnCode) ; // Pointer to return code
WinHLLAPIAsync(hWnd,STARTCLOSEINTERCEPT,lpbyString, lpwLength,lpwReturnCode)
Reflection for IBM HLLAPI Reference 177
Call Parameters
Function Number 41
Data String a letter A-Z, which indicates the RIBM presentation space short
name.
a (space) which indicates the currently connected RIBM
presentation space.
Length 1
PS Position Not applicable.
Return Codes
Asynchronous Mode
Start Close Intercept (41) can also be called asynchronously using WinHLLAPIAsync. If
successful, a client is notified of any subsequent host updates by windows messages which
must be registered using RegisterWindowsMessage( ) with WinHLLAPIAsync.
Remarks
Reset system will remove the close intercept.
178 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Query Close Intercept (42) function returns a code that determines that the user tried to
close the application.
Prerequisite
Start Close Intercept (41)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 42
Data String a letter A-Z, which indicates the RIBM presentation space
short name.
a (space) which indicates the currently connected RIBM
presentation space.
Length 1
PS Position Not applicable.
Reflection for IBM HLLAPI Reference 179
Return Codes
WinHLLAPI Function
Description
The Stop Close Intercept (43) function turns off the Start Close Intercept (41) function and the
user can use the close function.
Prerequisite
Start Close Intercept (41)
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 43
Data String a letter A-Z, which indicates the RIBM
presentation space short name.
a (space) which indicates the currently
connected RIBM presentation space.
Length Not applicable.
PS Position Not applicable.
Return Codes
WinHLLAPI Function
Description
The Start Keystroke Intercept (50) function starts a process with a set of four functions that
can capture and filter keystrokes entered by a terminal operator. The intercepted keystrokes
may be received through Get Key (51), accepted, or rejected by sending a beep message with
the Post Intercept Status. A keystroke can then be replaced with another keystroke using the
Send Key (3) function. Your application can stop and disable the process by calling Stop
Keystroke Intercept (53).
Prerequisite
None.
Function Call
WORD WinHLLAPI(
WinHLLAPIAsync(hWnd,STARTKSINTERCEPT,lpbyString,lpwLength,lpwReturnCode)
Call Parameter
Function Number 50
Data String
1 a letter A-Z, indicating the HLLAPI short name.
a (space) which indicates the currently connected
RIBM presentation space.
2 Option code character.
182 Reflection for IBM HLLAPI Reference
Return Codes
Asynchronous Mode
Start Keystroke Intercept (50) can also be called asynchronously using WinHLLAPIAsync. If
successful, a client is notified of any subsequent host updates by windows messages which
must be registered using RegisterWindowsMessage( ) with WinHLLAPIAsync. Please see
WinHLLAPIAsync for details.
Remarks
Your application can intercept keystrokes for more than one RIBM presentation space at a time.
If you need to use Send Key (3) to send keystrokes to intercepted RIBM presentation space, the
WinHLLAPI requires a call to Connect Presentation Space (1).
WinHLLAPI Function
Description
The Get Key (51) function allows your application to receive the AID keystrokes or all keystrokes
for the sessions that were specified with Start Keystroke Intercept (50).
Prerequisites
Prior call to Start Keystroke Intercept (50).
Function Call
WORD WinHLLAPI(
Call Parameter
Function Number 51
Data String String containing 8 bytes.
1 a letter A-Z, indicating the RIBM presentation space
short name.
a (space) which indicates the currently connected
RIBM presentation space.
2-8 Spaces to receive data in the return parameter.
Length 8 characters.
PS Position Not applicable.
Return Parameters
Return Codes
Remarks
When a keyboard queue overflow resulting in an error code (31) occurs, you may increase the
value of the calling length parameter for Start Keystroke Intercept (50), or call the Get Key (51)
function repeatedly to eliminate the error.
If LWAIT has been specified, Get Key (51) will not return control to the application until there
are keystrokes in the buffer.
The following Set Session Parameters (9) values affect this function:
TWAIT/LWAIT/NWAIT
ESC=char
The return parameter contains a RIBM presentation space short name identification, a code
character, and an allocated buffer used for keystroke buffer queues. Below are some examples
and a breakdown of this buffer:
DAc:
AM@4:
ES@A@2:
WinHLLAPI Function
Description
The Post Intercept Status (52) function analyzes a keystroke and either accepts or rejects it.
If the function rejects the keystroke through Get Key (51), it sounds a beep.
Prerequisite
Start Keystroke Intercept (50).
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 52
Data String 2-byte data string.
1 One of the following:
a letter A-Z, which indicates RIBM presentation
space short name.
a (space) which indicates for the currently
connected RIBM presentation space.
2 A = Accepted keystroke.
R = Rejected keystroke (beep).
Length Not applicable (2 is implied).
PS Position Not applicable.
Reflection for IBM HLLAPI Reference 187
Return Codes
WinHLLAPI Function
Description
The Stop Keystroke Intercept (53) function ends the ability to intercept keystrokes in the RIBM
presentation space. When the function is successful, the terminal operator keystrokes return to
normal, and no keystrokes will be intercepted.
Prerequisite
Start Keystroke Intercept (50).
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 53
Data String One of the following:
a letter A-Z, which indicates presentation short name.
a (space) which indicates for the currently
connected RIBM presentation space.
Length Not applicable (1 is implied).
PS Position Not applicable.
Return Codes
WinHLLAPI Function
Description
The Send File (90) function transfers a file from your PC to the host RIBM presentation space
using the ind$file host file transfer function.
Prerequisite
None.
Function Call
WORD WinHLLAPI(
WinHLLAPIAsync(hWnd,SENDFILE,lpbyString,lpwLength,lpwReturnCode)
Call Parameters
Function Number 90
Data String Send command string. Maximum 128 bytes. Click here for a
complete description of the data string syntax for VM/CMS
systems or here for VMS/TSO systems.
Length Length of parameters string, or EOT if EOT mode is selected.
PS Position Not applicable.
190 Reflection for IBM HLLAPI Reference
Return Code
Asynchronous Mode
1. In this mode, the session initiates a file Xfr and immediately returns control to the calling
application.
2. The calling application should not issue any more WinHLLAPI calls while the file Xfr is in
progress.
Remarks
You can send a file to CMS, TSO, and CICS systems. Send File (90) does not support AS/400
file transfers.
The target host RIBM presentation space must be ready to receive the file, which means that
you should be logged on to the host computer, have the keyboard enabled, have no other file
transfer running at the same time to the same RIBM presentation space, and have the system
prompt displayed.
The following Set Session Parameters (9) values affect this function:
QUIET/NOQUIET
STRLEN/STREOT
TIMEOUT=c/TIMEOUT=0
EOT=c
192 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Receive File (91) function transfers a file from the host RIBM presentation space to the PC
using the ind$file host file transfer function.
Prerequisites
None.
Function Call
WORD WinHLLAPI(
WinHLLAPIAsync(hWnd,RECEIVEFILE,lpbyString,lpwLength,lpwReturnCode)
Call Parameters
Function Number 91
Data String Receive command string. Maximum 128 bytes. Click here for
a complete description of the data string syntax for VM/CMS
systems or here for VMS/TSO systems.
Length Length of parameters string, or EOT if EOT mode is selected.
PS Position Not applicable.
Return Codes
Asynchronous Mode
1. In this mode, the session initiates a file Xfr and immediately returns control to the calling
application.
2. The calling application should not issue any more WinHLLAPI calls while the file Xfr is in
progress.
WinHLLAPI Function
Convert (99)
Description
The Convert (99) function converts a position on the RIBM presentation space to a display
row/column coordinate, or a display row/column coordinate to a RIBM presentation space
position.
Prerequisites
None.
Function Call
WORD WinHLLAPI(
Call Parameters
Function Number 99
Data String 2-byte data string.
1 One of the following:
a letter A-Z, which indicates presentation short name.
a (space) which indicates for the currently connected RIBM
presentation space.
2 P or R:
P = converts from Position to Row/Column.
R = converts from Row/Column to Position. See Length and presen-
tation space Position parameter below.
Length Row number on the RIBM presentation space. Valid row value is
between 1 and the maximum number of rows depending the model.
Not applicable when P is specified in the String parameter.
Reflection for IBM HLLAPI Reference 195
Return Parameters
The Convert (99) function does not return parameters.
Return Codes
Remarks
The Convert (99) function does not update the cursor position.
The Convert (99) function calculates the position taking the model number into
consideration.
196 Reflection for IBM HLLAPI Reference
WinHLLAPI Function
Description
The Connect Window Services (101) function allows the client application to manage the RIBM
presentation space windows.
Prerequisite
None.
Function Call
WORD WinHLLAPI(
Call Parameters
Return Codes
WinHLLAPI Function
Description
The Disconnect Window Services (102) function disconnects the WinHLLAPI application and
the RIBM presentation space windows.
Prerequisite
Connect Window Services (101).
Function Call
WORD WinHLLAPI(
Call Parameters
Return Codes
Remarks
When WinHLLAPI has called Disconnect Window Services (102) it no longer manages the
RIBM presentation space window. Before you exit the application, exit with a call to
Disconnect Window Services (102) so all connected RIBM presentation spaces will disconnect
and no outstanding connection will be canceled.
WinHLLAPI Function
Description
The Query Window Coordinates (103) function returns window coordinates on the
presentation.
Call Parameters
Return Parameters
Data String:
Remarks
This function is not supported for 5250.
WinHLLAPI Function
Description
The Window Status (104) function can be used to query or change a windows RIBM presen-
tation space size, location, or visibility. You can also move, maximize or minimize a specified
window.
Prerequisite
Connect Window Services (101).
Function Call
WORD WinHLLAPI(
Call Parameters
Return Codes
Remarks
This function is not supported for 5250 sessions.
WinHLLAPI Function
Description
The Change PS Window Name (106) function allows an application to reset or change the RIBM
presentation space window name.
Prerequisite
Connect Window Services (101).
Function Call
WORD WinHLLAPI(
Call Parameters
Return Codes
WinHLLAPI Function
Description
Run Profile starts a RIBM presentation space with the specified settings file.
Prerequisite
None
Function Call
WORD WinHLLAPI(
Call Parameters
See below.
WinHLLAPI Function
Description
The Get Session HWND (1002) function returns the instance handle of the currently
connected RIBM presentation space.
Prerequisite
None.
Function Call
WinHLLAPI(GetSessionHWND,lpbyString,lpwLength,lpwReturnCode).
Call Parameters
Return Parameters
Data String The instance handle.
Return Codes
>0 The instance handle.
WinHLLAPI Reference
WinHLLAPI Reference
Parameter Description
[d:] Defines a disk drive where the PC file will be sent to or received from. If
you dont specify the drive, file transfer defaults to the current drive.
[path] Path for the PC file to be sent or target file to be received. If you dont
specify the path, it defaults to the C:\ on the PC.
filename File name of the file to be sent or received.
[.ext] File extension of the file to be sent or received.
w: Sessions short name for a CMS session (followed by a colon) for sending
or receiving files. A letter between A - Z. If you dont, the host session in
focus would be the target.
fn File name of the file being sent or received from the host session.
[ft] The file type of the host file to be sent or received, if any.
[fm] Optional parameter which indicates the host file mode. If Send File (90),
this parameter indicates to CMS which disk drive the file is sent to.
(options The Options parameter is preceded by a single left parenthesis. See below
for VM/CMS File Transfer Options.
Reflection for IBM HLLAPI Reference 209
Option Description
append Appends a transferred file to the end of an existing file. append overrides
specified values for the lrecl and recfm options.
ascii Converts ASCII to EBCDIC when EHLLAPI sends a file to the host
session, and converts EBCDIC to ASCII when the PC session receives a file
from the host session. If the file is a text file, ASCII mode is recommended.
bufsize Enables EHLLAPI to select a buffered file transfer option.
BUFSIZE = 2
BUFSIZE = 4
BUFSIZE = 8
BUFSIZE = 32
crlf Deletes the carriage return/line feed characters during Send (90), and
appends them during Receive (91). Text data usually contains a crlf
character at the end of each line. If you delete these characters the file will
be easier to read
lrecl n Specifies that the host file contains fixed-length records. If strings are
shorter than n, the buffers will be padded with space characters. Send File
(90) only.
recfm f Specifies that the file will contain variable length records. Send File (90).
Use of the recfm v option without the crlf option is recommended when
padding of mainframe records or deletion of trailing spaces must not
occur.
210 Reflection for IBM HLLAPI Reference
WinHLLAPI Reference
WinHLLAPI Reference
The table below shows the valid AID keys for 3270, 5250, and asynchronous sessions.
3270 AID keys 5250 AID keys Asynchronous AID keys
Attn Clear Function keys
Clear Enter Enter
Cursor Select PF keys Numlock
Enter Help Number Pad /
PF keys PA1 - PA3 Number Pad *
PA1 - PA3 Page Down Number Pad -
System Request Page Up
Print
System Request
Test Request
Reflection for IBM HLLAPI Reference 213
WinHLLAPI Reference
Byte Description
WHLL_WINDOWSTATUS_MOVE
Move the window x or y position.
WHLL_WINDOWSTATUS_ZORDER
Specifies ZORDER placement.
WHLL_WINDOWSTATUS_SHOW
Set the window to visible.
WHLL_WINDOWSTATUS_HIDE
Set the window to invisible.
214 Reflection for IBM HLLAPI Reference
Byte Description
WHLL_WINDOWSTATUS_ACTIVATE
Activate the window.
WHLL_WINDOWSTATUS_DEACTIVATE
Deactivate the window.
WHLL_WINDOWSTATUS_MINIMIZE
Set the window to minimized.
WHLL_WINDOWSTATUS_MAXIMIZE
Set the window to maximized.
WHLL_WINDOWSTATUS_RESTORE
Restore the window .
Bytes 5-6 Specifies the x-coordinate of the upper-left corner of the window.
Ignored if the move option is not set.
Bytes 7-8 Specifies the y-coordinate of the upper-left corner of the window.
Ignored if the move option is not set
Bytes 9-10 Specifies the X window size (width). Ignored if
WHLL_WINDOWSTATUS_MOVE is not set.
Bytes 11-12 Specifies the Y window size (height). Ignored if
WHLL_WINDOWSTATUS_MOVE is not set.
Bytes 13-16 Specifies the ZORDER placement of the window. This option is valid
only if WHLL_WINDOWSTATUS_ZORDER is specified. Valid
values are:
Remarks
WHLL_WINDOWSTATUS_MAXIMIZE, WHLL_WINDOWSTATUS_MINIMIZE and
WHLL_WINDOWSTATUS_RESTORE are all mutually exclusive with respect to each other
therefore only one can be specified at a time. WHLL_WINDOWSTATUS_ACTIVATE
and WHLL_WINDOWSTATUS_DEACTIVATE are also mutually exclusive and so are
WINDOWSTATUS_FRONT and WHLL_WINDOWSTATUS_BACK
Request Option WHLL_WINDOWSTATUS_QUERY
Query window status - a 16-byte string with the following format:
Byte 1
Short name session ID of the desired host session, or space or null for the current host session.
Byte 2
Bytes 3-4
Bytes 5-6
Specifies the x-coordinate of the upper-left corner of the window. Ignored if the move option
is not set.
Bytes 7-8
Specifies the y-coordinate of the upper-left corner of the window. Ignored if the move option
is not set
216 Reflection for IBM HLLAPI Reference
Bytes 9-10
Bytes 11-12
Short name session ID of the desired host session, or space or null for the current host session.
Byte 2
Bytes 3-4
An integer containing WHLL_WINDOWSTATUS_NULL. The following are possible return
values. More than one status is possible.
Bytes 5-6
Specifies the current font height. The size assumes a fixed-pitch font including any inter-
column spacing (this value times the number of displayed columns should equal the width of
the presentation space).
Reflection for IBM HLLAPI Reference 217
Bytes 7-8
Specifies the current font width. The size includes any inter-line spacing (this value times the
number of displayed rows should equal the height of the presentation space).
Bytes 9-10
Specifies the distance from the left edge of the window to the first displayed column of the host
screen, or zero if the host presentation space exactly fits the window.
Bytes 11-12
Specifies the distance from the top of the window to the first displayed row of the host screen,
or zero if the host presentation space exactly fits the window.
Bytes 13-14
Specifies the number of the first visible row of the presentation space. This is normally one
unless only a portion of the presentation space is visible in the window.
Bytes 15-16
Specifies the number of the first visible column of the presentation space. This is normally one
unless only a portion of the presentation space is visible in the window.
Bytes 17-20
WinHLLAPI Reference
This table is used when your application is calling Send Key (3) or Get Key (51).
Meaning Mnemonic
@ @@
Alt @A
Alt Cursor @$
Attention @A@Q
Backspace @<
Backtab (Left Tab) @B
Clear @C
Cmd (function) Key @A@Y
Cursor Down @V
Cursor Left @L
Cursor Right @Z
Cursor Select @A@J
Cursor Up @U
Delete @D
Dup @S@x
End @q
Enter @E
Erase EOF @F
Erase Input @A@F
Field Exit @A@E
Field Mark @S@y
Field - @A@-
Reflection for IBM HLLAPI Reference 219
Meaning Mnemonic
Field + @A@+
Help @H
Hexadecimal @A@X
Home @0 (zero)
Insert @I
Insert Toggle @A@I
Local Print @P
New Line @N
Page Up @u
Page Down @v
Print (PC) @A@t
Print Screen @A@T
Record Backspace @A@<
Reset @R
Shift @S
Sys Request @A@H
Tab (Right Tab) @T
Test @A@C
PA1 @x
PA2 @y
PA3 @z
PA4 @+
PA5 @%
PA6 @&
PA7 @
PA8 @(
220 Reflection for IBM HLLAPI Reference
Meaning Mnemonic
PA9 @)
PA10 @*
PF1/F1 @1
PF2/F2 @2
PF3/F3 @3
PF4/F4 @4
PF5/F5 @5
PF6/F6 @6
PF7/F7 @7
PF8/F8 @8
PF9/F9 @9
PF10/F10 @a
PF11/F11 @b
PF12/F12 @c
PF13/F13 @d
PF14/F14 @e
PF15/F15 @f
PF16/F16 @g
PF17/F17 @h
PF18/F18 @i
PF19/F19 @j
PF20/F20 @k
PF21/F21 @l
PF22/F22 @m
PF23/F23 @n
PF24/F24 @o
Reflection for IBM HLLAPI Reference 221
WinHLLAPI Reference
WinHLLAPI Reference
0 Reverse image
0 = Normal
1 = Reverse
1 Underscore
0 = None
1 = Underscore
2 Blink
0 = None
1 = Blink
3 Column separators
0 = None
1 = Column separators
Field Attributes
3270 Field Attributes
Bit Position Meaning
2 Unprotected/protected
0 = Unprotected data field
1 = Protected data field
3 Alpha/numeric
0 = Alphanumeric data
1 = Numeric data only
4-5 I/SPD
00 = Normal intensity, pen not detectable
01 = Normal intensity, pen detectable
10 = High intensity, pen detectable
11 = Non-display, pen not detectable
6 Reserved
1 Visibility
0 = Non-display
1 = Display
2 Unprotected/protected
0 = Unprotected data field
1 = Protected data field
3 Intensity
0 = Normal
1 = High
7 MDT
0 = Field has not been modified
1 = Field has been modified
226 Reflection for IBM HLLAPI Reference
WinHLLAPI Reference
WinHLLAPI Reference
No prerequisite
Connect Presentation Space (1)
Connect Window Services (101)
Convert Position/RowCol (99)
Pause (18)
Query Session Status (22)
Query Sessions (10)
Query System (20)
Receive File (91)
Reset System (21)
Send File (90)
Set Session Parameters (9)
Start Host Notification (23)
Start Close Intercept (41)
Start Keystroke Intercept (50
Connect Presentation Space ()
Copy Field to String (34)
Copy OIA (13)
Copy Presentation Space (5)
Copy Presentation Space to String (8)
Copy String to Field (33)
Copy String to Presentation Space (15)
Disconnect Presentation Space (2)
Find Field Length (32)
Find Field Position (31)
Query Cursor Location (7)
Query Field Attribute (14)
Release (12)
Reserve (11)
Search Field (30)
Search Presentation Space (6)
Send Key (3)
Set Cursor (40)Wait (4)
228 Reflection for IBM HLLAPI Reference