HP 3000 Manuals

Types of Intrinsics: Wait and No-Wait I/O [ SNA IMF Programmer's Reference Manual ] MPE/iX 5.0 Documentation


SNA IMF Programmer's Reference Manual

Types of Intrinsics:  Wait and No-Wait I/O 

SNA IMF intrinsics can be divided into two categories:  intrinsics used
with standard (wait) MPE I/O, and intrinsics used with no-wait MPE I/O.
With standard MPE I/O, a program that has issued an I/O request must
suspend activity until the I/O request has finished.  With no-wait I/O,
or unblocked I/O, a program that has issued an I/O request may continue
processing and issue additional I/O requests without waiting for previous
I/O requests to finish.  No-wait I/O overlaps the processing of multiple
I/O requests, overlaps I/O with CPU processing, and responds to the
completion of the first of several outstanding I/O requests.

Standard MPE Wait I/O 

A program using standard MPE wait I/O must suspend activity after issuing
an I/O request until the request has finished.  It cannot issue another
I/O request until the previous request has finished.  Table 2-1 shows the
intrinsics that can be used with standard (wait) MPE I/O. These
intrinsics can also be used with no-wait MPE I/O. 

          Table 2-1.  SNA IMF Intrinsics, Wait and No-Wait I/O 

-------------------------------------------------------------------------------------------
|                                                                                         |
| Intrinsic         Function                                                              |
|                                                                                         |
| ACQUIRE3270       Allows your program to start Pass Thru on your own terminal or on any |
|                   free terminal or printer that is not under MPE control.               |
|                                                                                         |
| ATTRLIST          Returns the locations of attribute characters within a specified      |
|                   subsection or within all subsections of a screen.                     |
|                                                                                         |
| CLOSE3270         Emulates turning off a specified device.                              |
|                                                                                         |
| ERR3270           Returns the error message associated with a given SNA IMF intrinsic   |
|                   error number.                                                         |
|                                                                                         |
| EXTFIELDATTR      (for Asian users) Returns information about the attributes of a       |
|                   specified field, including the DBCS attribute.                        |
|                                                                                         |
| FIELDATTR         Returns information about the attributes of a specified field.        |
|                                                                                         |
-------------------------------------------------------------------------------------------

          Table 2-1.  SNA IMF Intrinsics, Wait and No-Wait I/O (cont.) 

-------------------------------------------------------------------------------------------
|                                                                                         |
| Intrinsic         Function                                                              |
|                                                                                         |
| OPEN3270          Emulates turning on the power of an emulated IBM 3278 display station |
|                   or 3287 printer.  The OPEN3270 intrinsic allocates the internal       |
|                   screen image used by SNA IMF.                                         |
|                                                                                         |
| PRINT3270         Produces a hard copy of the internal screen image.                    |
|                                                                                         |
| READFIELD         Reads a field of data from the internal screen image and returns the  |
|                   data to an HP application program.                                    |
|                                                                                         |
| READSCREEN        Reads all or a specified part of the internal screen image and        |
|                   returns the data to an HP application program.                        |
|                                                                                         |
| READSTREAM        Reads all or part of the untranslated host data stream.               |
|                                                                                         |
| RECV3270          Allows your program to receive the screen after modification by the   |
|                   host.  Also informs your program that the host has just sent data.    |
|                                                                                         |
| RESET3270         Emulates pressing the RESET key on an IBM 3278 display station        |
|                   keyboard.                                                             |
|                                                                                         |
| SCREENATTR        Returns information about the attributes of the internal screen       |
|                   image.                                                                |
|                                                                                         |
| STREAM3270        Emulates typing a series of keystrokes on an IBM 3278 display station |
|                   keyboard.  Allows you to do special function key operations and to    |
|                   update multiple data fields with one intrinsic call.                  |
|                                                                                         |
| TRAN3270          Emulates pressing one of the transmit keys on the 3278 display        |
|                   station keyboard.  TRAN3270 sends modified data to the host the next  |
|                   time the host polls the device.                                       |
|                                                                                         |
| VERS3270          Returns the number of the version of SNA IMF that is being executed   |
|                   on the HP 3000.                                                       |
|                                                                                         |

| WRITEFIELD        Writes data from the HP application program into an unprotected field |
|                   of the internal screen image.                                         |
|                                                                                         |
| WRITESTREAM       Creates the data stream that an HP application program sends to the   |
|                   host.                                                                 |
|                                                                                         |
-------------------------------------------------------------------------------------------

No-Wait MPE I/O 

No-wait MPE I/O requires MPE privileged mode(PM) capability.  However,
you do not need PM capability to write an SNA IMF application that uses
no-wait I/O, because the SNA IMF intrinsics themselves have PM
capability.  When your application calls the SNA IMF OPEN3270 intrinsic
with bit 15 of the  flags parameter set to 1 (the no-wait I/O option),
your program can call any of the SNA IMF intrinsics with no-wait I/O,
whether or not you have PM capability. 

If you do not have PM capability, SNA IMF intrinsics are the only
intrinsics you can call with no-wait I/O. If you call, for example, the
MPE FREAD intrinsic, your program will suspend processing until the I/O
request has finished, even though you specified no-wait I/O in your
OPEN3270 intrinsic call. 

If your program will use no-wait MPE I/O, it must be written in COBOL II,
FORTRAN, Pascal, C, or SPL. The IOWAIT and IODONTWAIT intrinsics, which
are used with no-wait I/O, return a functional value, pass parameters by
value, allow a variable number of parameters, and set condition codes.
Neither COBOL nor BASIC has these capabilities. 

Table 2-2 shows the intrinsics used only with no-wait MPE I/O. Two of
these intrinsics, IOWAIT and IODONTWAIT, are actually MPE intrinsics.You
can call them directly using SNA IMF/V, but if you are using SNA IMF/XL,
you must use the SNA IMF/XL intrinsics IOWAIT3270 and IODONTWAIT3270,
which in turn call the MPE intrinsics IOWAIT and IODONTWAIT. 

In addition to the intrinsics listed in table 2-2, all of the intrinsics
listed in table 2-1 can be used with no-wait MPE I/O.

          Table 2-2.  SNA IMF Intrinsics, No-Wait I/O Only 

-------------------------------------------------------------------------------------------
|                                                                                         |
| Intrinsic         Function                                                              |
|                                                                                         |
| ABORT3270         Aborts an outstanding no-wait RECV3270 or TRAN3270 request.           |
|                                                                                         |
| IODONTWAIT        (SNA IMF/V only) Informs a user program that a previous I/O operation |
|                   has completed.                                                        |
|                                                                                         |
| IODONTWAIT3270    (SNA IMF/XL only) Informs a user program that a previous I/O          |
|                   operation has completed.                                              |
|                                                                                         |
| IOWAIT            (SNA IMF/V only) Waits for a previous no-wait I/O request to          |
|                   complete.                                                             |
|                                                                                         |
| IOWAIT3270        (SNA IMF/XL only) Waits for a previous no-wait I/O request to         |
|                   complete.                                                             |
|                                                                                         |
-------------------------------------------------------------------------------------------


WARNING Privileged mode bypasses the normal checks and restrictions that apply to standard users (those using blocked I/O). It is possible for a privileged mode program to destroy file integrity, including the MPE operating system. On request, Hewlett-Packard will investigate and attempt to resolve problems resulting from using privileged mode. Although this service is not available under the standard service contract, it is available on a time and materials basis. Hewlett-Packard does not support, under any type of contract, corrections or changes to the MPE operating system.


MPE/iX 5.0 Documentation