draft-ietf-tn3270e-ohio-00.txt   draft-ietf-tn3270e-ohio-01.txt 
TN3270E Working Group Thomas Brawn TN3270E Working Group Thomas Brawn
Internet Draft: <draft-ietf-tn3270e-ohio-00.txt> IBM Corporation Internet Draft: <draft-ietf-tn3270e-ohio-01.txt> IBM Corporation
Expiration Date: tbd Stephen Gunn Expiration Date: October 1st, 1999 Stephen Gunn
Attachmate Corporation Attachmate Corporation
Open Host Interface Objects for TN3270E Open Host Interface Objects
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026.
This document is an Internet-Draft. Internet-Drafts are working Internet-Drafts are working documents of the Internet Engineering
documents of the Internet Engineering Task Force (IETF), its Areas, Task Force (IETF), its areas, and its working groups. Note that
and its Working Groups. Note that other groups may also distribute other groups may also distribute working documents as
working documents as Internet-Drafts. Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six Internet-Drafts are draft documents valid for a maximum of six months
months and may be updated, replaced, or obsoleted by other documents and may be updated, replaced, or obsoleted by other documents at any
at any time. It is inappropriate to use Internet-Drafts as time. It is inappropriate to use Internet-Drafts as reference
reference material or to cite them other than as "work in material or to cite them other than as "work in progress." The list
progress." of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt
To view the entire list of current Internet-Drafts, please check The list of Internet-Draft Shadow Directories can be accessed at
the "lid-abstracts.txt" listing contained in the Internet-Drafts http://www.ietf.org/shadow.html.
Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net
(Northern Europe), ftp.nis.garr.it (Southern Europe), munnari.oz.au
(Pacific Rim), ftp.ietf.org (US East Coast), or ftp.isi.edu (US
West Coast).
Abstract Abstract
This draft addresses the need for a common, advanced, client
programming interface to mainframe host data. Application
developers, in particular third party application vendors, use
API's provided by client emulator programs to write applications
that access host data. Currently, the defacto standard HLLAPI is
the interface most commonly provided by these programs and the one
used by the third party application vendors. However, HLLAPI is
plagued by the fact that it doesn't exploit modern programming
techniques and is fragmented by multiple, proprietary
implementations. Client vendors have, over the last couple of years,
developed more advanced interfaces that exploit modern programming
advances. However no effort has been put into standardizing these
interfaces and application developers have been forced to either
chose to stay with HLLAPI or perform costly re-implementation of
their products to support each competing advanced client API.
The purpose of this memo is to define an object oriented interface to The Open Host Interface Objects (OHIO) address the need for a
TN3270E. standardized advanced programming interface to the host data. OHIO
does not modify the TN3270/TN5250 protocol or datastream but instead
Brawn & Gunn Informational Page 1 provides a common access method to that data once it arrives at the
client. OHIO uses an Object Oriented approach to divide the data into
Ohio-00 Open Host Interface Objects September 1998 logical objects, and provides methods on those objects to allow
standard access to the data. Details about the connection protocol
Copyright Notice used to communicate with the host and the specific host platform.
Copyright (C) The Internet Society (1997). All Rights Reserved.
Table of Contents Table of Contents
1.0 Introduction...................................................2 OPEN HOST INTERFACE OBJECTS FOR TN3270E . . . . . . . . . . . 1
2.0 Object Definitions.............................................3 STATUS OF THIS MEMO . . . . . . . . . . . . . . . . . . . . . 1
2.1 Ohio...........................................................3 ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 OhioField......................................................5 TABLE OF CONTENTS . . . . . . . . . . . . . . . . . . . . . . 2
2.3 OhioFields.....................................................5 1.0 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . 2
2.4 OhioManager....................................................6 2.0 OBJECT DEFINITIONS . . . . . . . . . . . . . . . . . . . . 3
2.5 OhioOIA........................................................6 2.1 OHIO . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.6 OhioPosition...................................................7 2.2 OHIOFIELD . . . . . . . . . . . . . . . . . . . . . . . 6
2.7 OhioScreen.....................................................7 2.3 OHIOFIELDS . . . . . . . . . . . . . . . . . . . . . . 8
2.8 OhioSession....................................................7 2.4 OHIOMANAGER . . . . . . . . . . . . . . . . . . . . . . 9
2.9 OhioSessions...................................................8 2.5 OHIOOIA . . . . . . . . . . . . . . . . . . . . . . . . 10
3.0 Acknowledgements...............................................8 2.6 OHIOPOSITION . . . . . . . . . . . . . . . . . . . . . 11
4.0 References.....................................................9 2.7 OHIOSCREEN . . . . . . . . . . . . . . . . . . . . . . 11
5.0 How to Contact the Authors.....................................9 2.8 OHIOSESSION . . . . . . . . . . . . . . . . . . . . . . 14
Appendix A - Ohio Java Mapping....................................10 2.9 OHIOSESSIONS . . . . . . . . . . . . . . . . . . . . . 15
Appendix B - Ohio ActiveX IDL Mapping.............................16 3.0 ACKNOWLEDGMENTS . . . . . . . . . . . . . . . . . . . . . 15
Appendix C - Sendkeys Mnemonics...................................27 4.0 REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . 16
5.0 HOW TO CONTACT THE AUTHORS . . . . . . . . . . . . . . . . 16
APPENDIX A: OHIO JAVA MAPPING . . . . . . . . . . . . . . . . 16
APPENDIX B: OHIO ACTIVEX IDL MAPPING . . . . . . . . . . . . . 16
APPENDIX C: 3270 FORMAT CONTROL ORDERS . . . . . . . . . . . . 16
1.0 Introduction 1.0 Introduction
The following is the Ohio containment hierarchy: The following is the Ohio containment hierarchy:
OhioManager: Contains one: OhioManager: Contains one:
OhioSessions: Contains a collection of: OhioSessions: Contains a collection of1:
OhioSession: Contains one: OhioSession: Contains one:
OhioScreen: Contains one of each of: OhioScreen: Contains one of each of:
OhioOIA: The operator information area OhioOIA: The operator information area
OhioFields: Contains a collection of: OhioFields: Contains a collection of:
OhioField: A field in the presentation space OhioField: A field in the presentation space
Additional utility classes:
OhioPosition
The Ohio inheritance hierarchy is: The Ohio inheritance hierarchy is:
Ohio: Base class Ohio: Base class
OhioManager OhioManager
OhioSessions OhioSessions
OhioSession OhioSession
OhioScreen OhioScreen
OhioOIA OhioOIA
OhioFields OhioFields
OhioField OhioField
OhioPosition
Brawn & Gunn Informational Page 2
Ohio-00 Open Host Interface Objects September 1998
2.0 Object Definitions 2.0 Object Definitions
OMG IDL Version 2.1 is used to define the following objects. For a OMG IDL Version 2.1 is used to define the following objects. For a
mapping of the IDL to Java, see Appendix A - Ohio Java Mapping. For mapping of the IDL to Java, see Appendix A - Ohio Java Mapping. For
a mapping of the IDL to ActiveX IDL, see Appendix B - Ohio ActiveX a mapping of the IDL to ActiveX IDL, see Appendix B - Ohio ActiveX
IDL Mapping. IDL Mapping.
Note: "1" based counting is used throughout this standard for both Note: "1" based counting is used throughout this document for both
positions (the first position on the screen is position 1, not positions (the first position on the screen is position 1, not
position 0) and sizes (the first item in a collection is item 1, not position 0) and sizes (the first item in a collection is item 1, not
item 0). item 0).
2.1 Ohio 2.1 Ohio
Base class for all Ohio classes. Contains all common Ohio methods
and properties.
Interface Ohio { Interface Ohio {
// Properties // This enum is used by:
Readonly enum OHIO_DIRECTION { // OhioFields.FindByString
OHIO_DIRECTION_FORWARD, // OhioScreen.FindString
OHIO_DIRECTION_BACKWARD Readonly Attribute enum OHIO_DIRECTION {
OHIO_DIRECTION_FORWARD // Forward (beginning towards end)
OHIO_DIRECTION_BACKWARD // Backward (end towards beginning)
}; };
Readonly enum OHIO_TYPE { // This enum is used by:
OHIO_TYPE_UNKNOWN, // OhioSession.sessionType
OHIO_TYPE_3270, Readonly Attribute enum OHIO_TYPE {
OHIO_TYPE_5250, OHIO_TYPE_UNKNOWN // Unknown host
OHIO_TYPE_VT OHIO_TYPE_3270 // 3270 host
OHIO_TYPE_5250 // 5250 host
}; };
// This enum is used by:
Readonly enum OHIO_STATE { // OHIOSession.connected
OHIO_STATE_DISCONNECTED, // OHIOSession sessionChanged
OHIO_STATE_CONNECTED Readonly Attribute enum OHIO_STATE {
OHIO_STATE_DISCONNECTED // The communication link to the
// host is disconnected.
OHIO_STATE_CONNECTED // The communication link to the
// host is connected.
}; };
Readonly enum OHIO_PLANE { // This enum is used by:
OHIO_PLANE_TEXT, // OHIOField.getData
OHIO_PLANE_COLOR, // OHIOScreen.getData
OHIO_PLANE_FIELD, Readonly Attribute enum OHIO_PLANE {
OHIO_PLANE_EXTENDED OHIO_PLANE_TEXT // Indicates Text Plane (character data)
OHIO_PLANE_COLOR // Indicates Color Plane (standard HLLAPI
// CGA color values)
OHIO_PLANE_FIELD // Indicates Field Attribute Plane (field
// attribute bytes)
OHIO_PLANE_EXTENDED // Indicates Extended Plane (extended
// attribute bytes)
}; };
Brawn & Gunn Informational Page 3 // These values are returned in the Ohio Color Plane from the
// following methods:
Ohio-00 Open Host Interface Objects September 1998 // OhioField.getData
// OhioScreen.getData
Readonly enum OHIO_COLOR { Readonly Attribute enum OHIO_COLOR {
OHIO_COLOR_BLACK, OHIO_COLOR_BLACK
OHIO_COLOR_BLUE, OHIO_COLOR_BLUE
OHIO_COLOR_GREEN, OHIO_COLOR_GREEN
OHIO_COLOR_CYAN, OHIO_COLOR_CYAN
OHIO_COLOR_RED, OHIO_COLOR_RED
OHIO_COLOR_MAGENTA, OHIO_COLOR_MAGENTA
OHIO_COLOR_WHITE, OHIO_COLOR_WHITE
OHIO_COLOR_YELLOW OHIO_COLOR_YELLOW
}; };
Readonly enum OHIO_EXTENDED { // These values are returned in the Ohio Extended Field Plane
OHIO_EXTENDED_HILITE, // from the following methods:
OHIO_EXTENDED_COLOR, // OhioField.getData
OHIO_EXTENDED_RESERVED, // OhioScreen.getData
OHIO_EXTENDED_HILITE_NORMAL, Readonly Attribute enum OHIO_EXTENDED {
OHIO_EXTENDED_HILITE_BLINK, OHIO_EXTENDED_HILITE // Bitmask for Highlighting Bits
OHIO_EXTENDED_HILITE_REVERSEVIDEO, OHIO_EXTENDED_COLOR // Bitmask for Color Bits
OHIO_EXTENDED_HILITE_UNDERSCORE, OHIO_EXTENDED_RESERVED // Bitmask for Reserved Bits
OHIO_EXTENDED_COLOR_DEFAULT, OHIO_EXTENDED_HILITE_NORMAL // Normal highlighting
OHIO_EXTENDED_COLOR_BLUE, OHIO_EXTENDED_HILITE_BLINK // Blinking highlighting
OHIO_EXTENDED_COLOR_RED, OHIO_EXTENDED_HILITE_REVERSEVIDEO // Reverse Video
OHIO_EXTENDED_COLOR_PINK, // highlighting
OHIO_EXTENDED_COLOR_GREEN, OHIO_EXTENDED_HILITE_UNDERSCORE // Underscore
OHIO_EXTENDED_COLOR_TURQUOISE, // highlighting
OHIO_EXTENDED_COLOR_YELLOW, OHIO_EXTENDED_COLOR_DEFAULT // Default color
OHIO_EXTENDED_COLOR_WHITE OHIO_EXTENDED_COLOR_BLUE // Blue
OHIO_EXTENDED_COLOR_RED // Red
OHIO_EXTENDED_COLOR_PINK // Pink
OHIO_EXTENDED_COLOR_GREEN // Green
OHIO_EXTENDED_COLOR_TURQUOISE // Turquoise
OHIO_EXTENDED_COLOR_YELLOW // Yellow
OHIO_EXTENDED_COLOR_WHITE // White
}; };
Readonly enum OHIO_FIELD { // These values are returned in the Ohio Field Attributes from
OHIO_FIELD_ATTRIBUTE, // the following methods:
OHIO_FIELD_PROTECTED, // OhioScreen.getData
OHIO_FIELD_NUMERIC, Readonly Attribute enum OHIO_FIELD {
OHIO_FIELD_PEN_SELECTABLE, OHIO_FIELD_ATTRIBUTE // Bitmask for field attribute
OHIO_FIELD_HIGH_INTENSITY, OHIO_FIELD_PROTECTED // Protected field
OHIO_FIELD_HIDDEN, OHIO_FIELD_NUMERIC // Numeric field
OHIO_FIELD_RESERVED, OHIO_FIELD_PEN_SELECTABLE // Pen selectable field
OHIO_FIELD_MODIFIED OHIO_FIELD_HIGH_INTENSITY // High intensity field
OHIO_FIELD_HIDDEN // Hidden field
OHIO_FIELD_RESERVED // Reserved field
OHIO_FIELD_MODIFIED // Modified field
}; };
Readonly enum OHIO_UPDATE { // This enum is used by:
OHIO_UPDATE_HOST, // OhioScreen event processing
OHIO_UPDATE_CLIENT Readonly Attribute enum OHIO_UPDATE {
OHIO_UPDATE_CLIENT // Update initiated by client
OHIO_UPDATE_HOST // Update initiated by host
}; };
Brawn & Gunn Informational Page 4 // This enum is used by:
// OhioOIA.owner
Ohio-00 Open Host Interface Objects September 1998 Readonly Attribute enum OHIO_OWNER {
OHIO_OWNER_UNKNOWN // Uninitialized
Readonly enum OHIO_OWNER { OHIO_OWNER_APP // Application or 5250 host
OHIO_OWNER_UNKNOWN, OHIO_OWNER_MYJOB // 3270 - Myjob
OHIO_OWNER_APP, OHIO_OWNER_NVT // 3270 in NVT mode
OHIO_OWNER_MYJOB, OHIO_OWNER_UNOWNED // 3270 - Unowned
OHIO_OWNER_NVT, OHIO_OWNER_SSCP // 3270 - SSCP
OHIO_OWNER_UNOWNED,
OHIO_OWNER_SSCP
}; };
Readonly enum OHIO_INPUTINHIBITED { // This enum is used by:
OHIO_INPUTINHIBITED_NOTINHIBITED, // OhioOIA.InputInhibited
OHIO_INPUTINHIBITED_SYSTEM_WAIT, Readonly Attribute enum OHIO_INPUTINHIBITED {
OHIO_INPUTINHIBITED_COMMCHECK, OHIO_INPUTINHIBITED_NOTINHIBITED // Input not inhibited
OHIO_INPUTINHIBITED_PROGCHECK, OHIO_INPUTINHIBITED_SYSTEM_WAIT // Input inhibited by a
OHIO_INPUTINHIBITED_MACHINECHECK, // System Wait state ("X SYSTEM" or "X []")
OHIO_INPUTINHIBITED_OTHER OHIO_INPUTINHIBITED_COMMCHECK // Input inhibited by a
// communications check state ("X COMMxxx")
OHIO_INPUTINHIBITED_PROGCHECK // Input inhibited by a
// program check state ("X PROGxxx")
OHIO_INPUTINHIBITED_MACHINECHECK // Input inhibited by a
// machine check state ("X MACHxxx")
OHIO_INPUTINHIBITED_OTHER // Input inhibited by something
// other than above states
}; };
}; // The OHIO version level of this implementation. The form is
// "OHIO nn.nn"
Readonly Attribute string OhioVersion;
2.2 OhioField // The name of the vendor providing this OHIO implementation.
// Format is vendor defined.
Readonly Attribute string VendorName;
Interface OhioField { // The vendor product version that is providing the OHIO
// implementation. Format is vendor specific.
Readonly Attribute string VendorProductVersion;
// Properties // The vendor object that provides non-standard, vendor
Readonly OhioPosition Start; // specific extensions to the OHIO object.
Readonly OhioPosition End; Readonly Attribute Object VendorObject;
Readonly long Length;
Readonly boolean Modified;
Readonly boolean Protected;
Readonly boolean Numeric;
Readonly boolean HighIntensity;
Readonly boolean PenSelectable;
Readonly boolean Hidden;
Readonly boolean Normal;
Read/Write string Text;
Readonly OHIO_FIELD Attribute;
// Methods // Create an OhioPosition object.
byte GetData(OHIO_PLANE); // row The row coordinate.
// col The column coordinate.
OhioPosition CreateOhioPosition(row, col);
}; };
2.3 OhioFields 2.2 OhioField
Interface OhioFields {
Brawn & Gunn Informational Page 5
Ohio-00 Open Host Interface Objects September 1998
// Properties A field is the fundamental element of a virtual screen. A field
Readonly long count; includes both data and attributes describing the field. The
OhioField class encapsulates a virtual screen field and provides
methods for accessing and manipulating field attributes and data.
// Methods OhioField objects can be accessed only through the OhioFields
OhioField Item(long); object.
Void Refresh();
OhioField FindByString(string target, OhioPosition start,
OhioPosition end, OHIO_DIRECTION direction,
boolean IgnoreCase);
OhioField FindByPosition(OhioPosition);
}; Interface OhioField {
2.4 OhioManager // The starting position of the field. The position can range
// from 1 to the size of the virtual screen. The starting
// position of a field is the position of the first character
// in the field.
Readonly Attribute OhioPosition Start;
// The ending position of the field. The position can range
// from 1 to the size of the virtual screen. The ending
// position of a field is the position of the last character in
// the field.
Readonly Attribute OhioPosition End;
Interface OhioManager { // The length of the field. A field's length can range
from 1 to the size of the
// virtual screen.
Readonly Attribute int Length;
// Properties // The attribute byte for the field.
OhioSessions Sessions; Readonly Attribute int Attribute;
// Methods // Indicates whether or not the field has been modified. True
OhioSession FindSession(string configurationResource, // if the field has been modified, otherwise false.
string sessionName); Readonly Attribute boolean Modified;
}; // Indicates whether or not the field is protected. True if
// the field is protected, otherwise false.
Readonly Attribute boolean Protected;
2.5 OhioOIA // Indicates whether or not the field is numeric-only. True if
// the field is numeric only, otherwise false.
Readonly Attribute boolean Numeric;
Interface OhioOIA { // Indicates whether or not the field is high-intensity. True
// if the field is high intensity, otherwise false.
Readonly Attribute boolean HighIntensity;
// Properties // Indicates whether or not the field is pen-selectable. True
Readonly boolean Alphanumeric; // if the field is pen-selectable, otherwise false.
Readonly boolean APL; Readonly Attribute boolean PenSelectable;
Readonly boolean Numeric;
Readonly boolean InsertMode;
Readonly OHIO_OWNER owner;
Readonly OHIO_INPUTINHIBITED InputInhibited;
Readonly long ProgCheckCode;
Readonly long CommCheckCode;
Readonly long MachineCheckCode;
// Methods // Indicates whether or not the field is hidden. True if the
// field is hidden, otherwise false.
Readonly Attribute boolean Hidden;
// Events // The text plane data for the field. This is similar to the
OIAChanged() // getData() method using the OHIO_PLANE_TEXT parameter, except
// the data is returned as a string instead of a character
// array. When setting the String property, if the string is
// shorter than the length of the field, the rest of the field
// is cleared. If the string is longer than the field, the
// text is truncated. A subsequent call to this property will
// not reflect the changed text. To see the changed text, do a
// refresh on the OhioFields collection and retrieve a new
// OhioField object.
Attribute string String;
// Returns data from the different planes (text, color,
// extended) associated with the field. The data is returned
// as a character array.
// targetPlane An OHIO_PLANE value indicating from which
// plane to retrieve the data.
char[] getData(OHIO_PLANE targetPlane);
}; };
Brawn & Gunn Informational Page 6 2.3 OhioFields
Ohio-00 Open Host Interface Objects September 1998 OhioFields contains a collection of the fields in the virtual
screen. It provides methods to iterate through the fields, find
fields based on location, and find fields containing a given
string. Each element of the collection is an instance of
OhioField.
2.6 OhioPosition OhioFields can only be accessed through OhioScreen using the
Fields property. OhioFields is a static view of the virtual
screen and does not reflect changes made to the virtual screen
after its construction. The field list can be updated with a new
view of the virtual screen using the Refresh() method.
Interface OhioPosition { Note: All OhioField objects returned by methods in this class are
invalidated when Refresh() is called.
// Properties Interface OhioFields {
long Row;
long Column;
}; // Returns the number of OhioField objects contained in this
// collection.
Readonly Attribute int Count;
2.7 OhioScreen // Returns the OhioField object at the given index. "One
// based" indexing is used in all Ohio collections. For
// example, the first OhioField in this collection is at
// index 1.
OhioField Item(int fieldIndex);
Interface OhioScreen { // Updates the collection of OhioField objects. All OhioField
// objects in the current virtual screen are added to the
// collection. Indexing of OhioField objects will not be
// preserved across refreshes.
void Refresh();
// Properties // Searches the collection for the target string and returns
Readonly Attribute OhioPosition Cursor; // Position of cursor // the OhioField object containing that string. The string
Readonly Attribute OhioOIA OIA; // OIA object for this Screen // must be totally contained within the field to be considered
Readonly Attribute OhioFields Fields; // Collection of fields // a match. If the target string is not found, a null will be
Readonly Attribute long Rows; // Number of rows in Screen // returned.
Readonly Attribute long Columns; // Number of columns in Screen // targetString The target string.
Readonly Attribute string Text; // Entire Screen as text string
// Methods // startPos The row and column where to start. The
bytes GetData(long BuffLen, OhioPosition Start, // position is inclusive (for example, row 1,
OhioPosition End, OHIO_PLANE Plane); // col 1 means that position 1,1 will be used
OhioPosition FindString(string text, OhioPosition Start, // as the starting location and 1,1 will be
OhioPosition End, PS_DIR Dir, // included in the search).
boolean IgnoreCase); // length The length from startPos to include in the
void SendKeys(string text, OhioPosition insertPosition); // search.
void PutString(string text, OhioPosition insertLocation); // dir An OHIO_DIRECTION value.
// ignoreCase Indicates whether the search is case
// sensitive. True means that case will be
// ignored. False means the search will be
// case sensitive.
OhioField FindByString(String targetString,
OhioPosition startPos,
int length,
OHIO_DIRECTION dir,
boolean ignoreCase);
// Events // Searches the collection for the target position and returns
CursorMoved(cursor position) // the OhioField object containing that position. If not
ScreenChanged(screen delta, OHIO_UPDATE, OhioPosition pos, // found, returns a null.
OhioPosition pos); // targetPosition The target row and column.
SizeChanged - tbd OhioField FindByPosition(OhioPosition targetPosition);
}; };
2.8 OhioSession 2.4 OhioManager
Interface OhioSession {
Brawn & Gunn Informational Page 7
Ohio-00 Open Host Interface Objects September 1998
// Properties
Readonly string configurationResource;
Readonly string sessionName;
Readonly OHIO_TYPE sessionType;
Readonly OHIO_STATE connected;
Readonly OhioScreen Screen;
// Methods
void Connect();
void Disconnect();
// Events The central repository for access to all OHIO sessions. The
SessionChanged(OHIO_UPDATE); OhioManager contains a list of all OhioSession objects available
on this system.
}; Interface OhioManager {
2.9 OhioSessions // An OhioSessions object containing the OhioSession objects
// available on this system. This list of objects is a static
// snapshot at the time the OhioSessions object is created.
// Use the OhioSessions.refresh method to obtain a new
// snapshot.
Readonly Attribute OhioSessions Sessions;
Interface OhioSessions{ // Returns an OhioSession object based on the search parameters
// provided.
// ConfigurationResource A vendor specific string used to
// provide configuration information.
// SessionName The unique name associated with an
// OhioSession.
// Properties // The parameters are used as follows:
long count; // Is ConfigurationResource provided?
// Yes - Is SessionName provided?
// Yes - Is OhioSession object with matching
// SessionName available on the system?
// Yes - Error, attempting to create an
// OhioSession object with a non-unique
// SessionName.
// No - Create an OhioSession object using
// SessionName and ConfigurationResource.
// No - Start a new OhioSession using
// ConfigurationResource and generating a new
// SessionName.
// No - Is SessionName provided?
// Yes - Is OhioSession object with matching
// SessionName available on the system?
// Yes - Return identified OhioSession object.
// No - Return null.
// No - Return null.
OhioSession OpenSession(String ConfigurationResource,
String SessionName);
// Methods // Closes an OhioSession object. The OhioSession is
OhioSession Item(long); // considered invalid and is removed from the list of
OhioSession Item(string); // OhioSession objects.
Void Refresh(); // SessionObject The OhioSession to close.
void CloseSession(OhioSession SessionObject);
// Events // Closes an OhioSession object. The OhioSession is
// considered invalid and is removed from the list of
// OhioSession objects.
// SessionName The SessionName of the OhioSession to
// close.
void CloseSession(String SessionName);
}; };
3.0 Acknowledgments 2.5 OhioOIA
This document is a product of the TN3270E Working Group.
The authors wish to thank the following individuals for their
contributions to this standard:
Mark McMillan, IBM Corporation
Hemant Nanivadekar, Attachmate Corporation
J. Burke Ryder, Attachmate Corporation
Blair Cooper, Attachmate Corporation
Brian L. Henry, Attachmate Corporation
Brawn & Gunn Informational Page 8
Ohio-00 Open Host Interface Objects September 1998
4.0 References
1) International Business Machines Corporation, "eNetwork Personal
Communications Version 4.2 for Windows 95 and Windows NT Host
Access Class Library", September 1997.
2) International Business Machines Corporation, "Host On-Demand
Version 2.0 Host Access Class Library for Java Reference",
October 1997.
3) Attachmate Corporation, "EXTRA! Objects SDK Reference Guide for
C++", October 1997.
5.0 How to Contact the Authors
Thomas Brawn
IBM Corporation
4205 S. Miami Blvd
RTP, NC 27709
e-mail: brawntj@us.ibm.com
phone: 919-254-8301
Stephen Gunn
Attachmate Corporation
3617 131st Ave. S.E.
Bellevue, Washington 98006
e-mail: stevegu@attachmate.com
phone: 425-649-6221
Brawn & Gunn Informational Page 9
Ohio-00 Open Host Interface Objects September 1998
Appendix A - Ohio Java Mapping
//
//
// Ohio -- Base interface for all Ohio Interfaces
//
//
public interface Ohio
{
public Object getVendor();
// enum OHIO_DIRECTION
public static final int OHIO_DIRECTION_FORWARD = 0;
public static final int OHIO_DIRECTION_BACKWARD = 1;
// enum OHIO_TYPE -- used by OHIOSession.SessionType
public static final int OHIO_TYPE_UNKNOWN = 0;
public static final int OHIO_TYPE_3270 = 1;
public static final int OHIO_TYPE_5250 = 2;
public static final int OHIO_TYPE_VT = 3;
// enum OHI_STATE -- used by OHIOSessionEvents.onSessionChanged
public static final int OHIO_STATE_DISCONNECTED = 0;
public static final int OHIO_STATE_CONNECTED = 1;
// enum OHIO_PLANE - used by OHIOScreen.getData
public static final int OHIO_PLANE_TEXT = 1;
public static final int OHIO_PLANE_COLOR = 2;
public static final int OHIO_PLANE_FIELD = 4;
public static final int OHIO_PLANE_EXTENDED = 8;
// type OHIO_COLOR - used by OHIOScreen.getData(COLOR)
public static final int OHIO_COLOR_BLACK = 0;
public static final int OHIO_COLOR_BLUE = 1;
public static final int OHIO_COLOR_GREEN = 2;
public static final int OHIO_COLOR_CYAN = 3;
public static final int OHIO_COLOR_RED = 4;
public static final int OHIO_COLOR_MAGENTA = 5;
public static final int OHIO_COLOR_WHITE = 7;
public static final int OHIO_COLOR_YELLOW = 14;
// OHIO_EXTENDED -- used by OhioScreen.getData(EXTENDED)
public static final int OHIO_EXTENDED_HILITE = 0xC0;
public static final int OHIO_EXTENDED_COLOR = 0x38;
public static final int OHIO_EXTENDED_RESERVED = 0x07;
Brawn & Gunn Informational Page 10
Ohio-00 Open Host Interface Objects September 1998 The operator information area of a host session. This area is
used to provide status information regarding the state of the host
session and location of the cursor.
// OHIO_EXTENDED >> 6 An OhioOIA object can be obtained using the GetOIA() method on an
public static final int OHIO_EXTENDED_HILITE_NORMAL = 0; instance of OhioScreen.
public static final int OHIO_EXTENDED_HILITE_BLINK = 1;
public static final int OHIO_EXTENDED_HILITE_REVERSEVIDEO = 2;
public static final int OHIO_EXTENDED_HILITE_UNDERSCORE = 3;
// (OHIO_EXTENDED>>3) & 7 Interface OhioOIA {
public static final int OHIO_EXTENDED_COLOR_DEFAULT = 0; // Indicates whether the field which contains the cursor is an
public static final int OHIO_EXTENDED_COLOR_BLUE = 1; // alphanumeric field. True if the cursor is in an
public static final int OHIO_EXTENDED_COLOR_RED = 2; // alphanumeric field, false otherwise.
public static final int OHIO_EXTENDED_COLOR_PINK = 3; Readonly Attribute boolean Alphanumeric;
public static final int OHIO_EXTENDED_COLOR_GREEN = 4;
public static final int OHIO_EXTENDED_COLOR_TURQUOISE = 5;
public static final int OHIO_EXTENDED_COLOR_YELLOW = 6;
public static final int OHIO_EXTENDED_COLOR_WHITE = 7;
// type OHIO_FIELD -- used by OhioScreen.getData(FIELD) // The communication check code. If InputInhibited returns
public static final int OHIO_FIELD_ATTRIBUTE = 0xC0; // OHIO_INPUTINHIBITED_COMMCHECK, this property will return the
public static final int OHIO_FIELD_PROTECTED = 0x20; // communication check code.
public static final int OHIO_FIELD_NUMERIC = 0x10; Readonly Attribute int CommCheckCode;
public static final int OHIO_FIELD_PEN_SELECTABLE = 0x08;
public static final int OHIO_FIELD_HIGH_INTENSITY = 0x04;
public static final int OHIO_FIELD_HIDDEN = 0x0C;
public static final int OHIO_FIELD_RESERVED = 0x02;
public static final int OHIO_FIELD_MODIFIED = 0x01;
// enum OHIO_UPDATE - used by OhioScreenEvents.onScreenChanged // Indicates whether or not input is inhibited. If input is
public static final int OHIO_UPDATE_HOST = 0; // inhibited, SendKeys or SendAID calls to the OhioScreen are
public static final int OHIO_UPDATE_CLIENT = 1; // not allowed. Why input is inhibited can be determined from
// the value returned. If input is inhibited for more than one
// reason, the highest value is returned.
Readonly Attribute OHIO_INPUTINHIBITED InputInhibited;
// enum OHIO_OWNER -- used by OhioOIA.owner // The machine check code. If InputInhibited returns
public static final int OHIO_OWNER_UNKNOWN = 0; // OHIO_INPUTINHIBITED_MACHINECHECK, this property will return
public static final int OHIO_OWNER_APP = 1; // the machine check code.
public static final int OHIO_OWNER_MYJOB = 1; Readonly Attribute int MachineCheckCode;
public static final int OHIO_OWNER_NVT = 2;
public static final int OHIO_OWNER_UNOWNED = 3;
public static final int OHIO_OWNER_SSCP = 4;
// enum OHIO_INPUTINHIBITED - used by OhioOIA.InputInhibited // Indicates whether the field which contains the cursor is a
public static final int OHIO_INPUTINHIBITED_NOTINHIBITED = 0; // numeric-only field. True if the cursor is in a numeric-only
public static final int OHIO_INPUTINHIBITED_SYSTEM_WAIT = 1; // field, false otherwise.
public static final int OHIO_INPUTINHIBITED_COMMCHECK = 2; Readonly Attribute boolean Numeric;
public static final int OHIO_INPUTINHIBITED_PROGCHECK = 3;
public static final int OHIO_INPUTINHIBITED_MACHINECHECK = 4;
public static final int OHIO_INPUTINHIBITED_OTHER = 5;
}
public interface OhioManager // Indicates the owner of the host connection.
{ Readonly Attribute OHIO_OWNER Owner;
Brawn & Gunn Informational Page 11 // The program check code. If InputInhibited returns
// OHIO_INPUTINHIBITED_PROGCHECK, this property will return the
// program check code.
Readonly Attribute int ProgCheckCode;
Ohio-00 Open Host Interface Objects September 1998 };
// Properties 2.6 OhioPosition
public OhioSessions getSessions();
// Methods Holds row and column coordinates. An OhioPosition can be
public OhioSession findSession(String configurationResource, constructed by using CreateOhioPosition() on any Ohio class.
String sessionName);
} Interface OhioPosition {
public interface OhioSessions extends Ohio // The row coordinate
{ Attribute int Row;
// Properties // The column coordinate.
public int getCount(); Attribute int Column;
// Methods };
public OhioSession Item(int sessionNumber); 2.7 OhioScreen
public OhioSession Item(String sessionName);
public void refresh();
} OhioScreen encapsulates the host presentation space. The
presentation space is a virtual screen which contains all the
characters and attributes that would be seen on a traditional
emulator screen. This virtual screen is the primary object for
text-based interactions with the host. The OhioScreen provides
methods that manipulate text, search the screen, send keystrokes
to the host, and work with the cursor.
public interface OhioSession extends Ohio An OhioScreen object can be obtained from the Screen property of
{ an instance of OhioSession.
// Properties The raw presentation space data is maintained in a series of
public String getConfigurationResource(); planes which can be accessed by various methods within this class.
public boolean isConnected(); The text plane contains the actual characters in the presentation
public String getSessionName(); space. Most of the methods in OhioScreen class work exclusively
public int getSessionType(); with the text plane.
public OhioScreen Screen;
// Methods The remaining planes contain the corresponding attributes for each
public void connect(); character in the text plane. The color plane contains color
public void disconnect(); characteristics. The field plane contains the field attributes.
The extended plane contains the extended field attributes. The
color, field, and extended planes are not interpreted by any of
the methods in this class.
// Events Interface OhioScreen {
public void addSessionListener(OHIOSessionListener listener);
public void removeSessionListener(OHIOSessionListener listener);
}
public interface OhioScreen extends Ohio { // The location of the cursor in the presentation space. The
// row and column of the cursor is contained within the
// OhioPosition object.
Attribute OhioPosition Cursor;
// Properties // The OhioOIA object associated with this presentation space.
public OhioPosition getCursor(); // This object can be used to query the status of the operator
public void setCursor(OhioPosition position); // information area.
public OhioOIA getOIA(); Readonly Attribute OhioOIA OIA;
public OhioFields getFields();
public int getRows();
Brawn & Gunn Informational Page 12 // The OhioFields object associated with this presentation
// space. This provides another way to access the data in the
// virtual screen. The OhioFields object contains a snapshot
// of all the fields in the current virtual screen. Fields
// provide methods for interpreting the data in the non-text
// planes. Zero length fields (due to adjacent field
// attributes) are not returned in the OhioFields collection.
// For unformatted screens, the returned collection contains
// only one OhioField that contains the whole virtual screen.
Readonly Attribute OhioFields Fields;
Ohio-00 Open Host Interface Objects September 1998 // The number of rows in the presentation space.
Readonly Attribute int Rows;
// The number of columns in the presentation space.
Readonly Attribute int Columns;
public int getColumns(); // The entire text plane of the virtual screen as a string.
public String getText(); // All null characters and Field Attribute characters are
// returned as blank space characters.
Readonly Attribute string String;
// Methods // Returns a character array containing the data from the Text,
public byte getData(OhioPosition start, // Color, Field or Extended plane of the virtual screen.
// start The row and column where to start. The position
// is inclusive (for example, row 1, col 1 means that
// position 1,1 will be used as the starting location
// and 1,1 will be included in the data). "start"
// must be positionally less than "end".
// end The row and column where to end. The position is
// inclusive (for example, row 1, col 1 means that
// position 1,1 will be used as the ending location
// and 1,1 will be included in the data). "end" must
// be positionally greater than "start".
// plane A valid OHIO_PLANE value.
char[] getData(OhioPosition start,
OhioPosition end, OhioPosition end,
int plane); OHIO_PLANE plane);
public OhioPosition findString(String text,
// Searches the text plane for the target string. If found,
// returns an OhioPosition object containing the target
// location. If not found, returns a null. The targetString
// must be completely contained by the target area for the
// search to be successful. Null characters in the text plane
// are treated as blank spaces during search processing.
// targetString The target string.
// startPos The row and column where to start. The
// position is inclusive (for example, row 1,
// col 1 means that position 1,1 will be used as
// the starting location and 1,1 will be included
// in the search).
// length The length from startPos to include in the
// search.
// dir An OHIO_DIRECTION value.
// ignoreCase Indicates whether the search is case
// sensitive. True means that case will be
// ignored. False means the search will be case
// sensitive.
OhioPosition FindString(string targetString,
OhioPosition start, OhioPosition start,
OhioPosition end, int length,
int direction, int OHIO_DIRECTION,
boolean ignoreCase); boolean ignoreCase);
public void sendKeys(String text, // The sendKeys method sends a string of keys to the virtual
OhioPosition location); // screen. This method acts as if keystrokes were being typed
public void putString(String text, // from the keyboard.
//
// The keystrokes will be sent to the location given. If no
// location is provided, the keystrokes will be sent to the
// current cursor location.
// text The string of characters to be sent.
void sendKeys(string text,
OhioPosition location); OhioPosition location);
// Events // The sendAid method sends an "aid" keystroke to the virtual
public void addScreenListener(OHIOScreenListener listener); // screen. These aid keys can be though of as special
public void removeScreenListener(OHIOScreenListener listener); // keystrokes, like the Enter key, the Tab key, or the Page Up
}
public interface OhioScreenListener
{
public void onScreenChanged(int inUpdate,
OhioPosition inStart,
OhioPosition inEnd);
}
public interface OhioOIA extends Ohio
{
// Properties
public boolean isAlphanumeric();
public boolean isAPL();
public int getCommCheckCode();
public int getInputInhibited(); // Uses OHIO_INPUT_INHIBITED
public int getMachineCheckCode();
public boolean isNumeric();
//public boolean isInsertMode();
public int getOwner(); // Uses OHIO_OWNER
public int getProgCheckCode();
// Methods
Brawn & Gunn Informational Page 13
Ohio-00 Open Host Interface Objects September 1998
// Events
public void addOIAListener(OhioOIAListener listener);
public void removeOIAListener(OhioOIAListener listener);
}
public interface OhioOIAListener
{
public void onOIAChanged();
}
public interface OhioFields extends Ohio
{
// Properties
public int getCount();
// Methods
public OhioField Item(int fieldIndex);
public void refresh();
public OhioField findByString(String targetString,
OhioPosition startPos,
OhioPosition endPos,
int dir, // Uses OHIO_DIRECTION
boolean ignoreCase);
public OhioField findByPosition(OhioPosition targetPosition);
}
public interface OhioField extends Ohio
{
// Properties
public OhioPosition getStart();
public OhioPosition getEnd();
public int getLength();
public int getAttribute(); // Uses OHIO_FIELD enumeration
public boolean isModified();
public boolean isProtected();
public boolean isNumeric();
public boolean isHighIntensity();
public boolean isPenSelectable();
public boolean isHidden();
public String getText();
public void setText(String text);
Brawn & Gunn Informational Page 14
Ohio-00 Open Host Interface Objects September 1998
// Methods
public byte getData(int targetPlane); // Uses OHIO_PLANE
}
public interface OhioPosition {
// Properties
public int getRow();
public int getColumn();
public void setRow(int);
public void setColumn(int);
}
Brawn & Gunn Informational Page 15
Ohio-00 Open Host Interface Objects September 1998
Appendix B - Ohio ActiveX IDL Mapping
//+--------------------------------------------------------------------+
// OPEN HOST INTERFACE OBJECT (OHIO) INTERFACE DEFINITIONS
//+--------------------------------------------------------------------+
// IOhioManager Manager provides access to a...
// IOhioSessions Collection of...
// IOhioSession Sessions, which has a...
// IOhioScreen Screen containing an...
// IOhioOIA OIA, and a...
// IOhioFields Collection of...
// IOhioField Fields
//
// IOhioPosition 1-based Row/Col Position used
//
//+--------------------------------------------------------------------+
import "oaidl.idl";
import "ocidl.idl";
//+--------------------------------------------------------------+
// OHIO DATA TYPES
//+--------------------------------------------------------------+
typedef v1_enum enum OHIO_DIRECTION
{
OHIO_DIRECTION_FORWARD = 0,
OHIO_DIRECTION_BACKWARD = 1
} OHIO_DIRECTION;
//+---------------------------------------------+
// SESSION DATA TYPES
//+---------------------------------------------+
typedef v1_enum enum OHIO_TYPE
{
OHIO_TYPE_UNKNOWN = 0,
OHIO_TYPE_3270 = 1,
OHIO_TYPE_5250 = 2,
OHIO_TYPE_VT = 3
} OHIO_TYPE; // USED BY IOhioSession.SessionType
typedef v1_enum enum OHIO_STATE
{
OHIO_STATE_DISCONNECTED = 0,
OHIO_STATE_CONNECTED = 1
} OHIO_STATE; //USED BY IOhioSessionEvents.OnSessionChanged
Brawn & Gunn Informational Page 16
Ohio-00 Open Host Interface Objects September 1998
//+---------------------------------------------+
// SCREEN DATA TYPES
//+---------------------------------------------+
typedef v1_enum enum OHIO_PLANE
{
OHIO_PLANE_TEXT = 1,
OHIO_PLANE_COLOR = 2,
OHIO_PLANE_FIELD = 4,
OHIO_PLANE_EXTENDED = 8
} OHIO_PLANE; //USED BY IOhioScreen.GetData
typedef long OHIO_COLOR; //USED BY IOhioScreen.GetData(COLOR)
const long OHIO_COLOR_BLACK = 0;
const long OHIO_COLOR_BLUE = 1;
const long OHIO_COLOR_GREEN = 2;
const long OHIO_COLOR_CYAN = 3;
const long OHIO_COLOR_RED = 4;
const long OHIO_COLOR_MAGENTA = 5;
const long OHIO_COLOR_WHITE = 7;
const long OHIO_COLOR_YELLOW = 14;
typedef long OHIO_EXTENDED; //USED BY IOhioScreen.GetData(EXTENDED)
const long OHIO_EXTENDED_HILITE = 0xC0;
const long OHIO_EXTENDED_COLOR = 0x38;
const long OHIO_EXTENDED_RESERVED = 0x07;
//OHIO_EXTENDED>>6
const long OHIO_EXTENDED_HILITE_NORMAL = 0;
const long OHIO_EXTENDED_HILITE_BLINK = 1;
const long OHIO_EXTENDED_HILITE_REVERSEVIDEO = 2;
const long OHIO_EXTENDED_HILITE_UNDERSCORE = 3;
//(OHIO_EXTENDED>>3)&7
const long OHIO_EXTENDED_COLOR_DEFAULT = 0;
const long OHIO_EXTENDED_COLOR_BLUE = 1;
const long OHIO_EXTENDED_COLOR_RED = 2;
const long OHIO_EXTENDED_COLOR_PINK = 3;
const long OHIO_EXTENDED_COLOR_GREEN = 4;
const long OHIO_EXTENDED_COLOR_TURQUOISE = 5;
const long OHIO_EXTENDED_COLOR_YELLOW = 6;
const long OHIO_EXTENDED_COLOR_WHITE = 7;
Brawn & Gunn Informational Page 17
Ohio-00 Open Host Interface Objects September 1998
typedef long OHIO_FIELD; //USED BY IOhioScreen.GetData(FIELD)
const long OHIO_FIELD_ATTRIBUTE = 0xC0;
const long OHIO_FIELD_PROTECTED = 0x20;
const long OHIO_FIELD_NUMERIC = 0x10;
const long OHIO_FIELD_PEN_SELECTABLE = 0x08;
const long OHIO_FIELD_HIGH_INTENSITY = 0x04;
const long OHIO_FIELD_HIDDEN = 0x0C;
const long OHIO_FIELD_RESERVED = 0x02;
const long OHIO_FIELD_MODIFIED = 0x01;
typedef v1_enum enum OHIO_UPDATE
{
OHIO_UPDATE_HOST = 0,
OHIO_UPDATE_CLIENT = 1,
} OHIO_UPDATE; //USED BY IOhioScreenEvents.OnScreenChanged
//+---------------------------------------------+
// OIA DATA TYPES
//+---------------------------------------------+
typedef v1_enum enum OHIO_OWNER
{
OHIO_OWNER_UNKNOWN = 0,
OHIO_OWNER_APP = 1,
OHIO_OWNER_MYJOB = 1,
OHIO_OWNER_NVT = 2,
OHIO_OWNER_UNOWNED = 3,
OHIO_OWNER_SSCP = 4
} OHIO_OWNER; //USED BY IOhioOIA.Owner
typedef v1_enum enum OHIO_INPUTINHIBITED
{
OHIO_INPUTINHIBITED_NOTINHIBITED = 0,
OHIO_INPUTINHIBITED_SYSTEM_WAIT = 1,
OHIO_INPUTINHIBITED_COMMCHECK = 2,
OHIO_INPUTINHIBITED_PROGCHECK = 3,
OHIO_INPUTINHIBITED_MACHINECHECK = 4,
OHIO_INPUTINHIBITED_OTHER = 5
} OHIO_INPUTINHIBITED; //USED BY IOhioOIA.InputInhibited
Brawn & Gunn Informational Page 18
Ohio-00 Open Host Interface Objects September 1998
//+--------------------------------------------------------------+
// IOhio
//+--------------------------------------------------------------+
// Base interface for all OHIO interfaces
//+--------------------------------------------------------------+
object,
uuid(10065CA3-E921-11D1-B2DF-0060080708DC),
dual,
helpstring("IOhio Interface"),
pointer_default(unique)
interface IOhio : IDispatch
{
id(99),propget HRESULT Vendor (out,retval IDispatch** outValue);
}
//+--------------------------------------------------------------+
// IOhioPosition
//+--------------------------------------------------------------+
// Zero is a "don't care" value.
//+--------------------------------------------------------------+
object,
uuid(25BEAEFC-B795-11D1-B2D1-0060080708DC),
dual,
helpstring("IOhioPosition Interface"),
pointer_default(unique)
interface IOhioPosition : IOhio
{
id(1), propput HRESULT Row (in long inRow );
id(1), propget HRESULT Row (out,retval long* outRow );
id(2), propput HRESULT Column(in long inColumn);
id(2), propget HRESULT Column(out,retval long* outColumn);
};
//+--------------------------------------------------------------+
// IOhioOIA
//+--------------------------------------------------------------+
object,
uuid(25BEAEF2-B795-11D1-B2D1-0060080708DC),
dual,
helpstring("IOhioOIA Interface"),
pointer_default(unique)
Brawn & Gunn Informational Page 19
Ohio-00 Open Host Interface Objects September 1998
interface IOhioOIA : IOhio
{
id(0 ),propget HRESULT Text (out,retval BSTR* outValue);
id(1 ),propget HRESULT Alphanumeric (out,retval
VARIANT_BOOL* outValue);
id(2 ),propget HRESULT APL (out,retval VARIANT_BOOL* outValue);
id(3 ),propget HRESULT Numeric (out,retval
VARIANT_BOOL* outValue);
id(4 ),propget HRESULT InsertMode (out,retval
VARIANT_BOOL* outValue);
id(10),propget HRESULT ProgCheckCode (out,retval
long* outValue);
id(11),propget HRESULT CommCheckCode (out,retval
long* outValue);
id(12),propget HRESULT MachineCheckCode (out,retval
long* outValue);
id(20),propget HRESULT Owner (out,retval
OHIO_OWNER* outValue);
id(21),propget HRESULT InputInhibited (out,retval
OHIO_INPUTINHIBITED* outValue);
};
object,
uuid(45896ACE-BCF8-11D1-B2D3-0060080708DC),
dual,
helpstring("IOhioOIAEvents Interface"),
pointer_default(unique)
interface IOhioOIAEvents : IUnknown
{
id(0) HRESULT OnOIAChanged();
};
cpp_quote("EXTERN_C const IID IID_DOhioOIAEvents;")
uuid(45896AD0-BCF8-11D1-B2D3-0060080708DC),
hidden,
helpstring("DOhioOIAEvents Interface"),
dispinterface DOhioOIAEvents
{
properties:
methods:
id(0) HRESULT OnOIAChanged();
};
Brawn & Gunn Informational Page 20
Ohio-00 Open Host Interface Objects September 1998
//+--------------------------------------------------------------+
// IOhioField
//+--------------------------------------------------------------+
object,
uuid(25BEAEF4-B795-11D1-B2D1-0060080708DC),
dual,
helpstring("IOhioField Interface"),
pointer_default(unique)
interface IOhioField : IOhio
{
id(0), propput HRESULT Text (in BSTR inValue);
id(0), propget HRESULT Text (out,retval BSTR* outValue);
id(1), propget HRESULT Start (out,retval IOhioPosition**
outValue);
id(2), propget HRESULT End (out,retval IOhioPosition** outValue);
id(3), propget HRESULT Length (out,retval long* outValue);
id(10),propget HRESULT Attribute (out,retval OHIO_FIELD*
outValue);
id(11),propget HRESULT Modified (out,retval VARIANT_BOOL*
outValue);
id(12),propget HRESULT Protected (out,retval VARIANT_BOOL*
outValue);
id(13),propget HRESULT Numeric (out,retval VARIANT_BOOL*
outValue);
id(14),propget HRESULT PenSelectable (out,retval
VARIANT_BOOL* outValue);
id(15),propget HRESULT Hidden (out,retval VARIANT_BOOL*
outValue);
id(16),propget HRESULT HighIntensity (out,retval
VARIANT_BOOL* outValue);
id(17),propget HRESULT Normal (out,retval VARIANT_BOOL*
outValue);
id(30) HRESULT GetData (in OHIO_PLANE
inPlane,out,retval VARIANT* outData);
};
Brawn & Gunn Informational Page 21
Ohio-00 Open Host Interface Objects September 1998 // key. All the valid special key values are contained in the
// OHIO_AID enumeration.
// aidKey The aid key to send to the virtual screen.
void sendAid(OHIO_AID aidKey);
//+--------------------------------------------------------------+ // The putString method sends a string to the virtual screen at
// IOhioFields // the specified location. The string will overlay only
//+--------------------------------------------------------------+ // unprotected fields, and any parts of the string which fall
object,
uuid(25BEAEFA-B795-11D1-B2D1-0060080708DC),
dual,
helpstring("IOhioFields Interface"),
pointer_default(unique)
interface IOhioFields : IOhio
{
id(0), propget HRESULT Item (in long inIndexOrKey,out,retval
IOhioField** outElement);
id(1), propget HRESULT Count (out,retval long *pVal);
id(10) HRESULT Refresh ();
id(20) HRESULT FindByPosition (in IOhioPosition* // over protected fields will be discarded.
inPosition,out,retval IOhioField** outField); // text String to place in the virtual screen.
id(21) HRESULT FindByString (in BSTR inString, // location Position where the string should be written.
in IOhioPosition* inStart, void setString(string text,
in IOhioPosition* inEnd, OhioPosition location);
in OHIO_DIRECTION inDir,
in VARIANT_BOOL inIgnoreCase,
out,retval IOhioField** outField);
id(DISPID_NEWENUM),propget,restricted HRESULT
_NewEnum(out,retval IUnknown** outEnum);
}; };
//+--------------------------------------------------------------+ 2.8 OhioSession
// IOhioScreen
//+--------------------------------------------------------------+
object,
uuid(25BEAEEE-B795-11D1-B2D1-0060080708DC),
dual,
helpstring("IOhioScreen Interface"),
pointer_default(unique)
interface IOhioScreen : IOhio
{
id(0), propget HRESULT OIA (out,retval IOhioOIA** outOIA);
id(1), propget HRESULT Fields (out,retval IOhioFields** outOIA);
id(2), propget HRESULT Text (out,retval BSTR* outText);
Brawn & Gunn Informational Page 22
Ohio-00 Open Host Interface Objects September 1998 A host session.
id(10),propget HRESULT Rows (out,retval long* outRows); Interface OhioSession {
id(11),propget HRESULT Columns (out,retval long* outColumns);
id(12),propput HRESULT Cursor (in IOhioPosition* inPos);
id(12),propget HRESULT Cursor (out,retval IOhioPosition**
outPos);
id(20) HRESULT SendKeys (in BSTR inKeys, // The configurationResource for this OhioSession object.
in IOhioPosition* inPos); Readonly Attribute string ConfigurationResource;
id(22) HRESULT FindString (in BSTR inString, // Indicates whether this OhioSession object is connected to a
in IOhioPosition* inStart, // host. True means connected, false means not connected.
in IOhioPosition* inEnd, Readonly Attribute boolean Connected;
in OHIO_DIRECTION inDir,
in VARIANT_BOOL inIgnoreCase,
out,retval IOhioPosition**
outPos);
id(23) HRESULT PutString (in BSTR inText,
in IOhioPosition* inStart);
id(30) HRESULT GetData (in IOhioPosition* inStart, // The SessionName for this OhioSession object. The
in IOhioPosition* inEnd, // SessionName is unique among all instances of OhioSession.
in OHIO_PLANE inPlane, Readonly Attribute string SessionName;
out,retval VARIANT* outData);
};
// The SessionType for this OhioSession object.
object, Readonly Attribute OHIO_TYPE SessionType;
uuid(45896AC5-BCF8-11D1-B2D3-0060080708DC), // The OhioScreen object for this session.
dual, Readonly Attribute OhioScreen Screen;
helpstring("IOhioScreenEvents Interface"),
pointer_default(unique)
interface IOhioScreenEvents : IUnknown
{
id(0) HRESULT OnScreenChanged (in OHIO_UPDATE inUpdate,
in IOhioPosition* inStart,
in IOhioPosition* inEnd);
};
Brawn & Gunn Informational Page 23 // Starts the communications link to the host.
void Connect();
Ohio-00 Open Host Interface Objects September 1998 // Stops the communications link to the host.
void Disconnect();
cpp_quote("EXTERN_C const IID IID_DOhioScreenEvents;")
uuid(45896AC7-BCF8-11D1-B2D3-0060080708DC),
hidden,
helpstring("DOhioScreenEvents Interface"),
dispinterface DOhioScreenEvents
{
properties:
methods:
id(0) HRESULT OnScreenChanged (in OHIO_UPDATE inUpdate,
in IOhioPosition* inStart,
in IOhioPosition* inEnd);
}; };
//+--------------------------------------------------------------+ 2.9 OhioSessions
// IOhioSession
//+--------------------------------------------------------------+
object,
uuid(25BEAEF6-B795-11D1-B2D1-0060080708DC),
dual,
helpstring("IOhioSession Interface"),
pointer_default(unique)
interface IOhioSession : IOhio
{
id(0), propget HRESULT Screen (out,retval IOhioScreen**
outScreen);
id(1), propget HRESULT Connected (out,retval OHIO_STATE*
outValue);
id(2) HRESULT Connect ();
id(3) HRESULT Disconnect ();
id(10),propget HRESULT ConfigurationResource(out,retval BSTR*
outValue);
id(11),propget HRESULT SessionName (out,retval BSTR* outValue);
id(12),propget HRESULT SessionType (out,retval OHIO_TYPE*
outValue);
};
Contains a collection of OhioSession objects. This list is a
object, static snapshot of the list of OhioSession objects available at
uuid(45896ACA-BCF8-11D1-B2D3-0060080708DC), the time of the snapshot.
dual,
helpstring("IOhioSessionEvents Interface"),
pointer_default(unique)
Brawn & Gunn Informational Page 24 Interface OhioSessions {
Ohio-00 Open Host Interface Objects September 1998 // The number of OhioSession objects contained in this
// collection.
Readonly Attribute int Count;
interface IOhioSessionEvents : IUnknown // The OhioSession object at the given index. "One based"
{ // indexing is used in all Ohio collections. For example, the
id(0) HRESULT OnSessionChanged (in OHIO_STATE inState); // first OhioSession in this collection is at index 1.
}; // index The index of the target OhioSession.
OhioSession Item(int index);
cpp_quote("EXTERN_C const IID IID_DOhioSessionEvents;") // The OhioSession object with the given SessionName. Returns
// null if no object with that name exists in this collection.
uuid(45896ACC-BCF8-11D1-B2D3-0060080708DC), // SessionName The target name.
hidden, OhioSession Item(string SessionName);
helpstring("DOhioSessionEvents Interface"),
dispinterface DOhioSessionEvents
{
properties:
methods:
id(0) HRESULT OnSessionChanged (in OHIO_STATE inState);
};
//+--------------------------------------------------------------+ // Updates the collection of OhioSession objects. All
// IOhioSessions // OhioSession objects that are available on the system at the
//+--------------------------------------------------------------+ // time of the refresh will be added to the collection.
// Indexing of OhioSession objects will not be preserved across
object, // refreshes.
uuid(25BEAEF8-B795-11D1-B2D1-0060080708DC), void Refresh();
dual,
helpstring("IOhioSessions Interface"),
pointer_default(unique)
interface IOhioSessions : IOhio
{
id(0), propget HRESULT Item (in VARIANT inIndexOrKey,
out,retval IOhioSession** outElement);
id(1), propget HRESULT Count (out,retval long *pVal);
id(10), HRESULT Refresh ();
id(DISPID_NEWENUM),propget,restricted HRESULT
_NewEnum(out,retval IUnknown** outEnum);
}; };
//+--------------------------------------------------------------+ 3.0 Acknowledgments
// IOhioManager
//+--------------------------------------------------------------+
object,
uuid(25BEAF00-B795-11D1-B2D1-0060080708DC),
dual,
helpstring("IOhioManager Interface"),
pointer_default(unique)
Brawn & Gunn Informational Page 25
Ohio-00 Open Host Interface Objects September 1998
interface IOhioManager : IOhio This document was initiated in the TN3270E Working Group and was
{ completed by a dedicated group of interested parties.
id(0), propget HRESULT Sessions (out,retval
IOhioSessions** outSessions);
id(1) HRESULT FindSession (in BSTR inConfigResource, The authors wish to thank the following individuals for their
in BSTR inSessionName, contributions to this document:
out,retval IOhioSession** outSession); - Jeffrey Altman, Columbia University
}; - Eugene Aresteanu, Eicon Technology
- Blair Cooper, Attachmate Corporation
- Andrew Duckworth, Platypus Partners, Inc.
- Brian L. Henry, Attachmate Corporation
- Gary Horen, WRQ
- Pierre Goyette, Hummingbird Communications, Ltd.
- Greg Knowles, IBM Corporation
- Warren Mackensen, NetManage, Inc.
- Mark McMillan, IBM Corporation
- Hemant Nanivadekar, Attachmate Corporation
- J. Burke Ryder, Attachmate Corporation
- Brian Webb, IBM Corporation
Brawn & Gunn Informational Page 26 4.0 References
Ohio-00 Open Host Interface Objects September 1998 - International Business Machines Corporation, "eNetwork Personal
Communications Version 4.2 for Windows 95 and Windows NT Host
Access Class Library", September 1997.
- International Business Machines Corporation, "Host On-Demand
Version 2.0 Host Access Class Library for Java Reference",
October 1997.
- Attachmate Corporation, "EXTRA! Objects SDK Reference Guide for
C++", October 1997.
Appendix C - SendKeys Mnemonics 5.0 How to Contact the Authors
This table contains the list of mnemonic keywords valid in the Thomas Brawn
OhioScreen::SendKey() method. Mnemonic keywords adhere to the IBM Corporation
following rules: 4205 S. Miami Blvd
RTP, NC 27709
e-mail: brawntj@us.ibm.com
phone: 919-254-8301
1) Keywords are enclosed in square brackets "". Stephen Gunn
2) Keywords are case insensitive (for example, Attn is Attachmate Corporation
identical to attn). 3617 131st Ave. S.E.
3) Literal square brackets must be doubled. Bellevue, Washington 98006
e-mail: stevegu@attachmate.com
phone: 425-649-6221
Example SendKey strings: Appendix A - Ohio Java Mapping
abcpf1 Sends character keys "abc" followed by the Available using anonymous ftp from ftp.boulder.ibm.com. Once
PF1 AID key logged in, change to the software/standards/ohio/java directory
backspaceٍx Sends 3270 backspace key followed by the 3 to download the Java classes.
characters "x"
xyzCLEAR Sends characters "xyz" followed by 3270 Clear
AID key
+----------------+-----------------------+------------+----------------+ Appendix B - Ohio ActiveX IDL Mapping
3270 IBM HACL Extra! Objects
Mnemonic Function Description Equivalent Equivalent
+----------------+-----------------------+------------+----------------+
attn Attention AID key attn <Attn>
+----------------+-----------------------+------------+----------------+
clear Clear AID key clear <Clear>
+----------------+-----------------------+------------+----------------+
cursorselect Cursor Select AID key crsel <CursorSelect>
<PenSelect>???
+----------------+-----------------------+------------+----------------+
enter Enter AID key enter <Enter>
+----------------+-----------------------+------------+----------------+
sysreq System Request sysreq <SysReq>
+----------------+-----------------------+------------+----------------+
pa1 Program Attention 1 pa1 <Pa1>
AID key
+----------------+-----------------------+------------+----------------+
pa2 Program Attention 2 pa2 <Pa2>
AID key
+----------------+-----------------------+------------+----------------+
pa3 Program Attention 3 pa3 <Pa3>
AID key
+----------------+-----------------------+------------+----------------+
pf1 Program Function 1 pf1 <Pf1>
AID key
+----------------+-----------------------+------------+----------------+
pf2 Program Function 2 pf2 <Pf2>
AID key
Brawn & Gunn Informational Page 27 Available using anonymous ftp from ftp.boulder.ibm.com. Once
logged in, change to the software/standards/ohio/idl directory to
download the idl file.
Ohio-00 Open Host Interface Objects September 1998 Appendix C - 3270 Format Control Orders
+----------------+-----------------------+------------+----------------+ This appendix specifies the representation of 3270 Format Control
pf3 Program Function 3 pf3 <Pf3> Orders within OHIO text strings.
AID key
+----------------+-----------------------+------------+----------------+
pf4 Program Function 4 pf4 <Pf4>
AID key
+----------------+-----------------------+------------+----------------+
pf5 Program Function 5 pf5 <Pf5>
AID key
+----------------+-----------------------+------------+----------------+
pf6 Program Function 6 pf6 <Pf6>
AID key
+----------------+-----------------------+------------+----------------+
pf7 Program Function 7 pf7 <Pf7>
AID key
+----------------+-----------------------+------------+----------------+
pf8 Program Function 8 pf8 <Pf8>
AID key
+----------------+-----------------------+------------+----------------+
pf9 Program Function 9 pf9 <Pf9>
AID key
+----------------+-----------------------+------------+----------------+
pf10 Program Function 10 pf10 <Pf10>
AID key
+----------------+-----------------------+------------+----------------+
pf11 Program Function 11 pf11 <Pf11>
AID key
+----------------+-----------------------+------------+----------------+
pf12 Program Function 12 pf12 <Pf12>
AID key
+----------------+-----------------------+------------+----------------+
pf13 Program Function 13 pf13 <Pf13>
AID key
+----------------+-----------------------+------------+----------------+
pf14 Program Function 14 pf14 <Pf14>
AID key
+----------------+-----------------------+------------+----------------+
pf15 Program Function 15 pf15 <Pf15>
AID key
+----------------+-----------------------+------------+----------------+
pf16 Program Function 16 pf16 <Pf16>
AID key
+----------------+-----------------------+------------+----------------+
pf17 Program Function 17 pf17 <Pf17>
AID key
+----------------+-----------------------+------------+----------------+
pf18 Program Function 18 pf18 <Pf18>
AID key
Brawn & Gunn Informational Page 28 The following special control codes are classified as 3270 format
control orders. (This information is excerpted from the IBM 3270
Information Display System Data Stream Programmer's Reference,
Document Number GA23-0059-07.) On a 3270 display device, these
format control orders are stored in the device buffer and
displayed as shown below. Their representation in OHIO text
strings (OhioScreen and OhioField) is included in the ANSI and
UNICODE columns. The ANSI values were taken from the IBM
Character Data Representation Library Character Data
Representation Architecture Reference and Registry, Document
Number SC09-2190-00. The UNICODE values were taken from
ADDITIONAL CONTROL PICTURES FOR UNICODE,
ftp://kermit.columbia.edu/kermit/ucsterminal/control.txt. Some
of these values are proposed extensions to the Unicode Control
Pictures.
Ohio-00 Open Host Interface Objects September 1998 Abbr Order EBCDIC ANSI Unicode Displayed As
.
NUL Null 00 00 2400 A blank, suppressed on
Read Modified
SUB Substitute 3F 1A 241A A solid circle
DUP Duplicate 1C 1C E07B An overscore asterisk
FM Field Mark 1E 1E E07D An overscore semicolon
FF Form Feed 0C 0C 240C A blank
CR Carriage Return 0D 0D 240D A blank
NL New Line 15 85 2424 A blank
EM End of Medium 19 19 2419 A blank
EO Eight Ones FF 9F E07F A blank
+----------------+-----------------------+------------+----------------+ Notes:
pf19 Program Function 19 pf19 <Pf19> ANSI 85: Conflicts with "Next Line" C1 control character (ISO
AID key 6429).
+----------------+-----------------------+------------+----------------+ ANSI 9F: Conflicts with "Application Program Command" C1 control
pf20 Program Function 20 pf20 <Pf20> character (ISO 6429).
AID key
+----------------+-----------------------+------------+----------------+
pf21 Program Function 21 pf21 <Pf21>
AID key
+----------------+-----------------------+------------+----------------+
pf22 Program Function 22 pf22 <Pf22>
AID key
+----------------+-----------------------+------------+----------------+
pf23 Program Function 23 pf23 <Pf23>
AID key
+----------------+-----------------------+------------+----------------+
pf24 Program Function 24 pf24 <Pf24>
AID key
+----------------+-----------------------+------------+----------------+
tab Tab forward to next tab <Tab>
unprotected field
+----------------+-----------------------+------------+----------------+
backtab Back Tab - tab to backtab <BackTab>
previous unprotected
field
+----------------+-----------------------+------------+----------------+
up Cursor up up <Up>
+----------------+-----------------------+------------+----------------+
down Cursor down down <Down>
+----------------+-----------------------+------------+----------------+
right Cursor right right <Right>
+----------------+-----------------------+------------+----------------+
left Cursor left left <Left>
+----------------+-----------------------+------------+----------------+
fastup Cursor up two rows fastup <Up><Up>
+----------------+-----------------------+------------+----------------+
fastdown Cursor down two rows fastdown <Down><Down>
+----------------+-----------------------+------------+----------------+
fastright Cusor right two fastrightٺ <Right2>
positions
+----------------+-----------------------+------------+----------------+
fastleft Cursor left two fastleft <Left2>
positions
+----------------+-----------------------+------------+----------------+
home Home home <Home>
Brawn & Gunn Informational Page 29 NUL is read back (by the host) as a null (x'00') on a Read Buffer
operation, but not read back on Read Modified operations.
Ohio-00 Open Host Interface Objects September 1998 NL, EM, FF, and CR are printer control codes with no display
function. However, the code must be supported to the extent of
being accepted and, on reading back, must appear as NL, EM, FF,
and CR respectively. All are displayed as a space.
+----------------+-----------------------+------------+----------------+ FM and DUP are displayed as above. When read back, they appear
newline New line - move to newline <NewLine> as the FM and DUP codes.
first unprotected FM and DUP can be entered from the keyboard. They are stored in
field on next or the display buffer as controls; the current character set
subsequent line selection has no effect on them. They are transmitted to the
+----------------+-----------------------+------------+----------------+ application program as control codes.
reset Reset - clear reset <Reset>
keyboard lock and
clear insert mode
+----------------+-----------------------+------------+----------------+
insert Insert mode - turns insert <Insert>
on insert mode for
all subsequent
keystrokes until
reset
+----------------+-----------------------+------------+----------------+
backspace Destructive Backspace backspaceٺ <Backspace>
- move cursor one
position left, delete
character, shift
remainder of field
one position left.
+----------------+-----------------------+------------+----------------+
delete Delete at cursor, delete <Delete>
shift remainder of
field one position
left
+----------------+-----------------------+------------+----------------+
eraseinput Erase input - clear erinp <EraseInput>
all unprotected
fields
+----------------+-----------------------+------------+----------------+
eraseeof Erase from cursor to eraseeof <EraseEOF>
end of field,
inclusive
+----------------+-----------------------+------------+----------------+
dup Duplicate dup <Dup>
+----------------+-----------------------+------------+----------------+
fieldmark Field Mark fieldmarkٺ <FieldMark>
+----------------+-----------------------+------------+----------------+
Brawn & Gunn Informational Page 30 The SUB local function, Error Override, entered from the
keyboard, is required only as a part of Field Validation.
 End of changes. 138 change blocks. 
1202 lines changed or deleted 646 lines changed or added

This html diff was produced by rfcdiff 1.34. The latest version is available from http://tools.ietf.org/tools/rfcdiff/