TN3270E Working Group                                       Thomas Brawn
Internet Draft: <draft-ietf-tn3270e-ohio-00.txt> <draft-ietf-tn3270e-ohio-01.txt>         IBM Corporation
Expiration Date: tbd October 1st, 1999                          Stephen Gunn
                                                  Attachmate Corporation

                    Open Host Interface Objects for TN3270E

Status of this Memo
   This document is an Internet-Draft. Internet-Draft and is in full conformance with
   all provisions of Section 10 of RFC2026.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its Areas, areas, and its Working Groups. working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   To view the entire  The list
   of current Internet-Drafts, please check
   the "lid-abstracts.txt" listing contained in the Internet-Drafts can be accessed at
      http://www.ietf.org/ietf/1id-abstracts.txt

   The list of Internet-Draft 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). can be accessed at
      http://www.ietf.org/shadow.html.

Abstract

The purpose of this memo is
   This draft addresses the need for a common, advanced, client
   programming interface to define an object oriented 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
TN3270E.

Brawn & Gunn                 Informational                      Page 1

Ohio-00 either
   chose to stay with HLLAPI or perform costly re-implementation of
   their products to support each competing advanced client API.

   The Open Host Interface Objects          September 1998

Copyright Notice

   Copyright (C) The Internet Society (1997).  All Rights Reserved. (OHIO) address the need for a
   standardized advanced programming interface to the host data.  OHIO
   does not modify the TN3270/TN5250 protocol or datastream but instead
   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
   logical objects, and provides methods on those objects to allow
   standard access to the data.  Details about the connection protocol
   used to communicate with the host and the specific host platform.

Table of Contents

   OPEN HOST INTERFACE OBJECTS FOR TN3270E  . . . . . . . . . . .   1
   STATUS OF THIS MEMO  . . . . . . . . . . . . . . . . . . . . .   1
   ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . .   1
   TABLE OF CONTENTS  . . . . . . . . . . . . . . . . . . . . . .   2
   1.0 Introduction...................................................2 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . .   2
   2.0 Object Definitions.............................................3 OBJECT DEFINITIONS . . . . . . . . . . . . . . . . . . . .   3
      2.1 Ohio...........................................................3 OHIO  . . . . . . . . . . . . . . . . . . . . . . . . .   3
      2.2 OhioField......................................................5 OHIOFIELD . . . . . . . . . . . . . . . . . . . . . . .   6
      2.3 OhioFields.....................................................5 OHIOFIELDS  . . . . . . . . . . . . . . . . . . . . . .   8
      2.4 OhioManager....................................................6 OHIOMANAGER . . . . . . . . . . . . . . . . . . . . . .   9
      2.5 OhioOIA........................................................6 OHIOOIA . . . . . . . . . . . . . . . . . . . . . . . .  10
      2.6 OhioPosition...................................................7 OHIOPOSITION  . . . . . . . . . . . . . . . . . . . . .  11
      2.7 OhioScreen.....................................................7 OHIOSCREEN  . . . . . . . . . . . . . . . . . . . . . .  11
      2.8 OhioSession....................................................7 OHIOSESSION . . . . . . . . . . . . . . . . . . . . . .  14
      2.9 OhioSessions...................................................8 OHIOSESSIONS  . . . . . . . . . . . . . . . . . . . . .  15
   3.0 Acknowledgements...............................................8 ACKNOWLEDGMENTS  . . . . . . . . . . . . . . . . . . . . .  15
   4.0 References.....................................................9 REFERENCES . . . . . . . . . . . . . . . . . . . . . . . .  16
   5.0 How to Contact the Authors.....................................9
   Appendix A - Ohio Java Mapping....................................10
   Appendix B - Ohio ActiveX HOW TO CONTACT THE AUTHORS . . . . . . . . . . . . . . . .  16
   APPENDIX A: OHIO JAVA MAPPING  . . . . . . . . . . . . . . . .  16
   APPENDIX B: OHIO ACTIVEX IDL Mapping.............................16
   Appendix C - Sendkeys Mnemonics...................................27 MAPPING . . . . . . . . . . . . .  16
   APPENDIX C: 3270 FORMAT CONTROL ORDERS . . . . . . . . . . . .  16

1.0  Introduction

   The following is the Ohio containment hierarchy:
      OhioManager:  Contains one:
         OhioSessions:  Contains a collection of: of1:
            OhioSession:  Contains one:
               OhioScreen:  Contains one of each of:
                  OhioOIA:  The operator information area
                  OhioFields:  Contains a collection of:
                     OhioField:  A field in the presentation space

   Additional utility classes:
      OhioPosition
   The Ohio inheritance hierarchy is:
      Ohio:  Base class
         OhioManager
         OhioSessions
         OhioSession
         OhioScreen
         OhioOIA
         OhioFields
         OhioField

Brawn & Gunn                 Informational                      Page 2

Ohio-00              Open Host Interface Objects          September 1998
         OhioPosition

2.0  Object Definitions

   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
   a mapping of the IDL to ActiveX IDL, see Appendix B - Ohio ActiveX
   IDL Mapping.

   Note:  "1" based counting is used throughout this standard document for both
   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
   item 0).

   2.1  Ohio

      Base class for all Ohio classes.  Contains all common Ohio methods
      and properties.

      Interface Ohio {

         // Properties This enum is used by:
         //    OhioFields.FindByString
         //    OhioScreen.FindString
         Readonly Attribute enum OHIO_DIRECTION {
         OHIO_DIRECTION_FORWARD,
            OHIO_DIRECTION_FORWARD  // Forward (beginning towards end)
            OHIO_DIRECTION_BACKWARD // Backward (end towards beginning)
         };

         // This enum is used by:
         //    OhioSession.sessionType
         Readonly Attribute enum OHIO_TYPE {
         OHIO_TYPE_UNKNOWN,
         OHIO_TYPE_3270,
         OHIO_TYPE_5250,
         OHIO_TYPE_VT
            OHIO_TYPE_UNKNOWN  // Unknown host
            OHIO_TYPE_3270     // 3270 host
            OHIO_TYPE_5250     // 5250 host
         };
         // This enum is used by:
         //    OHIOSession.connected
         //    OHIOSession sessionChanged
         Readonly Attribute enum OHIO_STATE {
        OHIO_STATE_DISCONNECTED,
            OHIO_STATE_DISCONNECTED  // The communication link to the
                                     // host is disconnected.
            OHIO_STATE_CONNECTED     // The communication link to the
                                     // host is connected.
         };

         // This enum is used by:
         //    OHIOField.getData
         //    OHIOScreen.getData
         Readonly Attribute enum OHIO_PLANE {
         OHIO_PLANE_TEXT,
         OHIO_PLANE_COLOR,
         OHIO_PLANE_FIELD,
         OHIO_PLANE_EXTENDED
      };

Brawn & Gunn                 Informational                      Page 3

Ohio-00              Open Host Interface Objects          September 1998
            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)
         };

         // These values are returned in the Ohio Color Plane from the
         // following methods:
         //    OhioField.getData
         //    OhioScreen.getData
         Readonly Attribute enum OHIO_COLOR {
         OHIO_COLOR_BLACK,
         OHIO_COLOR_BLUE,
         OHIO_COLOR_GREEN,
         OHIO_COLOR_CYAN,
         OHIO_COLOR_RED,
         OHIO_COLOR_MAGENTA,
         OHIO_COLOR_WHITE,
            OHIO_COLOR_BLACK
            OHIO_COLOR_BLUE
            OHIO_COLOR_GREEN
            OHIO_COLOR_CYAN
            OHIO_COLOR_RED
            OHIO_COLOR_MAGENTA
            OHIO_COLOR_WHITE
            OHIO_COLOR_YELLOW
         };

         // These values are returned in the Ohio Extended Field Plane
         // from the following methods:
         //    OhioField.getData
         //    OhioScreen.getData
         Readonly Attribute enum OHIO_EXTENDED {
         OHIO_EXTENDED_HILITE,
         OHIO_EXTENDED_COLOR,
         OHIO_EXTENDED_RESERVED,
         OHIO_EXTENDED_HILITE_NORMAL,
         OHIO_EXTENDED_HILITE_BLINK,
         OHIO_EXTENDED_HILITE_REVERSEVIDEO,
         OHIO_EXTENDED_HILITE_UNDERSCORE,
         OHIO_EXTENDED_COLOR_DEFAULT,
         OHIO_EXTENDED_COLOR_BLUE,
         OHIO_EXTENDED_COLOR_RED,
         OHIO_EXTENDED_COLOR_PINK,
         OHIO_EXTENDED_COLOR_GREEN,
         OHIO_EXTENDED_COLOR_TURQUOISE,
         OHIO_EXTENDED_COLOR_YELLOW,
            OHIO_EXTENDED_HILITE   // Bitmask for Highlighting Bits
            OHIO_EXTENDED_COLOR    // Bitmask for Color Bits
            OHIO_EXTENDED_RESERVED // Bitmask for Reserved Bits
            OHIO_EXTENDED_HILITE_NORMAL  // Normal highlighting
            OHIO_EXTENDED_HILITE_BLINK  // Blinking highlighting
            OHIO_EXTENDED_HILITE_REVERSEVIDEO  // Reverse Video
                                               // highlighting
            OHIO_EXTENDED_HILITE_UNDERSCORE  // Underscore
                                             // highlighting
            OHIO_EXTENDED_COLOR_DEFAULT   // Default color
            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
         };

         // These values are returned in the Ohio Field Attributes from
         // the following methods:
         //    OhioScreen.getData
         Readonly Attribute enum OHIO_FIELD {
         OHIO_FIELD_ATTRIBUTE,
         OHIO_FIELD_PROTECTED,
         OHIO_FIELD_NUMERIC,
         OHIO_FIELD_PEN_SELECTABLE,
         OHIO_FIELD_HIGH_INTENSITY,
         OHIO_FIELD_HIDDEN,
         OHIO_FIELD_RESERVED,
            OHIO_FIELD_ATTRIBUTE       // Bitmask for field attribute
            OHIO_FIELD_PROTECTED       // Protected field
            OHIO_FIELD_NUMERIC         // Numeric field
            OHIO_FIELD_PEN_SELECTABLE  // Pen selectable field
            OHIO_FIELD_HIGH_INTENSITY  // High intensity field
            OHIO_FIELD_HIDDEN          // Hidden field
            OHIO_FIELD_RESERVED        // Reserved field
            OHIO_FIELD_MODIFIED        // Modified field
         };

         // This enum is used by:
         //    OhioScreen event processing
         Readonly Attribute enum OHIO_UPDATE {
         OHIO_UPDATE_HOST,
            OHIO_UPDATE_CLIENT  // Update initiated by client
            OHIO_UPDATE_HOST    // Update initiated by host
         };

Brawn & Gunn                 Informational                      Page 4

Ohio-00              Open Host Interface Objects          September 1998

         // This enum is used by:
         //    OhioOIA.owner
         Readonly Attribute enum OHIO_OWNER {
         OHIO_OWNER_UNKNOWN,
         OHIO_OWNER_APP,
         OHIO_OWNER_MYJOB,
         OHIO_OWNER_NVT,
         OHIO_OWNER_UNOWNED,
            OHIO_OWNER_UNKNOWN  // Uninitialized
            OHIO_OWNER_APP      // Application or 5250 host
            OHIO_OWNER_MYJOB    // 3270 - Myjob
            OHIO_OWNER_NVT      // 3270 in NVT mode
            OHIO_OWNER_UNOWNED  // 3270 - Unowned
            OHIO_OWNER_SSCP     // 3270 - SSCP
         };

         // This enum is used by:
         //    OhioOIA.InputInhibited
         Readonly Attribute enum OHIO_INPUTINHIBITED {
         OHIO_INPUTINHIBITED_NOTINHIBITED,
         OHIO_INPUTINHIBITED_SYSTEM_WAIT,
         OHIO_INPUTINHIBITED_COMMCHECK,
         OHIO_INPUTINHIBITED_PROGCHECK,
         OHIO_INPUTINHIBITED_MACHINECHECK,
            OHIO_INPUTINHIBITED_NOTINHIBITED  // Input not inhibited
            OHIO_INPUTINHIBITED_SYSTEM_WAIT   // Input inhibited by a
                             // System Wait state ("X SYSTEM" or "X []")
            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
         };

   };

2.2 OhioField

   Interface OhioField {

         // Properties
      Readonly OhioPosition Start;
      Readonly OhioPosition End;
      Readonly long Length;
      Readonly boolean Modified; The OHIO version level of this implementation.  The form is
         // "OHIO nn.nn"
         Readonly boolean Protected; Attribute string OhioVersion;

         // The name of the vendor providing this OHIO implementation.
         // Format is vendor defined.
         Readonly boolean Numeric;
      Readonly boolean HighIntensity;
      Readonly boolean PenSelectable;
      Readonly boolean Hidden;
      Readonly boolean Normal;
      Read/Write Attribute string Text; VendorName;

         // The vendor product version that is providing the OHIO
         // implementation.  Format is vendor specific.
         Readonly OHIO_FIELD Attribute; Attribute string VendorProductVersion;

         // Methods
      byte  GetData(OHIO_PLANE);

   };

2.3 OhioFields

   Interface OhioFields {

Brawn & Gunn                 Informational                      Page 5

Ohio-00              Open Host Interface Objects          September 1998 The vendor object that provides non-standard, vendor
         // Properties specific extensions to the OHIO object.
         Readonly long count; Attribute Object VendorObject;

         // Methods
      OhioField Item(long);
      Void Refresh();
      OhioField FindByString(string target, OhioPosition start, Create an OhioPosition end, OHIO_DIRECTION direction,
         boolean IgnoreCase);
      OhioField FindByPosition(OhioPosition);

   };

2.4 OhioManager

   Interface OhioManager { object.
         // Properties
      OhioSessions Sessions;    row  The row coordinate.
         // Methods
      OhioSession FindSession(string configurationResource,
                              string sessionName);    col  The column coordinate.
         OhioPosition CreateOhioPosition(row, col);

      };

2.5 OhioOIA

   2.2  OhioField

      A field is the fundamental element of a virtual screen.  A field
      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.

      OhioField objects can be accessed only through the OhioFields
      object.

      Interface OhioOIA OhioField {

         // Properties
      Readonly boolean Alphanumeric;
      Readonly boolean APL;
      Readonly boolean Numeric;
      Readonly boolean InsertMode;
      Readonly OHIO_OWNER owner;
      Readonly OHIO_INPUTINHIBITED InputInhibited;
      Readonly long ProgCheckCode;
      Readonly long CommCheckCode;
      Readonly long MachineCheckCode;

      // Methods The starting position of the field.  The position can range
         // Events
      OIAChanged()

   };

Brawn & Gunn                 Informational                      Page 6

Ohio-00              Open Host Interface Objects          September 1998

2.6 OhioPosition

   Interface OhioPosition { from 1 to the size of the virtual screen.  The starting
         // Properties
      long Row;
      long Column;

   };

2.7 OhioScreen

   Interface OhioScreen { position of a field is the position of the first character
         // Properties in the field.
         Readonly Attribute OhioPosition Cursor; Start;
         // Position The ending position of cursor
      Readonly Attribute OhioOIA OIA; the field.  The position can range
         // OIA object for this Screen
      Readonly Attribute OhioFields Fields; from 1 to the size of the virtual screen.  The ending
         // Collection position of fields a field is the position of the last character in
         // the field.
         Readonly Attribute long Rows; OhioPosition End;

         // Number The length of rows in Screen the field.  A field's length can range
          from 1 to the size of the
         // virtual screen.
         Readonly Attribute long Columns; int Length;

         // Number of columns in Screen The attribute byte for the field.
         Readonly Attribute string Text; int Attribute;

         // Entire Screen as text string Indicates whether or not the field has been modified.  True
         // Methods
      bytes   GetData(long BuffLen, OhioPosition Start,
                        OhioPosition End, OHIO_PLANE Plane);
      OhioPosition FindString(string text, OhioPosition Start,
                              OhioPosition End, PS_DIR Dir, if the field has been modified, otherwise false.
         Readonly Attribute boolean IgnoreCase);
      void SendKeys(string text, OhioPosition insertPosition);
      void PutString(string text, OhioPosition insertLocation); Modified;

         // Events
      CursorMoved(cursor position)
      ScreenChanged(screen delta, OHIO_UPDATE, OhioPosition pos,
                    OhioPosition  pos);
      SizeChanged - tbd

   };

2.8 OhioSession

   Interface OhioSession {

Brawn & Gunn                 Informational                      Page 7

Ohio-00              Open Host Interface Objects          September 1998 Indicates whether or not the field is protected.  True if
         // Properties
      Readonly string configurationResource;
      Readonly  string sessionName; the field is protected, otherwise false.
         Readonly OHIO_TYPE sessionType; Attribute boolean Protected;

         // Indicates whether or not the field is numeric-only.  True if
         // the field is numeric only, otherwise false.
          Readonly OHIO_STATE connected; Attribute boolean Numeric;

         // Indicates whether or not the field is high-intensity.  True
         // if the field is high intensity, otherwise false.
         Readonly OhioScreen Screen; Attribute boolean HighIntensity;

         // Methods
      void Connect();
      void Disconnect(); Indicates whether or not the field is pen-selectable.  True
         // Events
      SessionChanged(OHIO_UPDATE);

   };

2.9 OhioSessions

   Interface OhioSessions{ if the field is pen-selectable, otherwise false.
         Readonly Attribute boolean PenSelectable;

         // Properties
      long count; Indicates whether or not the field is hidden.  True if the
         // Methods
      OhioSession Item(long);
      OhioSession Item(string);
      Void Refresh(); field is hidden, otherwise false.
         Readonly Attribute boolean Hidden;

         // Events

};

3.0 Acknowledgments The text plane data for the field.  This document is similar to the
         // getData() method using the OHIO_PLANE_TEXT parameter, except
         // the data is returned as a product string instead of a character
         // array.  When setting the TN3270E Working Group.

   The authors wish to thank String property, if the following individuals for their
   contributions 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 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 property will
         // not reflect the changed text.  To see the changed text, do a
         // refresh on the OhioFields collection 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 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 Contact retrieve 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 data.
         char[] getData(OHIO_PLANE targetPlane);

      };

   2.3  OhioFields

      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.

      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.

      Note:  All OhioField objects returned by methods in this class are
      invalidated when Refresh() is called.

      Interface Objects          September 1998

Appendix A - Ohio Java Mapping OhioFields {

         // Returns the number of OhioField objects contained in this
         // collection.
         Readonly Attribute int Count;

         // Returns the OhioField object at the given index.  "One
         // Ohio -- Base interface for based" indexing is used in all Ohio Interfaces collections.  For
         // example, the first OhioField in this collection is at
         //
public interface Ohio
{
   public Object getVendor(); index 1.
         OhioField Item(int fieldIndex);

         // enum OHIO_DIRECTION
   public static final int OHIO_DIRECTION_FORWARD  = 0;
   public static final int OHIO_DIRECTION_BACKWARD = 1; Updates the collection of OhioField objects.  All OhioField
         // 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; objects in the current virtual screen are added to the
         // enum OHI_STATE -- used by OHIOSessionEvents.onSessionChanged
   public static final int OHIO_STATE_DISCONNECTED = 0;
   public static final int OHIO_STATE_CONNECTED    = 1; collection.  Indexing of OhioField objects will not be
         // 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; preserved across refreshes.
         void Refresh();

         // 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; Searches the collection for the target string and returns
         // 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 OhioField object containing that string.  The string
         // OHIO_EXTENDED >> 6
   public static final int OHIO_EXTENDED_HILITE_NORMAL       = 0;
   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; must be totally contained within the field to be considered
         // (OHIO_EXTENDED>>3) & 7
   public static final int OHIO_EXTENDED_COLOR_DEFAULT   = 0;
   public static final int OHIO_EXTENDED_COLOR_BLUE      = 1;
   public static final int OHIO_EXTENDED_COLOR_RED       = 2;
   public static final int OHIO_EXTENDED_COLOR_PINK      = 3;
   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; a match.  If the target string is not found, a null will be
         // type OHIO_FIELD -- used by OhioScreen.getData(FIELD)
   public static final int OHIO_FIELD_ATTRIBUTE      = 0xC0;
   public static final int OHIO_FIELD_PROTECTED      = 0x20;
   public static final int OHIO_FIELD_NUMERIC        = 0x10;
   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; returned.
         // enum OHIO_UPDATE - used by OhioScreenEvents.onScreenChanged
   public static final int OHIO_UPDATE_HOST   = 0;
   public static final int OHIO_UPDATE_CLIENT = 1;    targetString  The target string.

         // enum OHIO_OWNER -- used by OhioOIA.owner
   public static final int OHIO_OWNER_UNKNOWN  = 0;
   public static final int OHIO_OWNER_APP      = 1;
   public static final int OHIO_OWNER_MYJOB    = 1;
   public static final int OHIO_OWNER_NVT      = 2;
   public static final int OHIO_OWNER_UNOWNED  = 3;
   public static final int OHIO_OWNER_SSCP     = 4;    startPos      The row and column where to start.  The
         // enum OHIO_INPUTINHIBITED -                  position is inclusive (for example, row 1,
         //                  col 1 means that position 1,1 will be used by OhioOIA.InputInhibited
   public static final int OHIO_INPUTINHIBITED_NOTINHIBITED  = 0;
   public static final int OHIO_INPUTINHIBITED_SYSTEM_WAIT   = 1;
   public static final int OHIO_INPUTINHIBITED_COMMCHECK     = 2;
   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
{

Brawn & Gunn                 Informational                     Page 11

Ohio-00              Open Host Interface Objects          September 1998
         // Properties
   public OhioSessions getSessions();                  as the starting location and 1,1 will be
         // Methods
   public OhioSession findSession(String configurationResource,
                                  String sessionName);

}

public interface OhioSessions extends Ohio
{                  included in the search).
         // Properties
   public int getCount();    length        The length from startPos to include in the
         // Methods
   public OhioSession Item(int sessionNumber);
   public OhioSession Item(String sessionName);
   public void refresh();

}

public interface OhioSession extends Ohio
{                  search.
         // Properties
   public String getConfigurationResource();
   public boolean isConnected();
   public String getSessionName();
   public int getSessionType();
   public OhioScreen Screen;    dir           An OHIO_DIRECTION value.
         // Methods
   public void connect();
   public void disconnect();    ignoreCase    Indicates whether the search is case
         // Events
   public void addSessionListener(OHIOSessionListener listener);
   public void removeSessionListener(OHIOSessionListener listener);
}

public interface OhioScreen extends Ohio {                  sensitive.  True means that case will be
         // Properties
   public OhioPosition getCursor();
   public void setCursor(OhioPosition position);
   public OhioOIA getOIA();
   public OhioFields getFields();
   public int getRows();

Brawn & Gunn                 Informational                     Page 12

Ohio-00              Open Host Interface Objects          September 1998

   public int getColumns();
   public String getText();                  ignored.  False means the search will be
         // Methods
   public byte getData(OhioPosition start,
                         OhioPosition end,
                         int plane);
   public OhioPosition findString(String text,
                                  OhioPosition start,                  case sensitive.
         OhioField FindByString(String targetString,
                                OhioPosition end, startPos,
                                int direction, length,
                                OHIO_DIRECTION dir,
                                boolean ignoreCase);
   public void sendKeys(String text,
                        OhioPosition location);
   public void putString(String text,
                         OhioPosition location);

         // Events
   public void addScreenListener(OHIOScreenListener listener);
   public void removeScreenListener(OHIOScreenListener listener);

}

public interface OhioScreenListener
{
   public void onScreenChanged(int inUpdate,
                               OhioPosition inStart,
                               OhioPosition inEnd);

}

public interface OhioOIA extends Ohio Searches the collection for the target position and returns
         // the OhioField object containing that position.  If not
         // found, returns a null.
         //    targetPosition  The target row and column.
         OhioField FindByPosition(OhioPosition targetPosition);

      };

   2.4  OhioManager

      The central repository for access to all OHIO sessions.  The
      OhioManager contains a list of all OhioSession objects available
      on this system.

      Interface OhioManager {

         // Properties
   public boolean isAlphanumeric();
   public boolean isAPL();
   public int getCommCheckCode();
   public int getInputInhibited(); An OhioSessions object containing the OhioSession objects
         // Uses OHIO_INPUT_INHIBITED
   public int getMachineCheckCode();
   public boolean isNumeric();
   //public boolean isInsertMode();
   public int getOwner(); available on this system.  This list of objects is a static
         // Uses OHIO_OWNER
   public int getProgCheckCode(); snapshot at the time the OhioSessions object is created.
         // Methods

Brawn & Gunn                 Informational                     Page 13

Ohio-00              Open Host Interface Objects          September 1998 Use the OhioSessions.refresh method to obtain a new
         // Events
   public void addOIAListener(OhioOIAListener listener);
   public void removeOIAListener(OhioOIAListener listener);

}

public interface OhioOIAListener
{
   public void onOIAChanged();
}

public interface OhioFields extends Ohio
{ snapshot.
         Readonly Attribute OhioSessions Sessions;

         // Properties
   public int getCount(); Returns an OhioSession object based on the search parameters
         // Methods
   public OhioField Item(int fieldIndex);
   public void refresh();
   public OhioField findByString(String targetString,
                                 OhioPosition startPos,
                                 OhioPosition endPos,
                                 int dir, provided.
         // Uses OHIO_DIRECTION
                                 boolean ignoreCase);
   public OhioField findByPosition(OhioPosition targetPosition);

}

public interface OhioField extends Ohio
{    ConfigurationResource  A vendor specific string used to
         // Properties
   public OhioPosition getStart();
   public OhioPosition getEnd();

   public int getLength();

   public int getAttribute();                           provide configuration information.
         // 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    SessionName  The unique name associated with an
         // Methods
   public byte getData(int targetPlane);                 OhioSession.

         // Uses OHIO_PLANE

}

public interface OhioPosition { The parameters are used as follows:
         // 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    Is ConfigurationResource provided?
         //       Yes - 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 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);

         // Closes an OhioSession object.  The OhioSession is
         // considered invalid and is removed from the list of
         // OhioSession objects.
         //    SessionObject The OhioSession to close.
         void CloseSession(OhioSession SessionObject);

         // 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);

      };

      2.5  OhioOIA

      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.

      An OhioOIA object can be obtained using the GetOIA() method on an
      instance of OhioScreen.

      Interface OhioOIA {
         // Indicates whether the field which contains the cursor is an
         // alphanumeric field.  True if the cursor is in an
         // alphanumeric field, false otherwise.
         Readonly Attribute boolean Alphanumeric;

         // The communication check code.  If InputInhibited returns
         // OHIO_INPUTINHIBITED_COMMCHECK, this property will return the
         // communication check code.
         Readonly Attribute int CommCheckCode;

         // Indicates whether or not input is inhibited.  If input is
         // inhibited, SendKeys or SendAID calls to the OhioScreen are
         // 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;

         // The machine check code.  If InputInhibited returns
         // OHIO_INPUTINHIBITED_MACHINECHECK, this property will return
         // the machine check code.
         Readonly Attribute int MachineCheckCode;

         // Indicates whether the field which contains the cursor is a
         // numeric-only field.  True if the cursor is in a numeric-only
         // field, false otherwise.
         Readonly Attribute boolean Numeric;

         // Indicates the owner of the host connection.
         Readonly Attribute OHIO_OWNER Owner;

         // The program check code.  If InputInhibited returns
         // OHIO_INPUTINHIBITED_PROGCHECK, this property will return the
         // program check code.
         Readonly Attribute int ProgCheckCode;

      };

      2.6  OhioPosition

      Holds row and column coordinates.  An OhioPosition can be
      constructed by using CreateOhioPosition() on any Ohio class.

      Interface OhioPosition {

         // The row coordinate
         Attribute int Row;

         // The column coordinate.
         Attribute int Column;

      };
      2.7  OhioScreen

      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.

      An OhioScreen object can be obtained from the Screen containing an...      
//              IOhioOIA                    OIA, and a...             
//              IOhioFields                 Collection of...          
//                 IOhioField property of
      an instance of OhioSession.

      The raw presentation space data is maintained in a series of
      planes which can be accessed by various methods within this class.
      The text plane contains the actual characters in the presentation
      space.  Most of the methods in OhioScreen class work exclusively
      with the text plane.

      The remaining planes contain the corresponding attributes for each
      character in the text plane.  The color plane contains color
      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.

      Interface OhioScreen {

         // 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;

         // The OhioOIA object associated with this presentation space.
         // This object can be used to query the status of the operator
         // information area.
         Readonly Attribute OhioOIA OIA;

         // 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                 
//                                                                    
//  IOhioPosition               1-based Row/Col Position
         // 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;

         // The number of rows in the presentation space.
         Readonly Attribute int Rows;
         // The number of columns in the presentation space.
         Readonly Attribute int Columns;

         // The entire text plane of the virtual screen as a string.
         // All null characters and Field Attribute characters are
         // returned as blank space characters.
         Readonly Attribute string String;

         // Returns a character array containing the data from the Text,
         // 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         
//                                                                    
//+--------------------------------------------------------------------+
import "oaidl.idl";
import "ocidl.idl";

//+--------------------------------------------------------------+
// OHIO DATA TYPES                                              
//+--------------------------------------------------------------+
typedef v1_enum enum OHIO_DIRECTION
{
   OHIO_DIRECTION_FORWARD                       = 0,
   OHIO_DIRECTION_BACKWARD                      = 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

} OHIO_DIRECTION;

//+---------------------------------------------+
// SESSION DATA TYPES                          
//+---------------------------------------------+
typedef v1_enum enum OHIO_TYPE
{
   OHIO_TYPE_UNKNOWN                            = 0,
   OHIO_TYPE_3270                               = 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,
                        OHIO_PLANE plane);

         // 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,
   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                         =              col 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 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,
                                 int length,
                                 int OHIO_DIRECTION,
                                 boolean ignoreCase);
         // The sendKeys method sends a string of keys to the virtual
         // screen.  This method acts as if keystrokes were being typed
         // 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);

         // The sendAid method sends an "aid" keystroke to the virtual
         // screen.  These aid keys can be though of as special
         // keystrokes, like the Enter key, the Tab key, or the Page Up

         // 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
         // the specified location.  The string will overlay only
         // unprotected fields, and any parts of the string which fall

         // over protected fields will be discarded.
         //    text  String to place in the virtual screen.
         //    location  Position where the string should be written.
         void setString(string text,
                        OhioPosition location);

      };

      2.8  OhioSession

      A host session.

      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 OhioSession {
   id(99),propget HRESULT Vendor (out,retval IDispatch** outValue);
}

//+--------------------------------------------------------------+
// IOhioPosition                                                
//+--------------------------------------------------------------+
// Zero

         // The configurationResource for this OhioSession object.
         Readonly Attribute string ConfigurationResource;

         // Indicates whether this OhioSession object is connected to 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

//+--------------------------------------------------------------+
// IOhioFields                                                  
//+--------------------------------------------------------------+

   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*
                         inPosition,out,retval IOhioField** outField);
   id(21)         HRESULT FindByString (in BSTR inString,
                                    in IOhioPosition* inStart,
                                    in IOhioPosition* inEnd,
                                    in OHIO_DIRECTION inDir,
                                    in VARIANT_BOOL inIgnoreCase,
                                    out,retval IOhioField** outField);

   id(DISPID_NEWENUM),propget,restricted  HRESULT
                              _NewEnum(out,retval IUnknown** outEnum);
};

//+--------------------------------------------------------------+
// 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

   id(10),propget HRESULT Rows (out,retval long* outRows);
   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,
                                      in IOhioPosition* inPos);

   id(22)         HRESULT FindString (in BSTR inString,
                                        in IOhioPosition* inStart,
                                        in IOhioPosition* inEnd,
                                        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,
                                     in IOhioPosition* inEnd,
                                     in OHIO_PLANE inPlane,
                                     out,retval VARIANT* outData);
};


   object,
   uuid(45896AC5-BCF8-11D1-B2D3-0060080708DC),
   dual,
   helpstring("IOhioScreenEvents Interface"),
   pointer_default(unique)

interface IOhioScreenEvents : IUnknown
{
   id(0) HRESULT OnScreenChanged (in OHIO_UPDATE inUpdate,
                                    in IOhioPosition* inStart,
                                    in IOhioPosition* inEnd);
         // host.  True means connected, false means not connected.
         Readonly Attribute boolean Connected;

         // The SessionName for this OhioSession object.  The
         // SessionName is unique among all instances of OhioSession.
         Readonly Attribute string SessionName;

         // The SessionType for this OhioSession object.
         Readonly Attribute OHIO_TYPE SessionType;
         // The OhioScreen object for this session.
         Readonly Attribute OhioScreen Screen;

         // Starts the communications link to the host.
         void Connect();

         // Stops the communications link to the host.
         void Disconnect();

      };

Brawn & Gunn                 Informational                     Page 23

Ohio-00              Open Host

      2.9  OhioSessions

      Contains a collection of OhioSession objects.  This list is a
      static snapshot of the list of OhioSession objects available at
      the time of the snapshot.

      Interface Objects          September 1998

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);
};

//+--------------------------------------------------------------+
// IOhioSession                                                 
//+--------------------------------------------------------------+

   object,
   uuid(25BEAEF6-B795-11D1-B2D1-0060080708DC),
   dual,
   helpstring("IOhioSession Interface"),
   pointer_default(unique)

interface IOhioSession : IOhio OhioSessions {
   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

         // The number of OhioSession objects contained in this
         // collection.
         Readonly Attribute int Count;

         // The OhioSession object at the given index.  "One based"
         // indexing is used in all Ohio collections.  For example, the
         // first OhioSession in this collection is at index 1.
         //    index  The index of the target OhioSession.
         OhioSession Item(int index);

         // The OhioSession object with the given SessionName.  Returns
         // null if no object with that name exists in this collection.
         //    SessionName (out,retval BSTR* outValue);
   id(12),propget HRESULT SessionType (out,retval OHIO_TYPE*
                                         outValue);  The target name.
         OhioSession Item(string SessionName);

         // Updates the collection of OhioSession objects.  All
         // 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
         // refreshes.
         void Refresh();

      };


   object,
   uuid(45896ACA-BCF8-11D1-B2D3-0060080708DC),
   dual,
   helpstring("IOhioSessionEvents Interface"),
   pointer_default(unique)


Brawn & Gunn                 Informational                     Page 24

Ohio-00              Open

3.0  Acknowledgments

     This document was initiated in the TN3270E Working Group and was
     completed by a dedicated group of interested parties.

     The authors wish to thank the following individuals for their
     contributions to this document:
     - 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

4.0  References

   - International Business Machines Corporation, "eNetwork Personal
     Communications Version 4.2 for Windows 95 and Windows NT Host Interface Objects
     Access Class Library", September 1998

interface IOhioSessionEvents : IUnknown
{
   id(0) HRESULT OnSessionChanged  (in OHIO_STATE inState);
};

cpp_quote("EXTERN_C const IID IID_DOhioSessionEvents;")

   uuid(45896ACC-BCF8-11D1-B2D3-0060080708DC),
   hidden,
   helpstring("DOhioSessionEvents Interface"),

dispinterface DOhioSessionEvents
{
properties:
methods:
   id(0) HRESULT OnSessionChanged  (in OHIO_STATE inState);
};

//+--------------------------------------------------------------+
// IOhioSessions                                                
//+--------------------------------------------------------------+

   object,
   uuid(25BEAEF8-B795-11D1-B2D1-0060080708DC),
   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);
};

//+--------------------------------------------------------------+
// IOhioManager                                                 
//+--------------------------------------------------------------+

   object,
   uuid(25BEAF00-B795-11D1-B2D1-0060080708DC),
   dual,
   helpstring("IOhioManager Interface"),
   pointer_default(unique)


Brawn & Gunn                 Informational                     Page 25

Ohio-00              Open 1997.
   - International Business Machines Corporation, "Host On-Demand
     Version 2.0 Host Interface Access Class Library for Java Reference",
     October 1997.
   - Attachmate Corporation, "EXTRA! Objects          September 1998

interface IOhioManager : IOhio
{
   id(0), propget HRESULT Sessions     (out,retval
                                          IOhioSessions** outSessions);

   id(1)          HRESULT FindSession  (in BSTR inConfigResource,
                                          in BSTR inSessionName,
                               out,retval IOhioSession** outSession);
}; 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                 Informational                     Page 26

Ohio-00              Open Host Interface Objects          September 1998
     Attachmate Corporation
     3617 131st Ave. S.E.
     Bellevue, Washington  98006
     e-mail:  stevegu@attachmate.com
     phone:  425-649-6221

Appendix A - Ohio Java Mapping

   Available using anonymous ftp from ftp.boulder.ibm.com.  Once
   logged in, change to the software/standards/ohio/java directory
   to download the Java classes.

Appendix B - Ohio ActiveX IDL Mapping

   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.

Appendix C - SendKeys Mnemonics 3270 Format Control Orders

   This table contains appendix specifies the list representation of mnemonic keywords valid 3270 Format Control
   Orders within OHIO text strings.

   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
   OhioScreen::SendKey() method.  Mnemonic keywords adhere to ANSI and
   UNICODE columns.  The ANSI values were taken from the
   following rules:

      1) Keywords are enclosed in square brackets "".
      2) Keywords 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 case insensitive (for example, Attn is
         identical proposed extensions to attn).
      3) Literal square brackets must be doubled.

   Example SendKey strings:

      abcpf1           Sends character keys "abc" followed by the
                         PF1 AID key
      backspaceٍx   Sends 3270 backspace key followed by the 3
                         characters "x"
      xyzCLEAR       Sends characters "xyz" followed by 3270 Clear
                         AID key

+----------------+-----------------------+------------+----------------+
                        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

Ohio-00              Open Host Interface Objects          September 1998

+----------------+-----------------------+------------+----------------+
 pf3           Program Function 3     pf3       <Pf3>          
                  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 Unicode Control
   Pictures.

   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    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

Ohio-00              Open Host Interface Objects          September 1998

+----------------+-----------------------+------------+----------------+
 pf19          Program Function      85    2424     A blank
   EM   End of Medium    19    pf19      <Pf19>         
                  AID key                                          
+----------------+-----------------------+------------+----------------+
 pf20          Program Function 20    pf20      <Pf20>         
                  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               19    2419     A blank
   EO   Eight Ones       FF      9F    E07F     A blank

   Notes:
      ANSI 85: Conflicts with "Next Line" C1 control character (ISO
               6429).
      ANSI 9F: Conflicts with "Application 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

Ohio-00              Open Host Interface Objects          September 1998

+----------------+-----------------------+------------+----------------+
 newline       New line - move to     newline   <NewLine>      
                  first unprotected                                
                  field Command" C1 control
               character (ISO 6429).

   NUL is read back (by the host) as a null (x'00') on next or                                 
                  subsequent line                                  
+----------------+-----------------------+------------+----------------+
 reset         Reset - clear          reset     <Reset>        
                  keyboard lock and                                
                  clear insert mode                                
+----------------+-----------------------+------------+----------------+
 insert        Insert mode - turns    insert    <Insert>       
                 a Read Buffer
   operation, but not read back on insert mode for                               
                  all subsequent                                   
                  keystrokes until                                 
                  reset                                          
+----------------+-----------------------+------------+----------------+
 backspace     Destructive Backspace  backspaceٺ <Backspace>    
                  - move cursor one                                
                  position left, delete                            
                  character, shift                                 
                  remainder Read Modified operations.

   NL, EM, FF, and CR are printer control codes with no display
   function.  However, the code must be supported to the extent 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
   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
   as the FM and DUP codes.
   FM and DUP can be entered from cursor the keyboard.  They are stored in
   the display buffer as controls; the current character set
   selection has no effect on them.  They are transmitted to   eraseeof  <EraseEOF>     
                  end the
   application program as control codes.

   The SUB local function, Error Override, entered from the
   keyboard, is required only as a part of field,                                    
                  inclusive                                        
+----------------+-----------------------+------------+----------------+
 dup           Duplicate              dup       <Dup>          
+----------------+-----------------------+------------+----------------+
 fieldmark     Field Mark             fieldmarkٺ <FieldMark>    
+----------------+-----------------------+------------+----------------+

Brawn & Gunn                 Informational                     Page 30 Validation.