Asynchronous Serial Communications Programmer’s Reference Manual HP 3000 MPE/iX Computer Systems Edition 8 32022-90052 E1098 Printed in: U.S.A.
Notice The information contained in this document is subject to change without notice. Hewlett-Packard makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for direct, indirect, special, incidental or consequential damages in connection with the furnishing or use of this material.
Contents Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Related Manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Guide to This Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 1. Introduction Asynchronous Serial Communications . . . . . . . . . . . . . . . . . . . . . . . . . Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Other Types of Intrinsics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Intrinsics in your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . Condition Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Status Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Abort Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Optional Capabilities . . . . . . . .
Contents Setting the Number of Stop Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Enabling Escape Sequence Read Termination . . . . . . . . . . . . . . . . 109 5. Using Subsystem Break The Break Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subsystem Break Intrinsics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subsystem Break Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Subsystem Break Processing . . .
Contents 6 What’s Included . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General Telnet/iX Server Restrictions . . . . . . . . . . . . . . . . . . . . . Telnet/iX Server Programming Considerations . . . . . . . . . . . . . . . FCONTROL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FDEVICECONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FREAD and FWRITE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents FCONTROL(4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Condition Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Discussion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FCONTROL(10, 11) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameters . . . . . . .
Contents 8 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Condition Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Discussion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FCONTROL(38) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Condition Codes . .
Contents Functional Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Condition Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Discussion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FREAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Syntax . . . . . . .
Contents Condition Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Discussion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PRINTFILEINFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Use. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameters . .
Contents Parity Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parity Error in EOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stripped Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Break and Terminal States . . . . . . . . . . . . . . . . . . . . . . . Using [Break] (and Later :RESUME) During a Read. . . . . . . . . Using [Break] During Writes . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents 12
Figures Figure 1-1 . Asynchronous Serial Transmission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 Figure 1-2 . HP Distributed Terminal Controllers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26 Figure 1-3 . ThinLAN Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30 Figure 1-4 . ThickLAN Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figures 14
Tables Table 2-1. Condition Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51 Table 8-1. Intrinsics and Device Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 Table 8-2. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158 Table 8-3. Device Control Action at FCLOSE. . . . . . . . . . . . . . . . .
Preface This manual documents functionality for the MPE/iX 6.0 release, as well as later releases, for HP 3000 Series 900 systems. This manual documents a subset of the system-supplied intrinsics available through the native mode of operation for MPE/iX on HP 3000 Series 900 computers. The intrinsics described here are those that are particularly useful for the programmatic control of asynchronous devices.
Related Manuals DTC Planning Guide. HP 2345A DTC Installation and Service Manual HP 2340A DTC Installation and Service Manual HP J2070A DTC Installation and Service Manual Configuring Systems for Terminals, Printers, and Other Serial Devices Troubleshooting Terminal, Printer, and Serial Device Connections Configuring and Managing Host-Based X.
• Chapter 6, “Typeahead Mode,” describes the programmatic controls involved in the use of typeahead mode. Code fragments illustrate the use of these controls. • Chapter 7, “Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices,” describes how PAD and DTC Telnet connections are implemented through DTCs. For PAD connection, a DTC must be equipped with a DTC/X.25 Network Access Card, and for DTC Telnet connections a DTC must be equipped with a Telnet Access Card.
1 Introduction The HP 3000 Series 900 computer supports a wide range of useful peripheral devices. This manual describes how devices which are connected to a DTC and communicate asynchronously (such as terminals and serial printers) interact with the MPE/iX operating system. It also describes how asynchronous devices can be controlled programmatically through the use of system intrinsics. Only the subset of intrinsics useful for control of asynchronous devices is described here.
Introduction Asynchronous Serial Communications Asynchronous Serial Communications Asynchronous Serial Communications (ASC) is the term used to describe the specific manner in which communications take place between an MPE/iX computer and its associated terminals and serial printers. Asynchronous refers to the scheme used to let the receiving end of a communication link know when data is being sent and when transmission of the data has completed.
Introduction Asynchronous Serial Communications Terminals A terminal is a hardware device that enables an end user to communicate with the computer, and both send data to and receive data from the system. All terminals supported for use on MPE/iX systems include typewriter-like keyboards and CRT screens. Some personal computers capable of running in terminal emulation mode are also supported for asynchronous connection.
Introduction Asynchronous Serial Communications While the system console is technically an asynchronous serial device, its functionality, as well as its physical and logical interfaces, are very different from those discussed in this manual. For more information on the system console see Managing Peripherals manual.
Introduction Asynchronous Serial Communications Telnet/iX Telnet/iX provides the Telnet service over Transmission Control Protocol/Internet Protocol (TCP/IP) on MPE/iX. The Telnet/iX Client enables users on an HP 3000 to have direct access to HP 9000, HP 3000, and non-HP systems that support Telnet and TCP/IP. The Telnet/iX Server enables users on a remote system running standard Telnet services to logon and run most applications on the HP 3000.
Introduction Datacommunications and Terminal Subsystem (DTS) Datacommunications and Terminal Subsystem (DTS) With the exception of the system console which has its own access port, all of the asynchronous devices listed here can be connected to HP 3000 Series 900 computers via the Datacommunications and Terminal Subsystem (DTS).
Introduction Datacommunications and Terminal Subsystem (DTS) If used for direct connections and remote modem connections only, each HP 2345B DTC (DTC 48) can provide connections for up to 48 directly connected devices, 36 remote devices using modems, or a combination of both. For HP 2345B DTCs, up to three of the DTC’s slots can contain a DTC/X.25 Network Access Card. This card provides access to X.25 networks, and can be used to connect asynchronous devices through PAD connections.
Introduction Datacommunications and Terminal Subsystem (DTS) NOTE Direct and remote connections may be mixed on the same DTC, since its design is modular. A Telnet Access Card and an X.25 Network Access Card cannot be on the same DTC 48. (Note that neither DTC/X.25 Network Access Cards nor a Telnet Access Card may be mounted in slot 0 for DTC 48s.
Introduction Datacommunications and Terminal Subsystem (DTS) Local Area Network HP 2345B Datacommunications and Terminal Controllers are connected to the system via a Local Area Network (LAN) connection, over coaxial cable which conforms to the IEEE 802.3 standard. Hewlett-Packard provides two versions of this cable, ThinLAN and ThickLAN, each of which provides certain specific advantages to the user.
Introduction Datacommunications and Terminal Subsystem (DTS) Figure 1-3 ThinLAN Configuration ThickLAN Connection The second version of the LAN cable, ThickLAN (Type 10BASE5), offers maximum connection lengths of up to 500 meters (1,600 feet.), and supports up to 100 nodes. Each node on the LAN is connected via a Medium Attachment Unit (MAU). An Attachment Unit Interface (AUI) cable runs between each node and its MAU, as well as between the host computer and its MAU.
Introduction Datacommunications and Terminal Subsystem (DTS) Figure 1-4 ThickLAN Configuration OpenView Workstation As of MPE/iX version A.30.00, an OpenView workstation may also be a part of the Datacommunications and Terminal Subsystem. The OpenView workstation is a personal computer which is properly configured as a part of the LAN, and runs the OpenView DTC Manager software. The OpenView DTC Manager is an application based on OpenView Windows.
Introduction Datacommunications and Terminal Subsystem (DTS) public PAD, as detailed in Chapter 7, “Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices,” of this manual. DTC Telnet enables Telnet users to access MPE/iX hosts. Additionally, terminals connected through DTCs on LANs managed by the OpenView workstation may be configured so that they are capable of establishing connections with more than a single MPE/iX system on the LAN.
Introduction ASC Software Overview ASC Software Overview The Asynchronous Serial Communications software provides the interface between the IEEE 802.3 LAN and the MPE/iX system. Control The software is included with the MPE/iX Fundamental Operating System (FOS). MPE/iX system software mirrors its related hardware in the sense that it is structured in modules, with each module handling the control of a specific type of hardware device.
Introduction ASC Software Overview Configuration with OpenView DTC Manager Effective with version A.30.00 of MPE/iX, HP 3000 Series 900 and HP 9000 Series 800 computers may be part of a network managed by the OpenView DTC Manager. Devices connected to the DTCs on such a network are configured through a PC-based network management workstation which is also attached to the LAN, and the DTC control software is subsequently downloaded from the PC.
Introduction ASC Software Overview asynchronous connection capabilities by using the OpenView DTC Manager workstation instead of the host. This prevents you from having to reconfigure your HP 3000 Series 900 computer. NOTE The concept of nailed and non-nailed devices deals only with the association of a device to an ldev number on a specific MPE/iX system.
Introduction Data Communications Concepts Reviewed Data Communications Concepts Reviewed The hardware and software described in this chapter conforms to specific rules designed to make data communications between devices possible. To use this manual as a programming guide, you need a good understanding of these rules and of data communications concepts in general.
Introduction Data Communications Concepts Reviewed The second Hewlett-Packard RS-232-C implementation makes use of additional electrical circuits defined by the standard. The cable and connectors more closely resemble conventional RS-232-C 25-wire cable and connectors. This implementation can be used for direct connections, subject to the same system limitations as the three-pin version.
Introduction Data Communications Concepts Reviewed The DTC is protected from overruns through an additional flow control mechanism referred to as the read trigger. The read trigger is also the ASCII DC1 character, and is generated by the ASC software when the system is ready to accept data. There is also a flow control mechanism used between a system and its DTCs called the Transport Flow Control Protocol. Its fundamental purpose is to protect DTCs from being overrun by data from the system.
Introduction Data Communications Concepts Reviewed is changed, either through programmatic transmission of the proper escape sequences, or by sending a message to the terminal operator as a reminder to properly set the device. For more information on the proper settings for terminals and printers, refer to the reference manuals for each device.
Introduction Data Communications Concepts Reviewed 40 Chapter 1
2 Controlling Asynchronous Devices Programmatically Programmatically Once an asynchronous device is properly connected and configured on a HP 3000 Series 900 computer, it can be accessed programmatically through the MPE/iX File System. The File System interfaces with the ASC software, which communicates with the device based on its port configuration.
Controlling Asynchronous Devices Programmatically File System Overview File System Overview File System Overview All input/output operations on MPE/iX systems are done through the mechanism of files. All files are considered the same (part of the system file domain), and handled in the same way. Because of this, the way that input or output data is accessed and treated is the same no matter what medium it resides on.
Controlling Asynchronous Devices Programmatically File System Overview be suited to the characteristics being specified. Data directed to terminals or printers, for example, must be in ASCII format, and have a blocking factor of 1. These are device-dependent characteristics, and if you try to specify something different it will be overridden. See the Accessing Files manual for a summary of device-dependent characteristics.
Controlling Asynchronous Devices Programmatically Device Operation Modes Device Operation Modes An asynchronous device may be operated in one of five device operation modes. Each mode has a specific set of capabilities and is intended for a specific purpose. The five device operation modes are: • Session-Accepting Devices. • Programmatic Devices. • System Console. • Spooled Devices. • Slaved Devices.
Controlling Asynchronous Devices Programmatically Device Operation Modes At the completion of the program, control of the terminal is returned to the active session. For this reason it is critical that any device characteristics altered by the program be reset to normal or default settings before the session regains control. If a program fails to reset altered characteristics, the session may not be able to communicate successfully with the MPE/iX system.
Controlling Asynchronous Devices Programmatically Device Operation Modes System Console The CIO system console is the only terminal (or PC) that is not connected to the system through a DTC. The system is aware of its existence from system initialization. It is connected to a special interface card in the system cabinet known as the access port. The system console has a unique set of functionality not available to any other device.
Controlling Asynchronous Devices Programmatically Device Operation Modes Slaved Devices If two devices share the same port in the DTC (one device is connected to the port and the other device is connected by an additional cable to the first device), only one device is recognized by the ASC software. The device that is recognized is referred to as the master device, while the other device is called a slave of the master.
Controlling Asynchronous Devices Programmatically MPE/iX System Intrinsics MPE/iX System Intrinsics The MPE/iX system provides a set of subroutines, callable by your program, that help you interface with the file system to accomplish various tasks. These subroutines are an integral, or intrinsic, part of the operating system, and are therefore referred to as system intrinsics.
Controlling Asynchronous Devices Programmatically MPE/iX System Intrinsics Summary of Intrinsics INTRINSICS PURPOSE FCHECK Requests details about file I/O errors. FCLOSE Closes a file. FCONTROL Performs a number of control operations on a file or device. FDEVICECONTROL Provides control operations to a printer, terminal, or spooled device. FERRMSG Obtains textual error message corresponding to an FCHECK error code. FFILEINFO Provides information about the characteristics of a file.
Controlling Asynchronous Devices Programmatically MPE/iX System Intrinsics Other Types of Intrinsics The discussion in this manual pertains exclusively to system intrinsics. Certain application programs and system utilities also provide subroutines that are referred to as intrinsics. For example, VPLUS/3000 iX provides a set of intrinsics for handling page block mode programming. For a description of VPLUS/3000 iX intrinsics see the VPLUS Reference Manual.
Controlling Asynchronous Devices Programmatically MPE/iX System Intrinsics If the condition code indicates that an error condition occurred during execution of an intrinsic, you may want to obtain more specific information about what took place. You can do so by calling FCHECK to obtain details such as the error code associated with the problem that occurred, and FERRMSG to display the message associated with that error code.
Controlling Asynchronous Devices Programmatically MPE/iX System Intrinsics illegal parameters to an intrinsic or does not have the capabilities needed to execute an intrinsic. Such an error is called an abort error and results in termination of the process. Optional Capabilities A number of system intrinsics can be used in a program only if you have optional capabilities assigned to you.
Controlling Asynchronous Devices Programmatically MPE/iX System Intrinsics CAUTION The normal checks and limitations that apply to users with standard (default) capabilities are bypassed in Privileged Mode. It is possible for a Privileged Mode program to destroy file integrity, including the MPE/iX operating system software itself. Hewlett-Packard will, upon request, investigate and attempt to resolve problems resulting from the use of Privileged Mode code.
Controlling Asynchronous Devices Programmatically MPE/iX System Intrinsics this parameter passes a new value and returns the previous value to the program in the same call. FCONTROL functions are discussed throughout this manual. Functional Returns Some intrinsics return a value to the calling program through a functional return. Functional return values result from or are altered by the intrinsics of which they are a part.
3 Common Device Control Functions This chapter describes some of the more common ways that intrinsics can be used to control asynchronous devices and includes sample code segments to demonstrate these uses. The segments are coded in Pascal/iX, but should be helpful regardless of the language you are using. While details of declaring and calling intrinsics vary between languages, the principles of their application do not.
Common Device Control Functions Opening Asynchronous Devicefiles Opening Asynchronous Devicefiles Devicefiles Before an asynchronous device can be used by your program, you must obtain access to the device and define the characteristics you want to be associated with the device for your application. You do this by using the FOPEN or HPFOPEN intrinsic to open a file on the device, passing the file specifications required by your program in the parameters of the call.
Common Device Control Functions Opening Asynchronous Devicefiles File Open Intrinsics The way in which file characteristics are specified differs depending on whether you are calling FOPEN or HPFOPEN. The parameters of the FOPEN intrinsic are positional. The file system expects to see them in a certain order and will not accept any specifications that fail to conform.
Common Device Control Functions Opening Asynchronous Devicefiles Figure 3-1 Opening a Read Port and a Write Port 58 Chapter 3
Common Device Control Functions Opening Asynchronous Devicefiles NOTE The ccode function used in the examples is a Pascal/iX intrinsic function that returns the condition code bits from the status register. If you are using a language other than Pascal/iX, you should see the reference manual for that language for information on how to access the condition code bits.
Common Device Control Functions Reading From Asynchronous Devices Reading From Asynchronous Devices Data is read from a terminal by means of the FREAD, READ or READX intrinsic. FREAD is the most versatile of the three, but requires the use of a file number. READ allows reading from $STDIN only; READX allows reading from $STDINX only. Neither READ nor READX requires the use of a file number, but their utility is somewhat limited.
Common Device Control Functions Reading From Asynchronous Devices Block mode is enabled programmatically by a block mode application when it is executed at a terminal. The terminal’s configuration settings need to be changed also, in order for the terminal to function properly in block mode. This can be done by prompting the user to change the terminal’s configuration settings or by programmatically sending escape sequences to the terminal.
Common Device Control Functions Reading From Asynchronous Devices alternative end-of-record character will be received, or that a specified number of bytes will be received. It is implemented in FDEVICECONTROL 192, parm1 = 65. • Multiple alternative end-of-record (AEOR) characters. Allows an application or user to specify up to 16 AEOR characters. When the DTC receives one of these characters, it completes the current pending read request with the received AEOR character as the last byte of data.
Common Device Control Functions Reading From Asynchronous Devices Standard Mode Standard editing mode is enabled by default for asynchronous terminals. All special characters recognized by MPE/iX are available in standard editing mode. See Configuring Systems for Terminals, Printers and Other Serial Devices for a complete description of all the standard special characters.
Common Device Control Functions Reading From Asynchronous Devices informed that the data will be transmitted as a block, sends another read trigger when it is ready to accept the block of data. The second read trigger is referred to as a block mode read trigger and is the same character as the read trigger. It is possible to specify an alternate character for use as the read trigger (and therefore also the block mode read trigger) through the FDEVICECONTROL intrinsic.
Common Device Control Functions Reading From Asynchronous Devices • In block mode, the block mode read timer expires. This timer is active from the time that the second DC1 is sent until the RS character is received. The timer expires with a VPLUS intrinsic error if VPLUS block mode is being used. The timer expires with a file system error (FSERR 27) if any other type of block mode is being used. • System break is sent from the terminal (and system break is not disabled).
Common Device Control Functions Reading From Asynchronous Devices However, for asynchronous devices, the actual data transfer always occurs on a byte-by-byte basis. If the number of bytes input reaches the value specified, the read will terminate on byte count. For asynchronous terminals, the maximum supported read length is four kilobytes (4 KB) in standard or transparent editing mode and 128 bytes in binary editing mode.
Common Device Control Functions Reading From Asynchronous Devices Figure 3-2 Illustration of the FREAD Intrinsic Chapter 3 67
Common Device Control Functions Reading From Asynchronous Devices Timing a Read On MPE/iX systems every read that occurs is timed; there is never a need to turn a timer on to obtain information about the length of a read. However, the result of the timer is not actually returned to your program unless you explicitly issue an FCONTROL call, using 22 as the value of the controlcode parameter. This FCONTROL call returns the time used for the immediately preceding read as the value of param.
Common Device Control Functions Reading From Asynchronous Devices Figure 3-3 Obtaining the Result of the Read Timer Chapter 3 69
Common Device Control Functions Reading From Asynchronous Devices Setting a Read Time Limit FCONTROL can also be used to set a time limit on a succeeding read, by specifying 4 as the value of controlcode and specifying a time limit, in seconds, through param (up to 65535 seconds). If the read immediately following the call takes more than the time specified, the read will terminate in error and any data already received will be flushed. The read limit remains in effect only for the next read.
Common Device Control Functions Reading From Asynchronous Devices Figure 3-4 Opening a Read Port and a Write Port Chapter 3 71
Common Device Control Functions Reading From Asynchronous Devices Using READ or READX The READ and READX intrinsics provide a simple method for reading from the standard input device. You do not need to know the file number when you use these intrinsics. Except for the intrinsic name, the syntax is the same for READ and READX.
Common Device Control Functions Writing to Asynchronous Devices Writing to Asynchronous Devices The most common ways to write information to an asynchronous devicefile are provided by the FWRITE and PRINT intrinsics. FWRITE is the most versatile of these and can be used to write information to any device. PRINT is more limited in its usage, but does not require the use of a file number. Using FWRITE FWRITE transfers a record of data to a file on any device.
Common Device Control Functions Writing to Asynchronous Devices When writing to a terminal, a controlcode value of %320 is often used. This value specifies that no carriage control will be sent to the terminal and the next character printed by the next write will physically follow the data written by the current write. You might use a controlcode of %320 when prompting for user input at a terminal. No carriage return or linefeed will follow the write and the cursor will be positioned next to the prompt.
Common Device Control Functions Writing to Asynchronous Devices Figure 3-5 Illustration of the FWRITE Intrinsic Chapter 3 75
Common Device Control Functions Writing to Asynchronous Devices Sending Escape Sequences You can also use FWRITE to send escape sequences to an asynchronous device. Escape sequences can be used to alter the physical settings of a device. For example, on most supported terminals you can use escape sequences to set terminal straps, control the placement of the cursor on a terminal screen, and set margins. You should consult the manual for your device for a summary of useful escape sequences.
Common Device Control Functions Altering Terminal Deficefiles Altering Terminal Deficefiles Many of the asynchronous device control functions performed most commonly are accomplished through the use of the FCONTROL intrinsic. FCONTROL has often been referred to as the workhorse of the file system intrinsics. The examples that follow illustrate how FCONTROL can be used to alter the characteristics of data transmission to and from a terminal, or to alter device control settings.
Common Device Control Functions Altering Terminal Deficefiles Once an AEOR character is designated, any non-binary mode read issued for that devicefile can be terminated by entry of the AEOR character, as well as in the normal ways, until the device is closed, or until the AEOR character is disabled. You can disable the AEOR character by calling FCONTROL(25) again, using a 0 as the new value for AEOR. A read terminated by means of an AEOR does not end normally.
Common Device Control Functions Altering Terminal Deficefiles Figure 3-6 Obtaining the Result of the Read Timer Chapter 3 79
Common Device Control Functions Altering Terminal Deficefiles Altering Device Control Settings The code fragment presented in Figure 3-7 shows how a series of FCONTROL calls may be used to perform various device control functions. The end result of such a sequence of FCONTROL calls should be a devicefile whose characteristics are as required for a specific application. The first call in the example, to FCONTROL(40), returns device information to the calling program as the value of the line_speed variable.
Common Device Control Functions Altering Terminal Deficefiles Figure 3-7 Opening a Read Port and a Write Port Chapter 3 81
Common Device Control Functions Altering Terminal Deficefiles Setting Transparent Editing Mode The FCONTROL intrinsic is also commonly used to set the data editing mode at a terminal. As explained earlier in this chapter, the data editing mode controls which characters are considered to have special meaning when they are encountered in the data stream. In standard editing mode, all special characters recognized by MPE/iX apply and are acted on when sent from a terminal.
Common Device Control Functions Altering Terminal Deficefiles must explicitly disable transparent editing, either by issuing an FCLOSE against the device, or by calling the intrinsic used to set transparent mode again with both the EOR and subsystem break characters set to null. The code fragment shown in Figure 3-8 provides an example of enabling transparent editing mode through FCONTROL(41).
Common Device Control Functions Altering Terminal Deficefiles Figure 3-8 Opening a Read Port and a Write Port 84 Chapter 3
Common Device Control Functions Altering Terminal Deficefiles Setting Binary Editing Mode In some cases you may need to disable all special character processing and pass everything through as data. Binary editing mode allows you to transfer information in this manner. Binary editing mode treats all characters as data and passes all eight bits of every character through without performing any special operations. Fairly obviously, this restricts the way in which data transfers can take place.
Common Device Control Functions Altering Terminal Deficefiles Finally, note that in the example an FREAD call specifying a read of 0 bytes is posted against the device immediately following the FCONTROL calls. Only after the 0 byte read completes successfully does the program notify the user that the port is in binary mode. It is actually the read, not the FCONTROL call, that causes the controlling software to place the device driver in binary mode. (This is only true when you are setting binary mode.
Common Device Control Functions Altering Terminal Deficefiles Figure 3-9 Opening a Read Port and a Write Port Chapter 3 87
Common Device Control Functions Closing Files Closing Files The FCLOSE intrinsic is used to terminate access to a file. It applies to files on all devices and frees any resources that were assigned at the time the file was opened. If more than one file is opened against a device, the device itself is not deallocated until an FCLOSE is issued against every file opened on that device by your program.
Common Device Control Functions Closing Files Figure 3-10 Opening a Read Port and a Write Port Chapter 3 89
Common Device Control Functions Closing Files 90 Chapter 3
4 Using FDEVICECONTROL Many of the asynchronous device control functions that can be performed through FCONTROL can be performed through FDEVICECONTROL as well. In addition, FDEVICECONTROL allows you to perform a number of device control functions that are not available through use of FCONTROL. Chapter 3, “Common Device Control Functions,” in this manual provides some practical examples of how you can use FCONTROL in a program to control asynchronous devices.
Using FDEVICECONTROL Syntax Description Syntax Description While FDEVICECONTROL performs some of the same device control functions performed by FCONTROL, the two intrinsics look very different from each other when you use them in a program. FCONTROL uses just three parameters, through which you specify a devicefile, define the control operation to be performed, and, depending on the control operation, pass or receive specific information that may be required for that operation.
Using FDEVICECONTROL Syntax Description to your program, while setting it to 2 would actually change the backspace character to whatever new character you pass in the call (through the buffer parameter). Setting parm2 to 3 would both return the previous value and change the backspace character to the new value passed in the call. Some control directives do not permit all possible values of parm2 to be used with them.
Using FDEVICECONTROL Examples Examples The examples that follow illustrate using FDEVICECONTROL to perform a number of control operations on asynchronous devicefiles. The first example demonstrates how FDEVICECONTROL is used to set transparent editing mode at a terminal. A similar example, using FCONTROL for the same purpose, is included in Chapter 3, “Common Device Control Functions.” These two examples allow you to contrast the use of the two intrinsics.
Using FDEVICECONTROL Examples One other notable feature of the example is the way errors are handled. The example uses the fserrorcode parameter to provide information to the user in the event of an error by writing the file system error number to the standard output device.
Using FDEVICECONTROL Examples You also call FDEVICECONTROL with a control directive of 15 to disable transparent editing mode. To return to standard editing, call FDEVICECONTROL with parm1 set to 15, but specify 0 for both the subsystem break and EOR characters. Figure 4-2 provides an example of disabling transparent mode. Note that, in this example, parm2 specifies both Read and Write access for the call.
Using FDEVICECONTROL Examples Figure 4-2 FDEVICECONTROL to Disable Transparent Mode Chapter 4 97
Using FDEVICECONTROL Examples Specifying an End-of-Record Character You can change the character that will be recognized as the end-of-record character for a device by specifying a control directive of 39 and passing the desired character in buffer. This FDEVICECONTROL is effective in either standard and transparent editing mode. Note that the call does not alter the editing mode in effect for the device; it simply changes the character that will signal the end of a record for that device.
Using FDEVICECONTROL Examples Figure 4-3 FDEVICECONTROL to Specify EOR Character Chapter 4 99
Using FDEVICECONTROL Examples Controlling Backspace Processing Among the capabilities provided by FDEVICECONTROL which are not available through other intrinsics is the ability to manipulate how backspace processing takes place at a device. You can specify the character that the DTC will recognize as a backspace when it is sent from a specific device. You can also, to a limited extent, control the action that the DTC will take as a result of the backspace character being entered at a specific device.
Using FDEVICECONTROL Examples Figure 4-4 Specifying a New Backspace Character Chapter 4 101
Using FDEVICECONTROL Examples The code fragment shown in Figure 4-5 illustrates another aspect of backspace processing that can be manipulated through the FDEVICECONTROL intrinsic. In this example, a control directive of 55 is used to select a backspace response action. The backspace response action is the action that will be taken by the DTC as a result of a backspace (or the designated backspace character) being entered from a terminal. There are two valid backspace response actions for MPE/iX systems.
Using FDEVICECONTROL Examples Figure 4-5 Setting Backspace Response Chapter 4 103
Using FDEVICECONTROL Examples Controlling Device XON/XOFF Processing Another device control feature provided by the FDEVICECONTROL intrinsic is the ability to disable (and subsequently reenable) XON/XOFF flow control between a device and the DTC. XON/XOFF protocol provides the main method of flow control used by MPE/iX systems. The protocol controls the flow of data transmitted between the DTC and a device to protect against data overruns.
Using FDEVICECONTROL Examples Figure 4-6 Disable Device XON/XOFF Processing Chapter 4 105
Using FDEVICECONTROL Examples Controlling Host and Device XON/XOFF Processing Another host and device control feature provided by the FDEVICECONTROL intrinsic is the ability to disable (and subsequently reenable) XON/XOFF flow control between device and the DTC. See Figure 4-7 for enabling host XON/XOFF processing. XON/XOFF protocol provides the main method of flow control used by MPE/iX systems. The protocol controls the flow of data transmitted between DTC and the device to protect against data overruns.
Using FDEVICECONTROL Examples Figure 4-7 Enable Host XON/XOFF Processing Chapter 4 107
Using FDEVICECONTROL Examples Setting the Number of Stop Bits Among the capabilities provided by FDEVICECONTROL is to specify or set the number of stop bits used. By using FDEVICECONTROL with a control directive of 71, it is possible to set the number of stop bits used. There are two possible buffer values to specify the number of stop bits used. See Figure 4-8 on how to set the number of stop bits equal to two.
Using FDEVICECONTROL Examples Enabling Escape Sequence Read Termination FDEVICECONTROL has the ability to control the interpretation of escape sequences. Escape sequences are usually generated by function keys or cursor control keys. The escape sequence read termination (parm1 = 68) control directive allows your application to react immediately to a special key when it reads it. The escape sequence read termination causes a read to terminate when the escape character is encountered in input data.
Using FDEVICECONTROL Examples Figure 4-9 Escape Sequence Read Termination 110 Chapter 4
5 Using Subsystem Break If your application will be run in session mode, you can include a subsystem break routine that allows a user running the program interactively to interrupt a task being performed by the program. To provide this capability you must include calls to a number of system intrinsics and supply a special subroutine that will run when subsystem break is invoked. This chapter describes the process of implementing a subsystem break handler in your program.
Using Subsystem Break The Break Keys The Break Keys Two kinds of breaks can be made available to users running in session mode. System break, the so called “hard” break, lets the terminal user suspend the currently running process and access the Command Interpreter to enter MPE/iX commands. The user can then type :RESUME to return to the interrupted process or :ABORT to terminate the suspended process.
Using Subsystem Break Subsystem Break Intrinsics Subsystem Break Intrinsics When you want to make subsystem break processing available in a program there are several intrinsics that you must call. These intrinsics enable subsystem break and set up the procedure that will execute if the subsystem break character is entered while the program is running. You use the XCONTRAP intrinsic to specify the address of the break handler subroutine that will execute when the user presses subsystem break.
Using Subsystem Break Subsystem Break Intrinsics Subsystem Break Example The code samples shown in the following figures, illustrate how you might provide subsystem break capabilities in a program. The figures show two procedures, one to handle the subsystem break itself, and one to set up and enable subsystem break. The sample procedure in Figure 5-1 is a break handler routine. This is the procedure to which XCONTRAP will pass control when the subsystem break signal is sent from a user’s terminal.
Using Subsystem Break Subsystem Break Intrinsics Figure 5-1 Illustrating a Subsystem Break Handler The procedure illustrated by Figure 5-2 shows the other half of what you must do to provide subsystem break capabilities in a program. This procedure sets up and enables subsystem break. The procedure first calls XCONTRAP, which passes the address of the [CTRL]Y procedure shown in Figure 5-1. This arms the [CTRL]Y trap (enables the subsystem break handler).
Using Subsystem Break Subsystem Break Intrinsics After XCONTRAP executes, the procedure checks to make sure it completed successfully. Again, the procedure uses the Pascal/iX ccode function to check for errors. If XCONTRAP did not complete successfully, the user is informed of the failure, and the procedure ends. If the call to XCONTRAP is successful, the procedure calls FCONTROL, using a controlcode value of 17.
Using Subsystem Break Subsystem Break Processing Subsystem Break Processing A final consideration when building subsystem break processing capabilities into your program has to do with whether your program will run in Native Mode, Compatibility Mode, or both. Native Mode vs. Compatibility Mode So far, the discussion in this chapter has assumed that all processing is to take place in Native Mode (NM).
Using Subsystem Break Subsystem Break Summary Subsystem Break Summary The following summarizes subsystem break processing and the intrinsics involved: 1. A user written procedure must be provided to define how the program should act upon receiving a subsystem break. 2. A call to XCONTRAP must be included in the program, specifying the external address of the procedure written in Step 1 as the value of plabel. This arms the [CTRL]Y trap. 3.
6 Typeahead Mode Effective with Release A.20.00, a typeahead capability is supported for use on MPE/iX systems. Typeahead makes it possible for a user at a terminal to enter data before the read which will accept that data is actually posted. This is especially convenient when you need to enter a series of commands with system processing delays in between. The typeahead facility is controlled programmatically through the FDEVICECONTROL intrinsic, using one of three control directives.
Typeahead Mode Working in Typeahead Mode Working in Typeahead Mode By using the device controls described in this chapter, you can specify whether or not typeahead mode is enabled when your program executes. By allowing typeahead mode you can make it possible for the user of the application to enter data that the user knows will be required before the application actually requests the data.
Typeahead Mode Working in Typeahead Mode How Typeahead Mode Works When data is entered from a terminal with typeahead mode active, the data is staged in a special typeahead buffer before being sent through to the process requesting the data. Any read posted against a terminal with typeahead mode active will first access the typeahead buffer, rather than accepting data directly from the device. The typeahead buffer is limited to 224 bytes; anything in excess of this limit will cause an XOFF to be sent.
Typeahead Mode Working in Typeahead Mode Typeahead Mode and Subsystem Break When typeahead mode is active, the subsystem break character has additional functionality when typeahead is used, regardless of whether or not subsystem break is enabled. Receipt of the subsystem break character causes all data in the typeahead buffer to be discarded. This provides the user with a final chance to erase a previously typed command.
Typeahead Mode Additional Typeahead Considerations Additional Typeahead Considerations There are a number of actions that should be avoided when data is being typed ahead, such as changing a terminal’s speed or parity settings. If you were to enter the speed command using typeahead, then change the speed at the terminal and attempt to type ahead with the new speed, the terminal would hang.
Typeahead Mode Programming for Typeahead Mode Programming for Typeahead Mode To programmatically set and control typeahead mode you use the FDEVICECONTROL intrinsic, specifying one of three control directives in the parm1 value. • A control directive of 51 is used to specify whether or not typeahead mode is on for the device. Use this call with the buffer parameter set to 1 to enable typeahead mode, or with the buffer parameter set to 0 to disable typeahead mode (parm2 set to 2 or 3).
Typeahead Mode Programming for Typeahead Mode Setting Typeahead Mode The code fragment shown in Figure 6-1 illustrates how you can use the FDEVICECONTROL intrinsic to allow typeahead processing for your program. A control directive of 51, set typeahead mode, is passed in parm1, and parm2 is set to 2 to specify Write access. The buffer parameter contains a variable called value, set to 1 in this example, which will cause typeahead mode to be enabled. (A value of 0 would disable typeahead mode.
Typeahead Mode Programming for Typeahead Mode Figure 6-1 Program Fragment Setting Typeahead Mode 126 Chapter 6
Typeahead Mode Programming for Typeahead Mode Flushing the Typeahead Buffer Figure 6-2 illustrates how FDEVICECONTROL can be used to flush the typeahead buffer. For example, the buffer can be flushed if an error is detected in the data that was typed ahead. This FDEVICECONTROL is only valid if type ahead is enabled. The default is not to flush the typeahead buffer. An FDEVICECONTROL call with a control directive of 60 will cause the buffer to be flushed at the time of the next read.
Typeahead Mode Programming for Typeahead Mode Figure 6-2 Program Fragment to Flush Buffer 128 Chapter 6
Typeahead Mode Programming for Typeahead Mode Bypassing the Typeahead Buffer Figure 6-3 is an example of using FDEVICECONTROL to bypass the typeahead buffer. You could use this capability to send a status request and obtain a reply directly from a terminal without affecting the data already in the typeahead buffer. This FDEVICECONTROL is only valid if typeahead is enabled. The default is not to bypass the typeahead buffer.
Typeahead Mode Programming for Typeahead Mode Figure 6-3 Program Fragment to Bypass Buffer 130 Chapter 6
7 Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices This chapter describes PAD, DTC Telnet, Telnet/iX Server, and VT access, available on properly equipped and configured MPE/iX systems. It has four parts. The first part details the special considerations involved when programmatically controlling PAD terminals and serial printers. The second part deals with the considerations involved when programmatically controlling DTC Telnet devices.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices PAD Access to MPE/iX Systems PAD Access to MPE/iX Systems If you have X.25 cards, the programs you write may be used to control devices connected through a packet switched network (PSN) to a PAD device. A PAD, or Packet Assembler/Disassembler, is a device that converts asynchronous character streams into packets that can be transmitted over a packet switching network. PAD packets follow the CCITT X.25 protocol recommendations.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices PAD Access to MPE/iX Systems The DTC is connected to the LAN as usual, with the MPE/iX systems to which it has access also connected to the LAN. Figure 7-1 depicts PAD access to HP 3000 Series 900 Systems via a DTC equipped with the DTC/X.25 Network Access card. Figure 7-1 DTC/X.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices PAD Access to MPE/iX Systems PAD support parameters for each MPE/iX host system that will allow device connections via PAD must be defined in the NMMGR configuration, along with the device profiles to be associated with PAD devices. PAD devices requiring non-logon (programmatic) access must be configured as nailed PAD devices. Devices that require only logon access can be configured as non-nailed PAD terminals. Security.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices PAD Access to MPE/iX Systems Programmatic Access. Terminals and serial printers can be accessed programmatically if they are connected to a private PAD and configured as nailed devices on the MPE/iX host on which the application is running.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices PAD Access to MPE/iX Systems There are, however, a number of differences in the way device control functions operate over PAD connections. The individual differences in the operation of each FCONTROL and FDEVICECONTROL call are documented in the Intrinsics Reference chapter of this manual. The following summary is provided here for your convenience. FCONTROL Some FCONTROLs are ignored by PAD.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices PAD Access to MPE/iX Systems FDEVICECONTROL parm1 values, with 192 specified as the controlcode, will return a CCE condition code but have no effect on the operation of the device or the transmission of data: parm1 Action 1 Specify terminal type or printer type file 3 Set line speed 9, 11 Enable/disable parity checking 10, 12 Set parity type 14 Set line deletion response 26 Enable/disable XON/XOFF flow control 27 Set XOFF time
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices DTC Telnet Access to MPE/iX Systems DTC Telnet Access to MPE/iX Systems If your network is managed by the OpenView DTC Manager, and at least one of the DTCs on the LAN are equipped with a Telnet Access Card, the programs you write may be used to control devices connected to the DTC via a Telnet connection to an HP 9000 or other ARPA machine. Collectively, these devices are called DTC Telnet devices.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices DTC Telnet Access to MPE/iX Systems with DTC Telnet devices. DTC Telnet devices must be configured as non-nailed TIO terminals. The terminal type for these terminals must be set at 10 or 18. For more information on configuration see both Configuring Systems for Terminals, Printers, and Other Serial Devices and Using the OpenView DTC Manager.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices DTC Telnet Access to MPE/iX Systems • FCONTROL(10), set line speed. • FCONTROL(11), set line speed • FCONTROL(23), disable parity checking. • FCONTROL(24), enable parity checking. • FCONTROL(28), disable user block mode. • FCONTROL(29), enable user block mode. • FCONTROL(36), define parity setting. • FCONTROL(40), determine current speed.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices DTC Telnet Access to MPE/iX Systems 30 Define block mode trigger character 32 Define read trigger character 51 Set typeahead mode 55 Select backspace response action 56 Specify data bits per character 60 Flush typeahead buffer 61 Bypass typeahead buffer 62 Set quiesce I/O 63 Set single echo typeahead mode 64 Ignore parity error on input mode 65 Set inter-byte timer 66 Define multiple type 2 EOR characters (AEOR) 67 D
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Telnet/iX Server Access on MPE/iX Systems Telnet/iX Server Access on MPE/iX Systems For details on using the Telnet/iX Client and Server on MPE/iX systems, as well as information on the Telnet/iX Client commands, refer to the HP Telnet/iX User’s Guide. For more information on configuring Telnet/iX, as well as more general information on Internet Services, please refer to Configuring and Managing MPE/iX Internet Services.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Telnet/iX Server Access on MPE/iX Systems • FCONTROL(22), return last read time. • FCONTROL(23), disable parity generation and checking. • FCONTROL(24), enable parity generation and checking. • FCONTROL(36), define parity setting. • FCONTROL(37), set terminal type and speed. • FCONTROL(38), set terminal type. • FCONTROL(40), determine current speed.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Telnet/iX Server Access on MPE/iX Systems 10, 12 Set parity type 11 Set parity generation and checking 26 Enable/disable XON/XOFF flow control 27 Set XOFF timer value 56 Specify data bits per character 64 Ignore parity error on input mode 72 Return PAD line speed 73 Set FCLOSE timeout value 74 Suppress the last form feed FREAD and FWRITE In general, the Telnet/iX Server will support the same size data buffers for FREAD and
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Virtual Terminal Access on MPE/iX Systems Virtual Terminal Access on MPE/iX Systems The Virtual Terminal (VT) service of Network Services (NS) is designed to allow applications on the MPE/iX remote host to access devices on local clients as if they were terminals. The VT service on an MPE/iX host will support connections from MPE/iX, MPE V, PCs, and HP-UX systems.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Virtual Terminal Access on MPE/iX Systems • FCONTROL(36), define parity setting. • FCONTROL(37), set terminal type and speed. • FCONTROL(40), determine current speed. The following FCONTROLs are not supported when the remote device is a PC or an HP-UX client. VT will return a CCE condition code even though no device control will take place: • FCONTROL(23), disable parity generation and checking.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Virtual Terminal Access on MPE/iX Systems situations where the application host supports a specific FDEVICECONTROL but the remote device does not, the VT driver will usually return an error to the application.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Virtual Terminal Access on MPE/iX Systems FDEVICECONTROL(28)(block mode types supported) and FDEVICECONTROL(62) (set quiesce I/O) are not supported for use when the remote device is a PC or an HP-UX client. FDEVICECONTROL(51) (set typeahead mode) is not supported on MPE V remote devices or PCs without appropriate NS software. Additionally, HP-UX (VT3K) supports single echo typeahead only.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Virtual Terminal Access on MPE/iX Systems than the configuration supports, the data will not be processed. If the remote host detects a buffer size support issue on the local client, it will return a file system error FSERR32 to the application.
Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices Virtual Terminal Access on MPE/iX Systems 150 Chapter 7
8 Intrinsics Reference This chapter presents reference information pertaining to the intrinsics discussed in this manual. Each is described using the same format as that used in the MPE/iX Intrinsics Reference Manual; that is, each intrinsic description does the following: • Gives the intrinsic name. • Describes the syntax of a call to the intrinsic. • Summarizes the use of the intrinsic. • Defines intrinsic parameters.
Intrinsics Reference Intrinsics and Asynchronous Device Control Intrinsics and Asynchronous Device Control Table 8-1 summarizes asynchronous device characteristics, settings and communication modes that may be affected programmatically through use of the intrinsics described in this chapter. It includes a brief explanation of how initial settings are determined. Unless stated otherwise, these settings remain in effect until the device is closed.
Intrinsics Reference Intrinsics and Asynchronous Device Control Device Control/Feature Related Intrinsic(s) Notes Set Read Timeout FCONTROL(4) Reset at FCLOSE Last Read Time FCONTROL(22) Set to 0 at FCLOSE Typeahead FDEVICECONTROL (51, 60, 61, 63) Default is set by termtype.
Intrinsics Reference Intrinsic Descriptions Intrinsic Descriptions The descriptions that follow are specific to the use of intrinsics for programmatic control of asynchronous devices. Because of this, the explanations in this manual may vary from the more general explanations provided by the MPE/iX Intrinsics Reference Manual. In all cases, however, the intrinsics are described according to the conventions that are explained here.
Intrinsics Reference Intrinsic Descriptions NOTE A parameter passed by value is indicated by appending V to the mnemonic. Pass by reference is considered to be the default and, consequently, is not marked. All arrays are assumed to be passed by reference. In the FFILEINFO intrinsic shown previously, there is one required parameter (filenum), and a pair of optional parameters that can be repeated up to five times (itemnum and item).
Intrinsics Reference Intrinsic Descriptions Condition Codes Where applicable, condition codes are included in the intrinsic descriptions. Special Considerations The special considerations portion of the description is omitted unless the intrinsic requires some special circumstances for proper execution, such as Privileged Mode (PM) capability.
Intrinsics Reference FCHECK FCHECK Used to request specific details about file input/output errors. SYNTAX I16V I16 I16 I32 I16 FCHECK(filenum,fserrorcode,translog,blocknum,numrecs); Use You can use the FCHECK intrinsic to obtain specific details about an error that occurred during execution of a file system intrinsic. If an intrinsic returns a condition code of CCL or CCG, FCHECK should be used to determine the error code associated with the problem that occurred.
Intrinsics Reference FCHECK blocknum 32-bit signed integer by reference (optional) For asynchronous devices, this parameter is used to return the number of records read or written to a device since the last FOPEN. A logical record count is returned for spoolfiles; a physical record count is returned for fixed and undefined record files. numrecs 16-bit signed integer by reference (optional) Returns the number of logical records in the block (blocking factor).
Intrinsics Reference FCHECK FS Code (decimal) Description 68 Insufficient system resources. 70 I/O error while printing header/trailer. Also appears if an FOPEN or FCLOSE failed 95 The read was halted because the terminal user hit [Break]. The file system will automatically restart the read when the user enters the :RESUME command. Only the file system see the restart, the application program does not. 98 Read timer overflow. Read exceeded maximum capacity of read timer (655.35 seconds).
Intrinsics Reference FCLOSE FCLOSE Closes a file. Syntax I16V I16V I16V FCLOSE(filenum,disposition,securitycode); Use The FCLOSE intrinsic terminates access to a file. You should make sure your program issues an FCLOSE for every file it opens. If you have opened multiple files against the same device, you should issue an FCLOSE for each opened file before your program ends.
Intrinsics Reference FCLOSE When all files have been closed on a device (referred to as device close), and the device is no longer under the control of a program or a session, all device characteristics are returned to those specified by the device’s configuration. NOTE If a disconnected status is received from a terminal your application has programmatically opened, your application should either FCLOSE the terminal or terminate.
Intrinsics Reference FCONTROL FCONTROL Performs control operations on a file or a device. Syntax I16V I16V * FCONTROL(filenum,controlcode,param); Use The FCONTROL intrinsic performs various control operations on a file or on the device on which the file resides. It applies to files on disk and tape as well as to files on terminals and printers. The controlcode parameter determines the action taken by the FCONTROL call.
Intrinsics Reference FCONTROL A number of FCONTROL functions return information to your program. Some only return information, while others set a new value and return the old value. You can then use the value returned as input to a call which resets the device to its previous setting when your program ends. Parameters filenum 16-bit signed integer by value (required) Contains the file number of the target devicefile as returned by FOPEN (or HPFOPEN).
Intrinsics Reference FCONTROL 29 Enables User Block Mode. 34 Allows printing of !!! when the line deletion character is entered. 35 Prevents printing of !!! when the line deletion character is entered. 36 Defines parity setting. 37 Sets both terminal type and speed. 38 Sets terminal type. 39 Determines current terminal type. 40 Determines current speed setting. 41 Enables transparent editing.
Intrinsics Reference FCONTROL(1) FCONTROL(1) Parameters controlcode 1 — Causes a carriage control or mode control directive to be sent to the device. param 16-bit unsigned integer by reference (required) Passes a value representing a carriage control or mode control directive to a non spooled device. Returns a value representing the prior mode control setting when a mode control directive is specified.
Intrinsics Reference FCONTROL(1) When FCONTROL is used to specify a mode control directive, an additional call to FWRITE or FCONTROL is required if you also want to specify a carriage control directive. If param contains one of the mode-control directives, a value of 0 or 1 is returned to param to indicate the mode setting of the device prior to the call. A value of 0 indicates postspacing, a value of 1 indicates prespacing. The default mode and carriage control is postspacing with automatic page eject.
Intrinsics Reference FCONTROL(4) FCONTROL(4) Parameters controlcode 4 — Sets a read timeout value for the next read. param 16-bit unsigned integer by reference (required) Passes a timeout value (in seconds) to the device that owns the file whose file number is specified in filenum. Notes A call to FCONTROL with a controlcode value of 4 allows you to set a time limit on the next read from a terminal. The timeout value is specified in seconds, with a maximum value of 65535.
Intrinsics Reference FCONTROL(4) Condition Codes CCE Request granted. CCG Not returned by this intrinsic. CCL Failed; timeout value not accepted. Additional Discussion See also FCONTROL(26,27) in this manual.
Intrinsics Reference FCONTROL(10, 11) FCONTROL(10, 11) Parameters controlcode 10 or 11 — Changes the line speed of a device. param 16-bit unsigned integer by reference (required) Passes a value which specifies a new line speed. Notes A controlcode value of 10 or 11 is used to programmatically change the line speed associated with a device. Both input and output speeds are affected. The value passed in param must be expressed in characters per second (1 character per second = 10 bits per second).
Intrinsics Reference FCONTROL(10, 11) When a device is initially opened programmatically, the speed is set to the default speed of the device. If a device is opened as a log on device (and the device was configured with speed and parity sensing enabled), the speed setting is sensed from the speed of the first carriage return character received.
Intrinsics Reference FCONTROL(12, 13) FCONTROL(12, 13) Parameters controlcode 12 — Enables character echoing. 13 — Disables character echoing. param 16-bit unsigned integer by reference (required) Returns a value indicating the previous echo status to the program. 0 = Echo ON 1 = Echo OFF Notes FCONTROL with a controlcode value of 12 or 13 specifies whether or not input echo is enabled at a terminal. Use 12 to turn echo on, 13 to turn echo off.
Intrinsics Reference FCONTROL(12, 13) You may also want to disable echo if the terminal user is asked to enter data that you do not want to appear on the screen, such as a password or lockword. Additionally, it may be necessary to disable echo if you are connecting certain non-supported devices to an asynchronous port. Echo is not reset at FCLOSE, so your program should always restore the original echo setting before it ends.
Intrinsics Reference FCONTROL(14, 15) FCONTROL(14, 15) Parameters controlcode 14 — Disables the system break function. 15 — Enables the system break function. param 16-bit unsigned integer by reference (required) This parameter has no meaning for these controlcode values. Enter a dummy value of 0 to satisfy the internal requirements of the intrinsic. Notes A call to FCONTROL with a controlcode value of 14 or 15 determines whether or not a terminal will react to a system break request.
Intrinsics Reference FCONTROL(14, 15) Use FCONTROL(14) to disable the system break function before your program enters block mode. Call FCONTROL(15) to reenable system break when block mode processing is completed. If the [Break] key is pressed while system break is disabled no action is taken by any level of software. System break has no effect on a device with no active session. Condition Codes CCE Request granted. CCG Not returned by this intrinsic.
Intrinsics Reference FCONTROL(16, 17) FCONTROL(16, 17) Parameters controlcode 16 — Disables the subsystem break function. 17 — Enables the subsystem break function. param 16-bit unsigned integer by reference (required) This parameter has no meaning for these controlcode values. Enter a dummy value of 0 to satisfy the internal requirements of the intrinsic. Notes A call to FCONTROL with a controlcode value of 16 or 17 determines whether or not a terminal will react to a subsystem break request.
Intrinsics Reference FCONTROL(16, 17) Before subsystem break can be successfully enabled, your program must call the XCONTRAP intrinsic, which arms a special trap procedure referred to as the [CTRL]Y Trap. The external label of a user written procedure is specified as the value of the plabel parameter in the call to XCONTRAP. The procedure specified must define the steps that will be taken if subsystem break is entered during execution of your program.
Intrinsics Reference FCONTROL(16, 17) Condition Codes CCE Request granted. CCG Not returned by this intrinsic. CCL Request failed because the file number specified did not belong to this process or the device is not a terminal. Additional Discussion See the discussion of RESETCONTROL, XCONTRAP, FCONTROL(41) and FDEVICECONTROL in this manual. See Chapter 5, “Using Subsystem Break,” in this manual for an example illustrating subsystem break processing.
Intrinsics Reference FCONTROL(22) FCONTROL(22) Parameters controlcode 22 — Obtains the time used for completion of the last read. param 16-bit unsigned integer by reference (required) Returns the measured time duration of the last read in hundredths of a second. Notes A call to FCONTROL with a controlcode of 22 allows you to read the result of the read duration timer for the last read. The value is returned to your program in hundredths of a second, up to the 16-bit maximum limit of 655.35 seconds.
Intrinsics Reference FCONTROL(23, 24) FCONTROL(23, 24) Parameters controlcode 23 — Disables parity generation and checking. 24 — Enables parity generation and checking. param 16-bit unsigned integer by reference (required) This parameter has no meaning for these controlcode values. Enter a dummy value of 0 to satisfy the internal requirements of the intrinsic.
Intrinsics Reference FCONTROL(23, 24) Because parity requires the eighth bit to be set as a parity bit, it is not possible to use parity with 8-bit character sets. If binary mode is enabled, the parity bit will be passed through as data, and no parity checking will occur. If enabling parity, make sure that your program also requests the terminal operator to change the physical parity setting of the terminal to the new setting of the ASC software.
Intrinsics Reference FCONTROL(25) FCONTROL(25) Parameters controlcode 25 — Defines Additional End-of-Record (AEOR) character for terminal input. param 16-bit unsigned integer by reference (required). Passes the value of a character to be used as an additional line terminator. The octal or decimal code for the character must be contained in the right byte of the parameter; the left byte is ignored. If the NULL character (%0) is specified, normal (default) line termination conditions are restored.
Intrinsics Reference FCONTROL(25) An AEOR character designated by FCONTROL(25) is also recognized as a line terminator during reads in transparent editing mode, along with a user defined EOR character that replaces [Return] as the normal EOR character. See the discussion of FCONTROL(41) later in this chapter for more information on terminating reads in transparent mode. To disable the Additional End-of-Record character, call FCONTROL(25) again specifying 0 as the value of param.
Intrinsics Reference FCONTROL(25) Condition Codes CCE Request granted. CCG Not returned by this intrinsic. CCL Request failed because the file number specified did not belong to this process or the device is not a terminal. Additional Discussion See FCONTROL(41) and FDEVICECONTROL in this manual.
Intrinsics Reference FCONTROL(26, 27) FCONTROL(26, 27) Parameters controlcode 26 — Disables Binary Mode 27 — Enables Binary Mode param 16-bit unsigned integer by reference (required) This parameter has no meaning for these controlcode values. Enter a dummy value of 0 to satisfy the internal requirements of the intrinsic. Notes An FCONTROL call with a controlcode value of 26 or 27 determines whether or not a terminal is operating in binary editing mode for the file specified in filenum.
Intrinsics Reference FCONTROL(26, 27) being taken. No carriage return or linefeed is sent to the terminal following a binary read. On writes, all carriage control directives are ignored. Binary editing mode is initially disabled by default. Unlike most FCONTROL calls, binary mode does not actually take effect until a read is posted to the device following the FCONTROL call.
Intrinsics Reference FCONTROL(26, 27) Additional Discussion See discussion of FCONTROL(4), FCONTROL(12,13) and FCONTROL(41) in this manual.
Intrinsics Reference FCONTROL(28, 29) FCONTROL(28, 29) Parameters controlcode 28 — Disables User Block Mode. 29 — Enables User Block Mode. param 16-bit unsigned integer by reference (required) This parameter has no meaning for these controlcode values. Enter a dummy value of 0 to satisfy the internal requirements of the intrinsic. Notes A call to FCONTROL with a controlcode value of 29 enables user block mode processing, while a call using controlcode 28 disables user block mode processing.
Intrinsics Reference FCONTROL(28, 29) Some additional considerations apply when transmitting data in block mode. The terminal must be configured to perform in a manner compatible with the expectations of the system and the application requesting the block mode transfers. You should pay particular attention to how Line/Page(D), InhHndShk(G) and Inh DC2(H) are set when configuring a terminal for block mode processing. Block mode processing is not supported with terminal type 18.
Intrinsics Reference FCONTROL(34, 35) FCONTROL(34, 35) Parameters controlcode 34 — Allows printing of !!! when line deletion character is entered. 35 — Prevents printing of !!! when line deletion character is entered param 16-bit unsigned integer by reference (required) This parameter has no meaning for these controlcode values. Enter a dummy value of 0 to satisfy the internal requirements of the intrinsic.
Intrinsics Reference FCONTROL(34, 35) Condition Codes CCE Request granted. CCG Not returned by this intrinsic. CCL Failed because the file number specified did not belong to this process or the device is not a terminal. Additional Discussion None.
Intrinsics Reference FCONTROL(36) FCONTROL(36) Parameters controlcode 36 — Defines parity setting. param 16-bit unsigned integer by reference (required) Passes a value (0, 1, 2, 3, or 4) which represents a specified parity condition. Returns the value of the previous setting. Refer to Table 8-5 for a definition of the condition represented by each value.
Intrinsics Reference FCONTROL(36) incoming data, the local terminal control that determines whether or not parity is checked should be set to check parity. Parity cannot be used with 8-bit character sets. This call is ignored for devices connected via PAD, DTC Telnet, Telnet/iX, or VT. If issued against such a device it will return a condition code of CCE, but no device control action will occur.
Intrinsics Reference FCONTROL(37) FCONTROL(37) Parameters controlcode 37 — Sets both terminal type and speed. param 16-bit unsigned integer by reference (required) Passes a value which specifies a new line speed and terminal type to be associated with an asynchronous port. Bits (0:11) specify the speed, bits (11:5) specify the terminal type.
Intrinsics Reference FCONTROL(37) If issued against a terminal connected via PAD, DTC Telnet, or Telnet/iX, this call will change the terminal type setting, but will have no impact on how the device actually operates. A CCE condition code will be returned. This call is unsupported for devices connected via VT. If used, the VT driver will return a CCE condition code, but no device control action will take place. Condition Codes CCE Request granted. CCG Not returned by this intrinsic.
Intrinsics Reference FCONTROL(38) FCONTROL(38) Parameters controlcode 38 — Sets terminal type. param 16-bit unsigned integer by reference (required) Passes the value if the system defined terminal type to be associated with an asynchronous port. Notes FCONTROL with a controlcode value of 38 allows you to change the terminal type associated with a port to another system defined terminal type.
Intrinsics Reference FCONTROL(38) If issued against a terminal connected via VT from an MPE/iX or MPE V local client, this call will change the terminal type setting and the characteristics of the terminal type supported by VT. The controlcode value is not supported for VT connections from a PC or HP-UX local client. Condition Codes CCE Request granted. CCG Not returned by this intrinsic.
Intrinsics Reference FCONTROL(39) FCONTROL(39) Parameters controlcode 39 — Determines current terminal type. param 16-bit unsigned integer by reference (required) Returns the terminal type currently associated with an asynchronous port. Notes A call to FCONTROL with a controlcode value of 39 allows you to determine the terminal type that is currently associated with an asynchronous port.
Intrinsics Reference FCONTROL(40) FCONTROL(40) Parameters controlcode 40 — Determines current speed setting. param 16-bit unsigned integer by reference (required) Returns the line speed currently associated with an asynchronous port in characters per second. Notes A call to FCONTROL with a controlcode value of 40 allows you to determine the line speed at which an asynchronous port is currently operating. The speed is specified in characters per second.
Intrinsics Reference FCONTROL(40) Additional Discussion See also discussions of FCONTROL(11) and FCONTROL(37) in this manual.
Intrinsics Reference FCONTROL(41) FCONTROL(41) Parameters controlcode 41 — Enables transparent editing. param 16-bit unsigned integer by reference (required) Passes a value to be used as a subsystem break character in bits (0:8) and a value to be used as a read terminator in bits (8:8). Returns the values previously assigned for use as subsystem break and read terminator characters. Notes An FCONTROL call with a controlcode value of 41 will place a terminal in transparent editing mode.
Intrinsics Reference FCONTROL(41) • The read encounters the End-of-Record (EOR) character defined in param. This character functions like the [Return] character does in normal reads. The EOR is echoed but is stripped from the user data. No carriage return or line feed is sent to the terminal. • The read encounters an Additional End-of-Record (AEOR) character defined through a previous call to FCONTROL(25).
Intrinsics Reference FCONTROL(41) Subsystem break processing also occurs as in normal editing mode, except that the subsystem break character is defined through the FCONTROL(41) call. Because DC1 and DC2 (if the DC2 is the first byte of data) are recognized as special characters, transparent editing can be successfully used during block mode reads.
Intrinsics Reference FCONTROL(41) Additional Discussion See also discussions of FCONTROL(4), FCONTROL(16,17), FCONTROL(25), FCONTROL(26,27) and FSETMODE in this manual. See Chapter 7, “Programming for PAD, DTC Telnet, Telnet/iX Server, and VT Devices,” for more information on controlling PAD and DTC Telnet devices.
Intrinsics Reference FDEVICECONTROL FDEVICECONTROL Provides control operations to a printer, terminal, or spooled device file. Syntax I16V UDS I16V I16V DEVICECONTROL(filenum,buffer,length,controlcode, U16V U16V U16 parm1,parm2,fserrorcode), Use The FDEVICECONTROL intrinsic allows you to perform a variety of control functions on devicefiles. The function performed by a specific FDEVICECONTROL call is determined by the values you set for its parameters.
Intrinsics Reference FDEVICECONTROL Code Operation Performed 140 Page control. 141 Clear environment. 142 Reserved for MPE/iX. 143 Load the default environment. 144 Print picture. 145 End of job. 146 Device extended capability mode. 192 Device control operations. 193 Record processing information for NRJE spoolfiles. The specific action that will be performed by a call to FDEVICECONTROL using 192 as a value for controlcode is determined by the value of the parm1 parameter.
Intrinsics Reference FDEVICECONTROL parm1 Value Access Allowed Device Control Operation 8 R Obtain the time used for completion of the last read. 9 R/W Set parity generation and checking on or off. 10 R/W Set type of parity. 11 R/W Set parity generation and checking on or off. 12 R/W Set type of parity. 14 R/W Set line deletion response. 15 R/W Set transparent editing mode. 26 R/W Device XON/XOFF enable. 27 R/W Set XOFF timer value.
Intrinsics Reference FDEVICECONTROL parm1 Value Access Allowed 66 R/W Define Multiple Type 2 EOR characters (AEOR). 67 R/W Treat Delete Character (DEL) like Backspace (BS). 68 R/W Escape Sequence Read Termination. 69 R/W Suppress echo of Read Termination Characters. 72 R 73 R/W Set FCLOSE timeout value. 74 R/W Suppress last form feed. 76 R/W Host and Device XON/XOFF enable. 77 R/W Set the number of stop bits. Device Control Operation Return PAD line speed.
Intrinsics Reference FDEVICECONTROL The exception to this occurs when parm1 is set to 1 to specify a new terminal type or printer type file for use. In this case, the length of the character array containing the name of the file to be used is specified in the length parameter. controlcode 16-bit signed integer by value (required) Specifies the code number of the operation to be performed. This section of the manual assumes that controlcode is 192 (device control directive).
Intrinsics Reference FDEVICECONTROL Device Control Directives The following is a list of all possible values for the parm1 argument, the control directive associated with that value, and a description of the operation of that control directive. Value of parm1 Action 1 Specify terminal type or printer type file. This directive specifies a new terminal type or printer type file which describes the device to the device driver.
Intrinsics Reference FDEVICECONTROL characters per second): 30, 120, 240, 480, 960, and 1920, (and 3840 for DTC 72MX direct connected devices only). If this call is issued against a device connected through a PAD, DTC Telnet, or Telnet/iX connection, the terminal control will be ignored, and a meaningless value (120 for 1200 baud) will be returned in the call. For VT connections, the value returned will typically be 960 (for 9600 baud) but this value has no meaning. 4 Set echo at a terminal.
Intrinsics Reference FDEVICECONTROL 9, 11 Set parity generation and checking. These directives enable and disable parity generation and checking between the DTC and the device. The functions of parm1 values 9 and 11 are identical. It is the same as FCONTROL (23, 24). A buffer value of 0 disables parity, and all eight bits of each character are passed through untouched. A buffer value of 1 enables parity that is set when parm1 is 10 or 12, or when FCONTROL(36) is used.
Intrinsics Reference FDEVICECONTROL transmission. If the line delete response is disabled, line deletion still takes place, but !!! is not echoed. This directive is the same as FCONTROL (34, 35). If this call is issued against a device connected through a PAD, DTC Telnet or VT connection, a CCE condition code is returned but there is no impact on the terminal. Line deletion characters are controlled locally by PAD devices. 15 Set transparent editing mode.
Intrinsics Reference FDEVICECONTROL MPE V or HP-UX local client, the subsystem break character must be set to the existing subsystem break character when enabling transparent mode. 26 Device XON/XOFF enable. This directive enables and disables XON/XOFF flow control between the device and the DTC. A buffer value of 1 enables device XON/XOFF, and a value of 0 disables XON/XOFF. When device XON/XOFF is enabled, the DTC stops sending data to the device when it receives XOFF and resumes when it receives XON.
Intrinsics Reference FDEVICECONTROL 29 Define block mode alert character. This directive specifies the character that signals HP block mode transfers. The normal alert character is DC2. Note that this call only defines the alert character; it does not enable HP block mode. The low order byte of buffer contains the new alert character. If issued against a terminal connected via PAD, DTC Telnet or VT, this call will return a CCE condition code, but the device control action will not occur.
Intrinsics Reference FDEVICECONTROL The following special characters retain their meaning: AEOR character Alternate End of Record [Break] System Break [CTRL]R Same as XON if it is first character in the record [CTRL]Q XON [CTRL]S XOFF If a [Return] is issued via PAD, and the EOR is not [Return], the EOR will be set and a timer (.5 second) will be enabled that will timeout and transmit the data if the user enters the EOR but does not enter a [Return].
Intrinsics Reference FDEVICECONTROL EOR characters (AEOR) control directive (FDEVICECONTROL 66) interact closely. A call to set a single AEOR sets the specified character as the AEOR character, and all other AEOR characters are cleared. A call to set multiple AEORs sets all of the characters specified in the array, and it clears the single AEOR. This call is not supported for use with VT. 41 Define subsystem break character. This directive specifies the subsystem break character.
Intrinsics Reference FDEVICECONTROL 52 Form feed allowed in output data. This directive enables and disables the substitution of the form feed character in the output stream. If buffer is 1, the device driver does not substitute the form feed character when it is encountered in the carriage control of terminals. If buffer is 0, the device driver substitutes any form feed characters encountered in the carriage control of terminals with form feed replacement character.
Intrinsics Reference FDEVICECONTROL 57 Obtain subsystem break character. This directive returns the current subsystem break character. It only returns a value, and may not be used to change the subsystem break character. 60 Flush typeahead buffer. This directive flushes the typeahead buffer. If buffer equals 1, the device driver flushes the typeahead buffer, and any data in the buffer is lost. This request is valid for the next read only. A value of 0 has no effect on the typeahead buffer.
Intrinsics Reference FDEVICECONTROL If issued against a terminal connected via DTC Telnet or via VT to an HP-UX or PC local client, this call will return an error. 63 Single echo typeahead mode. This directive specifies that the device driver shall withhold the echoing of typeahead data until a read is posted for the data. This facility prevents passwords and other data from being echoed at inappropriate times. This directive is not valid if typeahead mode is disabled.
Intrinsics Reference FDEVICECONTROL This control directive is incompatible with the Escape Sequence Read Termination control directive (parm1 = 68). If both are enabled, the second FDEVICECONTROL will return an error. A positive value in buffer indicates the inter-byte timer value in tenths (.1) of a second. That is, a value of 10 in buffer sets the inter-byte timer to expire in 1 second. If buffer is 0, the inter-byte timer is deactivated.
Intrinsics Reference FDEVICECONTROL The Define Single Type 2 EOR character (AEOR) control directive (parm1 = 40) and Define Multiple Type 2 EOR characters (AEOR) control directive (parm1 = 66) interact closely. A call to set a single AEOR sets the specified character as the AEOR character, and all other AEOR characters are cleared. A call to set multiple AEORs sets all of the characters specified in the array, and it clears the single AEOR.
Intrinsics Reference FDEVICECONTROL The DTC sets the inter-byte timer to the time it takes to transmit 2 characters at the current baud rate (see parm1 = 3). The read returns with all characters received with less than a 2 character delay between them. This ensures that the read included all of the automatically generated escape sequence characters. Because the DTC uses the inter-byte timer to time the read termination, this control directive is incompatible with the Inter-Byte Timer (parm1 = 65).
Intrinsics Reference FDEVICECONTROL 72 Return PAD line speed. This directive will return the current line speed of a terminal connection, including PAD connections. The line speed in characters per second will be returned in buffer. NOTE When the connection is first established, the DTC sends the line speed to the host. If the user changes the line speed locally (between the PAD and the terminal), this FDEVICECONTROL will not reflect the change. 73 Set FCLOSE timeout value.
Intrinsics Reference FDEVICECONTROL This directive will suppress the form feed normally sent by the serial printer driver during close processing. This FDEVICECONTROL is often used when an application sends its own form feed at the end of a document. The combination of the application’s form feed and the serial printer driver’s form feed produces an extra blank page at the end of the document. The use of this FDEVICECONTROL will suppress the serial printer driver’s form feed.
Intrinsics Reference FDEVICECONTROL 77 Set the number of stop bits. This directive specifies the number of stop bits used. There are two possible settings for buffer: 0 indicate the number of stop bits to 1 1 indicate the number of stop bits to 2 Additional Discussion See the discussions of the various uses of the FCONTROL intrinsic.
Intrinsics Reference FDEVICECONTROL 226 Chapter 8
9 Intrinsics Reference (cont) This chapter presents reference information pertaining to the intrinsics discussed in this manual. Each is described using the same format as that used in the MPE/iX Intrinsics Reference Manual; that is, each intrinsic description does the following: • Gives the intrinsic name. • Describes the syntax of a call to the intrinsic. • Summarizes the use of the intrinsic. • Defines intrinsic parameters.
Intrinsics Reference (cont) FERRMSG FERRMSG Returns a message corresponding to an FCHECK error number. Syntax I16 CA I16 FERRMSG(fserrorcode,msgbuffer,msglength); Use You can use FERRMSG in your program to obtain the error message associated with a specific error number returned in a call to FCHECK. The FCHECK error number is used as the value of fserrorcode in the call to FERRMSG.
Intrinsics Reference (cont) FERRMSG Returns the length of the error message contained in msgbuffer. The length is returned as a positive byte count. Condition Codes CCE Request granted. CCG Request denied. No error message exists for the fserrorcode. CCL Request denied. The msgbuffer address was out of bounds, msgbuffer was not large enough, or msglength was out of bounds Additional Discussion See the discussion of returning error messages to your program in Accessing Files Programmer’s Guide.
Intrinsics Reference (cont) FFILEINFO FFILEINFO Provides information about the characteristics of a file. Syntax I16V I16V * FFILEINFO(filenum[,itemnum,item [,itemnum,item [,itemnum,item [,itemnum,item [,itemnum,item]]]]]); Use The FFILEINFO intrinsic returns information about a file located on any device. The file must be opened by the calling process at the time of the FFILEINFO call.
Intrinsics Reference (cont) FFILEINFO Table 9-1 Item No. Selected Item Values Returned by FFILEINFO Info. Returned In Item Type 1 Actual file designator of the file, in the format: filename.groupname.accountname Character array, at least 28 bytes in length. Unused bytes are filled with right justified blanks and a nameless file returns an empty string. The fully qualified name of the file referenced by filenum is returned as the value of this itemnum.
Intrinsics Reference (cont) FFILEINFO Condition Codes CCE Request granted. CCG Not returned by this intrinsic. CCL Access or calling sequence error. Additional Discussion See also Getting System Information and the MPE/iX Intrinsics Reference Manual. See the discussion of FOPEN in this manual for a description of aoption and foption values.
Intrinsics Reference (cont) FGETINFO FGETINFO Returns access and status information about a file. Syntax I6V CA U16 U16 FGETINFO(filenum,formaldesignator,foptions,aoptions, I16 I16 U16 U16 ,devtype,ldevnum,hdaddr, I16 I32 I32 132 I32 filecode,lrecptr,EOF,filelimit,logcount, I32 I16 U16 I16 physcount,blksize,extsize,numextents, I16 CA I32 userlabels,creatorid,labaddr); Use The FGETINFO intrinsic returns access and status information about a file located on any device.
Intrinsics Reference (cont) FGETINFO blanks on the right. A nameless file returns an empty string. Note that all character arrays must start on a halfword boundary. The fully qualified name of the file referenced by filenum is returned as the value of this parameter. Only names which can be expressed using MPE only semantics are returned. If the name of the object referenced by filenum cannot be expressed using MPE name semantics, a CCL condition code is returned.
Intrinsics Reference (cont) FGETINFO =110 The actual file designator is $NULL. Bits (8:2)—Record format foption. These bits are not meaningful for asynchronous devices since all records are of undefined length. However, if redirection was anticipated, “fixed-length” may have been specified. =00 Fixed-length records. =01 Variable-length records. =10 Undefined-length records. =11 Spoolfile. Bit (7:1)—Carriage control foption. =0 No carriage control character expected.
Intrinsics Reference (cont) FGETINFO aoptions 16-bit unsigned integer by reference (optional) Returns information about the aoption characteristics that are set through the FOPEN or HPFOPEN call. The bit settings that designate each of these characteristics are listed below. Note that not all of the aoptions are meaningful for files on asynchronous devices. Bits (12:4)—Access type aoption. The type of access allowed users of the file.
Intrinsics Reference (cont) FGETINFO =11 Shared access. Bit (7:1)—Inhibit buffering aoption Not meaningful for asynchronous devices. Bit (5:2)—Multiaccess mode aoption Not meaningful for asynchronous devices. Bit (4:1)—NOWAIT I/O aoption Indicates whether or not NOWAIT I/O has been specified for the file. NOWAIT I/O allows the accessor to initiate an I/O request and to have control returned before the completion of the request. =0 NOWAIT I/O not in effect. =1 NOWAIT I/O in effect.
Intrinsics Reference (cont) FGETINFO Returns the logical record size associated with the file. This parameter is subject to record size limits imposed by MPE/V based systems, and is maintained only for backward compatibility. If the record size of the specified file exceeds MPE/V limits, a zero is returned. devtype 16-bit signed integer by reference (optional) Returns the type and subtype of the device being used, where bits (0:8) indicate device subtype, and bits (8:8) indicate device type.
Intrinsics Reference (cont) FGETINFO logcount 32-bit signed integer by reference (optional) Returns the total number of logical records passed to and from the program during the current access of the file. physcount 32-bit signed integer by reference (optional) Returns the total number of physical input/output operations performed within this process against the file since the last FOPEN or HPFOPEN call. blksize 16-bit signed integer by reference (optional) Not meaningful for asynchronous devices.
Intrinsics Reference (cont) FOPEN FOPEN Opens a file, defines its physical characteristics, and sets up access to the file. Syntax I16 CA U16V U16V filenum:=FOPEN(formaldesignator,foptions,aoptions, I16V CA CA 16V recsize,device,formmsg,userlabels, I16V I16V I32V blockfactor,numbuffers,filesize, I16V I16V I16V numextents,initialloc,filecode); Use The FOPEN intrinsic sets up access to a file and defines its characteristics and the manner in which it may be accessed.
Intrinsics Reference (cont) FOPEN a slash (/), a colon (:), or a period (.). If the string is the name of a system defined file it will begin with a dollar sign ($). If the string is the name of a user predefined file, it can begin with an asterisk (*). You can specify the remote location of a device as filename:envid. If you use one of the system defined files, the file can be used for either input, ($STDIN, $STDINX) or output, ($STDLIST), but not for both.
Intrinsics Reference (cont) FOPEN Bit (10:3)—Default file designator foptions. You should select $STDIN (100), $STDINX (101) or $STDLIST (001) for terminals, $STDLIST (001)for printers. =000 The actual and formal file designators are the same. =001 The actual file designator is $STDLIST. =010 The actual file designator is $NEWPASS. =011 The actual file designator is $OLDPASS. =100 The actual file designator is $STDIN. =101 The actual file designator is $STDINX.
Intrinsics Reference (cont) FOPEN the control character to be embedded as the first byte of the record. Thus, the first byte of each record in such a spooled file contains control information. Carriage control characters sent to other types of files are sent to the driver and acted upon directly. If CCTL is not specified, only single spacing will be available to this file. Bit (6:1)—MPE/iX tape label foption. Meaningless for asynchronous devices, but may be set if file redirection is anticipated.
Intrinsics Reference (cont) FOPEN If aoptions are not specified, the value of all bits is assumed to be 0. Bits (12:4)—Access type aoptions. =0000 Read access only. =0001 Write access only. =0010 Write access only, but previous data in file not deleted. =0011 Append access only. =0100 Input/output access. =0101 Update access. =0110 Execute access. The type of access allowed users of the file. Table 9-2 summarizes how these settings apply to terminals and printers.
Intrinsics Reference (cont) FOPEN =10 Semi-exclusive access. =11 Shared access. Bit (7:1) —Inhibit buffering aoption. Not meaningful for asynchronous devices. Buffering is inhibited by default. (Inhibited buffering means that your process is assigned no system buffers.) Terminals always are treated with buffering inhibited. Bit (5:2)—Multiaccess mode aoption. Not meaningful for asynchronous devices. Bit (4:1)—NOWAIT I/O aoption. Determines whether or not NOWAIT I/O is specified for the file.
Intrinsics Reference (cont) FOPEN configured for the port. The default value of recsize is the configured record size (normally 40 halfwords for terminals, 66 halfwords for printers). device character array (optional) A byte array in which you can specify a particular device class or logical device number. On a terminal, you must use this parameter if you intend to read and write through a single file.
Intrinsics Reference (cont) FOPEN Bits (11:5)—Number of buffers. Not meaningful for asynchronous devices. Data transfers to and from terminals and printers are always unbuffered. Bits (4:7)—Number of copies. For spooled output devices only, specifies the number of copies of the entire file to be produced by the spooling facility. You can specify number of copies for a file already opened (for example, $STDLIST), in which case the highest value supplied before the last FCLOSE takes effect.
Intrinsics Reference (cont) FOPEN CCG Not returned by this intrinsic. CCL Request denied. This can occur because another process already has EXCLUSIVE or SEMI-EXCLUSIVE access for this file, the privilege level of this file is not “user” (3), or an initial allocation of disk space cannot be made due to lack of disk space. If the file is not opened successfully, the file number value returned by FOPEN is 0. Call the FCHECK intrinsic for more details.
Intrinsics Reference (cont) FREAD FREAD Transfers a record of data from an input device to the user’s data area. Syntax I16 16V UDS I16V transfercount:=FREAD(filenum,buffer,length); Use Use the FREAD intrinsic to read a logical record from a file to the user’s data area. For asynchronous devices, this implies the transfer of data (one record at a time) from an input device, usually a terminal, to the data area.
Intrinsics Reference (cont) FREAD Returns the record that was read. This structure should be large enough to hold all of the information to be transferred. length 16-bit signed integer by value (required) The number of halfwords or bytes to be transferred. If this value is positive, it signifies the length in halfwords; if negative, in bytes. A zero indicates that no transfer is to take place.
Intrinsics Reference (cont) FSETMODE FSETMODE Suppresses the output of linefeed. I16V U16V FSETMODE(filenum,modeflags); Use For asynchronous devices, the only significant use of the FSETMODE intrinsic is to determine whether or not a linefeed is sent to the terminal at the end of each input line. For certain applications, you may need to suppress the linefeed that is sent automatically during normal operating conditions.
Intrinsics Reference (cont) FSETMODE of READ or READX), the driver sends out a carriage return and a linefeed. (modeflags = 0). Condition Codes CCE Request granted. CCG Not returned by this intrinsic. CCL Request denied. An error occurred. Additional Discussion See also discussions of FCONTROL(12,13) and FCONTROL(41) in this manual.
Intrinsics Reference (cont) FWRITE FWRITE Transfers a record of data to a file on any device. Syntax I16V UDS I16V U16V FWRITE(filenum,buffer,length,controlcode); Use The FWRITE intrinsic transfers a logical record of data to a file on any device. When programming for asynchronous devices this means writing data to a terminal or printer. Completion status is indicated by condition codes, which your program should always check.
Intrinsics Reference (cont) FWRITE parameter is effective only for files opened with carriage control (CCTL) specified in the FOPEN or HPFOPEN call. The controlcode parameter may contain 0, 1, or one of the octal codes from Table 9-3. These options are used to indicate carriage control action as follows: 0 Print the full record transferred, using single spacing. This results in a maximum of 132 characters per printed line.
Intrinsics Reference (cont) FWRITE The default carriage control is postspacing with automatic page eject. This applies to all Hewlett-Packard supported subsystems, with the exception of FORTRAN77/iX and COBOLII/iX, which have prespacing with automatic page eject. Table 9-3 Selected Carriage Control Directives Octal Code Carriage %2–%52 Single space (with or without automatic page eject). %53 No space, (next printing at column 1). %54 Single space (with or without automatic page eject).
Intrinsics Reference (cont) FWRITE Octal Code NOTE Carriage %312 Skip to one line before top of form. %313 Skip to top of form (same as %300). %314 Skip to next seventh line with automatic page eject. %315 Skip to next sixth line with automatic page eject. %316 Skip to next fifth line with automatic page eject. %317 Skip to next fourth line with automatic page eject. %320 No space, no return (next printing physically follows this).
Intrinsics Reference (cont) HPFOPEN HPFOPEN Opens a file, defines its physical characteristics, and sets up access to the file. Syntax I32 I32 I32V * HPFOPEN(filenum,status[,itemnum,item [,itemnum,item [,itemnum,item . . . [,itemnum,item]...]]]); Use The HPFOPEN intrinsic sets up access to a file and defines its characteristics and the manner in which it may be accessed. HPFOPEN provides a superset of the options provided by the FOPEN intrinsic.
Intrinsics Reference (cont) HPFOPEN • Each optional parameter specified in the file equation string option (Item# = 52) is treated as if it were the equivalent itemnum/item pair when determining precedence. Parameters filenum 32-bit signed integer by reference (required) Returns a file number used to identify the opened file in subsequent intrinsic calls. status 32-bit signed integer by reference (optional) Returns the status of the HPFOPEN call.
Intrinsics Reference (cont) HPFOPEN NOTE All item parameters of type character array (CA), except for the fill character option (Item# = 45), must be delimited by a single character which appears only as the first and last element of the specified character array. For example: %filename% (% is the delimiter, filename is the designator) fabcxyzf (f is the delimiter, abcxyz is the designator) Item Number, Item Summary The following discussion lists the optional itemnum/item pairs.
Intrinsics Reference (cont) HPFOPEN Passes a value indicating the file domain. HPFOPEN assumes that all devicefiles are PERMANENT files. However, to maintain compatibility with MPE V/E, devicefiles can be opened with the domain option set to NEW, but a warning message is returned in the status parameter. Item# = 5 0 The file is a NEW TEMPORARY file. 1 The file is a PERMANENT file. 2 The file is a TEMPORARY file. 3 The file is an OLD PERMANENT or TEMPORARY file.
Intrinsics Reference (cont) HPFOPEN Item# = 7 Carriage Control Option (I32) Passes a value indicating whether or not you will supply a carriage control directive in the calling sequence of each FWRITE call that writes records to the file. 0 No carriage control directive is expected (NOCCTL). 1 Carriage control directives are expected (CCTL).
Intrinsics Reference (cont) HPFOPEN Item# = 11 4 Circular file (CIR). 6 Message file (MSG). access type option (I32) Passes a value that specifies access restrictions for the file. See Table 9-2 for a summary of how the access type settings apply to terminals and printers. Item# = 12 0 Read access only. 1 Write access only. 2 Write access only, but previous data in file not deleted 3 Append access only. 4 Input/output access. 5 Update access. 6 Execute access. 7 Execute-Read access.
Intrinsics Reference (cont) HPFOPEN 3 Item# = 14 Shared access. multiaccess option (I32) Not meaningful for asynchronous devices. Item# = 15 multirecord option (I32) Passes a value indicating whether or not a block of data that exceeds the file’s physical record size may be transmitted as several records. This option is only available for terminals. Data written to printers is not broken up on record boundaries. Instead it is written as a single long record.
Intrinsics Reference (cont) HPFOPEN For terminal and printer files, no rounding up occurs if you specify a record size consisting of an odd number of bytes. The record size may be different from that configured for the port. The default value is the configured record size (normally 40 words for terminals, 66 words for printers). Item# = 20 device name option (CA) Passes the logical device number, in ASCII form, of a specific device.
Intrinsics Reference (cont) HPFOPEN Passes the output priority to be attached to the file for spooled output. This priority is used to determine the order in which files are output when several are waiting for the same device. Accepted values are between 1 (lowest priority) and 13 (highest priority) inclusive. If this value is less than the current OUTFENCE set by the System Operator, file output is deferred until the operator raises the output priority of the file or lowers the OUTFENCE.
Intrinsics Reference (cont) HPFOPEN Not meaningful for asynchronous devices. Item# = 32 labeled tape sequence option (CA) Not meaningful for asynchronous devices. Item# = 33 user labels option (I32) Not meaningful for asynchronous devices. Item# = 34 spooler copies option (I32) Passes a non-negative value indicating the number of copies of the entire file to be produced by the spooling facility. This option is applicable to spooled devices only.
Intrinsics Reference (cont) HPFOPEN Not meaningful for asynchronous devices. Item# = 40 block factor option (I32) Not meaningful for asynchronous devices. Item# = 42 device class option (CA) Passes a device class name which is used by the file system to select a nonsharable device from a configured list of available devices within that device class. The name can have a length of up to eight alphanumeric characters, beginning with a letter.
Intrinsics Reference (cont) HPFOPEN Passes a value that indicates whether or not the given device name is to be allocated on a remote machine. You must specify the remote environment in the same open request, using either the formaldesignator option or the remote environment option. Reverse VT behaves nearly the same as a terminal opened through remote file access, except that no session is required on the remote machine. 0 No reverse VT. 1 Reverse VT. Item# = 49 Reserved for MPE/iX.
Intrinsics Reference (cont) HPFOPEN Item# = 58 Reserved for MPE/iX. Item# = 59 Reserved for MPE/iX. Item# = 60 Reserved for MPE/iX. Item# = 61 Reserved for MPE/iX. Condition Codes The HPFOPEN intrinsic does not return meaningful condition code values. Status information is returned in the optional status parameter described above. Additional Discussion See the discussions of creating files and opening files in Accessing Files.
Intrinsics Reference (cont) IODONTWAIT IODONTWAIT Initiates completion operations for an I/O request. Allows program processing to continue before an I/O operation completes. Syntax I16 I16V UDS 16 U16 fnum:=IODONTWAIT(filenum,buffer,length,cstation); Use The IODONTWAIT intrinsic initiates completion operations for an I/O request and returns control to the calling process even if no I/O has completed.
Intrinsics Reference (cont) IODONTWAIT Passes an input buffer. Since terminals always operate without system buffering it is not necessary for this parameter to follow a read. length 16-bit signed integer by reference (optional) Returns the length of the received or transmitted record. If the original request specified a byte count, the integer represents bytes. If the original request specified halfwords, the integer represents halfwords.
Intrinsics Reference (cont) IOWAIT IOWAIT Initiates completion operations for an I/O request. Delays program processing until an I/O operation completes. Syntax I16 I16V UDS I16 U16 fnum:=IOWAIT(filenum,buffer,length,cstation); Use The IOWAIT intrinsic initiates completion operations for an I/O request and suspends the calling process until some I/O completes.
Intrinsics Reference (cont) IOWAIT Passes an input buffer. Since terminals always operate without system buffering, it is not necessary for this parameter to follow a read. length 16-bit signed integer by reference (optional) Returns the length of the received or transmitted record. If the original request specified a byte count, the integer represents bytes. If the original request specified halfwords, the integer represents halfwords.
Intrinsics Reference (cont) PRINT PRINT Prints a character string on job/session list device. Syntax CA I16V I16V PRINT(message,length,controlcode); Use The PRINT intrinsic enables you to write a string of ASCII characters from your program to the job/session listing device ($STDLIST). This provides a quick method of sending output to the terminal.
Intrinsics Reference (cont) PRINT Additional Discussion See the discussion of printing character strings to $STDLIST in Accessing Files Programmer’s Guide.
Intrinsics Reference (cont) PRINTFILEINFO PRINTFILEINFO Prints a file information display on a job/session list device. Syntax I16V PRINTFILEINFO(filenum); Use The PRINTFILEINFO intrinsic causes MPE/iX to print a file information display on the standard list device. You can use this intrinsic to display error information after a condition code of CCG or CCL is returned.
Intrinsics Reference (cont) READ READ Transfers a record of data from the file $STDIN to the data area. Syntax I16 CA I16V transfercount:=READ(message,expectedlength); Use The READ intrinsic reads an ASCII string from $STDIN into an array. This is similar to calling the FREAD intrinsic against the file $STDIN. READ is intended as a quick method of obtaining input from the terminal for temporary programming.
Intrinsics Reference (cont) READ The maximum length of the message array. If expectedlength is positive, it specifies the length in halfwords. If expectedlength is negative, it specifies the length in bytes. When the record is read, the first expectedlength characters are input. If the number of bytes input exceeds this value, the read terminates on byte count. Condition Codes CCE Request granted.
Intrinsics Reference (cont) READX READX Transfers a record of data from the file $STDINX to the data area. Syntax I16 CA I16V transfercount:=READX(message,expectedlength); Use The READX intrinsic reads an ASCII string from $STDINX into an array. This is similar to calling the FREAD intrinsic against the file $STDINX. READX is intended as a quick method of obtaining input from the terminal for temporary programming.
Intrinsics Reference (cont) READX The maximum length of the message array. If expectedlength is positive, it specifies the length in halfwords. If expectedlength is negative, it specifies the length in bytes. When the record is read, the first expectedlength characters are input. If the number of bytes input exceeds this value, the read terminates on byte count. Condition Codes CCE Request granted. CCG An :EOD was encountered. CCL Request denied. A physical input/output error occurred.
Intrinsics Reference (cont) RESETCONTROL RESETCONTROL Allows another subsystem break to occur. Syntax RESETCONTROL; Use The RESETCONTROL intrinsic lets the calling process accept another subsystem break signal. ([CTRL]Y is the default subsystem break character.) The process must have previously enabled a [CTRL]Y trap with the XCONTRAP intrinsic. After your [CTRL]Y trap handler has been invoked, you should call RESETCONTROL when you are ready to receive another [CTRL]Y signal.
Intrinsics Reference (cont) XCONTRAP XCONTRAP Arms or disarms the user written subsystem break trap handling procedure. Syntax I32V I32 XCONTRAP(plabel,oldplabel); Use The XCONTRAP intrinsic arms or disarms the user-written subsystem break ([CTRL]Y) trap handling procedure. When a session is initiated, the user written [CTRL]Y trap handler is disarmed.
Intrinsics Reference (cont) XCONTRAP trap handler can be any procedure in the program or in the libraries to which the program is bound. The [CTRL]Y trap handler has no parameters. The following summarizes subsystem break processing and the intrinsics involved: 1. A user written procedure must be provided to define how the program should act upon receiving a subsystem break. 2.
Intrinsics Reference (cont) XCONTRAP If a program executes in both compatibility mode and native mode, it is preferable to have an NM trap handler. However, it is possible to pass a CM plabel for your CM [CTRL]Y trap handler as follows: Obtain the 16-bit external CM plabel of your CM [CTRL]Y trap handler. Pass this 16-bit plabel in the following 32-bit format: Bits oldplabel Setting (0:16) 16-bit external CM plabel (16:13) Reserved. Set to 0. (29:1) Set to 1. (30:1) Set to 0. (31:1) Set to 1.
A Comparing MPE/iX Systems to MPE V Systems When upgrading from an HP 3000 computer using the MPE V operating system to an HP 3000 computer using the MPE/iX operating system, a variety of migration issues must be addressed. Differences between early and later versions of MPE/iX must also be considered. This Appendix discusses migration from the ATP or ADCC subsystem on an MPE V computer to the Datacommunications and Terminal Subsystem (DTS) on an MPE/iX computer.
Comparing MPE/iX Systems to MPE V Systems Physical Appearance Physical Appearance The most apparent change when migrating from MPE V to MPE/iX is the hardware configuration. The ATP/ADCC interface cards are placed directly in the SPU of MPE V computers. Therefore, the RS-232/422 cabling for asynchronous devices connects directly into the system cabinet. In comparison, MPE/iX computers use DTCs (Datacommunications and Terminal Controllers) connected as nodes on a LAN.
Comparing MPE/iX Systems to MPE V Systems Configuration Configuration Three areas of configuration have changed from MPE V to MPE/iX: • General system configuration. • Terminal and serial printer subsystem configuration. • Terminal configuration settings. These changes are discussed below. General System Configuration With MPE V computers, the INITIAL/SYSDUMP utility is used to configure the system. MPE/iX computers require you to use a utility called SYSGEN.
Comparing MPE/iX Systems to MPE V Systems Configuration through the interface provided by the OpenView DTC Manager. For more information on configuration with the OpenView DTC Manager see Using the OpenView DTC Manager. Terminal Configuration Settings With several exceptions, terminal configuration settings for supported terminals on MPE/iX systems are the same as the settings that were used for supported terminals on MPE V systems.
Comparing MPE/iX Systems to MPE V Systems PAD Support PAD Support On MPE V computers, PAD support is provided over the NS X.25 3000/V Link product, which must be purchased and configured on systems to which PAD access is required. On MPE/iX systems, PAD support is provided through the DTC/X.25 Network Access card which is mounted in the DTC.
Comparing MPE/iX Systems to MPE V Systems Terminal Types and Printer Types Terminal Types and Printer Types The following terminal types files are supported on the ATP and ADCC terminal/printer controllers with MPE V T-MIT or later (MPE V version G.01.00 or later): • 6, 9, 10, 12, 13, 15, 16, 18, 19, 20, 21, 22, TTPCL18, TTPCL19, TTPCL22, and TTPCL26. DTS on MPE/iX computers supports three terminal types and four printer types: • Terminal type 10. • Terminal type 18. • Terminal type 24. • Printer type 18.
Comparing MPE/iX Systems to MPE V Systems Terminal Types and Printer Types Table A-2 MPE/iX Printer Types Overview MPE/iX Printer Type Similar MPE V Terminal Type Differences 18 18 Enhanced XON/xoff protocol on MPE/iX 21, 22, 26 21, 22, 26 Enhanced XON/XOFF protocol on MPE/iX. No ENQ/ACK protocol on MPE/iX. Printer initialization string of MPE V’s TTPCL22 is used. Printer status checks are done less frequently on MPE/iX; status requests are not sent after each printed line.
Comparing MPE/iX Systems to MPE V Systems Terminal Types and Printer Types Table A-4 MPE V Terminal Type Terminal Type Migration for Printers Description Use MPE/iX Printer Type Comments 18 Non-HP devices or application printers 18 MPE V’s terminal type 18 and MPE/iX’s printer type 18 are exactly the same except that an enhanced XON/XOFF protocol is used on MPE/iX. TTPCL18 Terminal type 18 with a printer initialization string and an XOFF timer. Used with HP 2687A.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics Software Characteristics The following are differences between the ASC software and the software that controls the ATP/ADCC: • Changed functions. These are functions that have been implemented differently in the ASC software (and/or the DTC) from the way they are implemented for ATP/ADCC. • Programming considerations. These are more functions that have been implemented differently.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics For instance, XOFF ([CTRL]-S on terminals) is ignored in MPE V during reads or when no I/O is pending on the device. (This means that nothing is waiting to be printed on the device and no program is waiting for input from the device.) With MPE/iX, the [CTRL]-S character is not ignored (except during a binary read). Therefore, during a read, if [CTRL]-S is pressed, the read appears to be suspended.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics Another way to alleviate the problem is to lower the terminal’s transmission speed; devices running at 4800 bps or lower will not have this problem. Parity Error With an ATP on MPE V, a read that contains a parity error still completes normally. Then, all read data is discarded. With a DTC, the first parity error ends the read immediately and the read data is discarded.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics Using [Break] During Writes Because of the speed with which MPE/iX systems process writes, more data can be lost if [Break] is entered while a program is writing to a terminal than was the case for terminals connected to MPE V systems. The Command Interpreter and [Break] During a read in the MPE V CI, [Break] is disabled. It is not disabled in the MPE/iX CI.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics recognized as the console attention character on any device other than the system console. (Do not attempt to move the logical console to a terminal connected via a PAD or to a terminal with switching enabled.) Printer Status Request The printer status request, also known as status checking or the HP2631B handshake, is how the controller monitors the condition of serial printers.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics When a device is closed (using the FCLOSE intrinsic) on an MPE V computer, the initial default parity setting is restored. On MPE/iX computers, parity is not restored at FCLOSE. This means that to change parity using the FCONTROL intrinsic, the default parity in the application must be restored before closing the device.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics Table A-7 Unrecognized AEOR Characters (MPE V) ASCII Character Terminal Keys Octal Code Hex Code NUL(Null) [CTRL]-@ %0 $0 BS(Backspace) [CTRL]-H % 10 $8 LF(Linefeed) [CTRL]-J % 12 $A CR(Carriage Return) [CTRL]-M % 15 $D DC1(XON) [CTRL]-Q % 21 $11 DC2 [CTRL]-R % 22 $12 DC3(XOFF) [CTRL]-S % 23 $13 CAN(Cancel) [CTRL]-X % 30 $18 EM(End-of-Medium) [CTRL]-Y % 31 $19 ESC(Escape) [CTRL]-] % 33 $1B % 177
Comparing MPE/iX Systems to MPE V Systems Software Characteristics The FDEVICECONTROL Intrinsic MPE V computers, a limited number of device control functions can be modified through the FDEVICECONTROL intrinsic. On MPE/iX computers, FDEVICECONTROL has expanded device control functionality. Additionally, on MPE/iX computers, the FDEVICECONTROL intrinsic is supported for devices connected through a private or public PAD.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics the FDEVICECONTROL intrinsic, you can choose to either remove the character from input and back the cursor up one space, or to remove the character from input and erase it (backspace, space, backspace). Special Response to a Linefeed Character The MPE V ATP/ADCC software will react to a linefeed (LF) character by echoing a carriage return and linefeed, then stripping the linefeed from input data.
Comparing MPE/iX Systems to MPE V Systems Software Characteristics 302 Appendix A
Glossary A ASCII A special interface card in the system cabinet through which the MPE/iX system console is connected. ADCP Avesta Device Control Protocol. An HP proprietary protocol which provides device control features. ADCP is optimized for communications between a DTC and MPE/iX systems. address A numerical identifier defined and used by a particular protocol and associated software to distinguish one node from another. address key See X.25 address key.
Glossary LAN using AFCP, allowing connections from terminals on ARPA systems to HP 3000s. ASCII American National Standard Code for Information Interchange. A character set using 7-bit code used for information interchange among data processing and data communications systems. The American implementation of International Alphabet No. 5. B backbone LAN A thick LAN cable conforming to the IEEE 802.3 Type 10 BASE 5 Standard.
Glossary block mode A terminal processing mode in which groups, or “blocks,” of data are transmitted all at once. BNC T-Connector A connector used to connect a computer or a component such as a DTC to the LAN in a ThinLAN configuration. boundary See network boundary. bps Bits per second. The number of bits passing a point per second. bridge A device that is used to connect LAN segments. called address When a node sends out a call request packet, the packet contains the address of the destination node.
Glossary all digital, circuit switching network is often referred to as an X.21 network. closed user group An X.25 user facility that allows communication to and from a pre-specified group of users and no one else. compatibility mode A processing mode on HP 3000 Series 900 computers that allows applications written for MPE V/E based systems to be ported and run without changes or recompilation.
Glossary character (normally [CTRL]-Y) is entered during execution of a program with subsystem break enabled. cross-validate The process of assuring that information contained in two locations is consistent where it is imperative that it be consistent. For example, an automatic cross validation occurs when you enter SYSGEN to assure that information contained in NMCONFIG.PUB.SYS agrees with system configuration data.
Glossary DDP Direct Distribution Panel; a distribution panel that serves as the electrical and physical interface between a DTC 72MX mux board (asynchronous processor board) and up to eight asynchronous devices for direct connections. See MDP for modem connections.; dedicated printer A printer that can be used only by one host on the LAN—the one specified in the Destination Node Name in that printer’s configuration screen.
Glossary direct dial A dial link through which only one remote node can be reached. direct-path branching The process of directly accessing any screen in NMMGR by entering a path name in the Command: field. The path name must be preceded by an at sign (@). download The process of loading operating code and configuration files into the DTC’s memory. The DTC is downloaded by the MPE/iX host for LANs using host-based network management, and by the PC for DTCs managed by the OpenView DTC Manager.
Glossary links, or DTC Telnet Access. Each slot allows up to 8 direct connections or 6 modem connections. A DTC 48 may have up to 3 slots used for X.25 links, each supporting up to 256 virtual circuits at speeds of up to 64 Kbps or one Telnet Access Card with 40 Telnet connections to HP 3000 Series 900 connections. DTC 72MX HP J2070A product. A DTC that provides 3 slots allowing up to 72 asynchronous connections. Each slot accommodates up to 24 direct or modem connections.
Glossary X.25 iX System Access software resides on an HP 3000 host and is configured through use of NMMGR. The DTC/X.25 Network Access software resides on the Datacommunications and Terminal Controller and is configured at the OpenView Windows Workstation for PC-based management and through NMMGR for host-based management. DTE Data Terminal Equipment. Equipment that converts user information into data-transmission signals or reconverts received data signals into user information.
Glossary extended packet sequence numbering One of the optional Network Subscribed Facilities that provides packet sequence numbering using modulo 128. If not subscribed, modulo 8 is used. file number A unique number associated with a file when the file is opened. The file number is returned in the FOPEN or HPFOPEN call used to open the file. It can be used to access that file until the file is closed.
Glossary Master Installation Tape that form the basic core of the MPE/iX operating system. full gateway A full gateway is a node that belongs to more than one network and has one IP address for each network. It uses store and forward to transfer packets between each network that it belongs to. G gateway A node that connects two dissimilar network architectures. A gateway can be either a single node (full gateway) or two gateway halves.
Glossary host computer The primary or controlling computer on a network. The computer on which the network control software resides. For HP purposes, it can also be used to distinguish the MPE/iX system (host) from the DTC. I HP block mode A block mode transmission method employed by HP computers where the system controls the block mode handshake. When HP block mode is used, the user program need not concern itself with data transfer protocol. IEEE 802.
Glossary interactive communications IP See Internet Protocol Processing that allows users to enter commands and data at the terminal and receive an immediate response. Interactive processing occurs in session mode on MPE/iX systems. IP address Internet Protocol address. An address used by the Internet Protocol to perform internet routing. A complete IP address consists of a network portion and a node portion.
Glossary LANIC physical path The physical location (slot number) of the LANIC within the SPU. LANIC Self-Test A ROM-based program on a LANIC card that tests and reports the status of the LANIC hardware. LAP Link Access Protocol. The data link protocol specified by older versions (prior to 1980) of X.25 at Level 2 but still permitted and therefore usable. All new implementations of X.25 must use LAP-B, and all old implementations must migrate to LAP-B at a future date. LAP-B Link Access Protocol-Balanced.
Glossary events are to be logged. Class 1 (catastrophic event) is always logged. logical device number (ldev) A value by which MPE/iX recognizes a specific device. All DTC devices that are configured as nailed devices through the NMMGR configuration have ldev numbers permanently assigned. The DTC devices can then be accessed programmatically through use of their ldev number.
Glossary interface between a DTC 72MX mux board (asynchronous processor board) and up to eight asynchronous devices for direct or modem connections. Also called ADP. MIT Master Installation Tape. A magnetic tape containing the Fundamental Operating System for an HP 3000 Series 900 computer. modem modulator/demodulator. A device that modulates and demodulates signals. Primarily used for modulating digital signals onto carriers for transmission and for performing the inverse function at the receiving end.
Glossary network boundary The logical division between networks in an internetwork. network directory A file containing information required for one node to communicate with other nodes in 1) an internetwork, 2) an X.25 network, or 3) a network that contains non-HP nodes. The active network directory on a node must be named NSDIR.NET.SYS. network interface NI. The collective software that enables data communication between a system and a network.
Glossary NMMAINT A utility that lists the software module version numbers for all HP AdvanceNet products, including NS3000/iX. It detects missing or invalid software modules. NMMGR Node Management Services Configuration Manager. A software subsystem that enables you to configure DTC connectivity and network access parameters for an HP 3000 Series 900 computer. NMMGRVER A conversion program called NMMGRVER.PUB.SYS.
Glossary minicomputers. NS3000/iX consists of a link and network services. NS3000/iX Link Software and hardware that provides the connection between nodes on a network. Some of the NS3000/iX links available are the ThinLAN 3000/iX Link and its ThickLAN option, the DTC/X.25 iX Network Link, the NS Point-to-Point 3000/iX Link, and the StarLAN 10 3000/iX link.
Glossary OSI model Open Systems Interconnection model. A model of network architecture devised by the International Standards Organization (ISO). The OSI model defines seven layers of a network architecture with each layer performing specified functions. P packet A block of data whose maximum length is fixed. The unit of information exchanged by X.25 at Level 3. The types of packets are DATA packets and various control packets. A packet type is identified by the encoding of its header.
Glossary point-to-point A link that connects either two nodes in a NS Point-to-Point 3000/iX network or two gateway halves. port An outlet through which a device can be connected to a computer, consisting of a physical connection point and controlling hardware, controlling software, and configurable port characteristics. Ports can be thought of as data paths through which a device communicates with the computer.
Glossary programmatic device A device operating under control of a program running on a computer. Programmatic devices can be used for input, output, or both, depending on the device and how it is opened by the controlling program. protocol A set of rules that enables two or more data processing entities to exchange information. In networks, protocols are the rules that govern each layer of network architecture. They define which functions are to be performed and how messages are to be exchanged.
Glossary attempting to retransmit a frame. When choosing this value, factors like the line speed and maximum frame size should be taken into account. in a 5-pin version which can be used for direct device connection up to a distance of 1500 meters (4000 feet). S RFA Remote File Access. A network service that allows users to access file and devices on remote nodes. routing The path that packets or fragments of a message take through a network to reach a destination node. RMP Remote Maintenance Protocol.
Glossary shared-line access The feature that allows two or more HP 3000 Series 900 hosts to use the same DTC/X.25 Network Access card on a DTC to access an X.25 network. SIC Serial Interface Card. A card installed in the front of the DTC that acts as an interface between a corresponding Connector Card (CC) and the DTC’s processor. slaved device A device that shares the same DTC port as another device and is connected, to the other device, referred to as its master, by a cable.
Glossary synchronous A mode of operation or transmission in which a continuous data stream is generated without intervals between characters. The data stream is synchronized by clock signals at the receiver and transmitter. As a result, fast transmission speeds (above 9600 bps) are attainable. SYSGEN The software program that allows you to configure the operating system on HP 3000 Series 900 computers.
Glossary class assignment, and other values relevant to terminals connected through a DTC. Retransmission Timer (T1) so that no doubt exists about the link’s state. terminal type A collection of characteristics that cause a terminal connected to an MPE/iX system to act and react in a specified manner. You can configure a terminal to use one of the system-supplied terminal types, or you can create custom terminal types using the Workstation Configurator.
Glossary TTUTIL Also known as the Workstation Configurator. A program, TTUTIL.PUB.SYS, on the HP 3000 that is used to create and modify terminal and printer type files. VAN Value Added Network. A data communication network that uses and pays for facilities belonging to another carrier. The value-added package is then sold to a user. Tymnet A proprietary public data network in the USA. VC See virtual circuit.
Glossary X X.3 The protocol that defines which user facilities should be internationally available from a packet assembler/disassembler (PAD) when this is offered by a public data network. X.21 The protocol that defines the physical interface between a DTE and a DCE of a public data network where the access to the network is made over synchronous digital lines. X.25 The protocol that defines the interface between a DTE and a DCE for packet mode operation on a Public Data Network (PDN). X.25 address The X.
Index Symbols (AUI), 30 (DTS), 33 (LANIC), 29 (MAU), 30 A abort error, 52 access method transmission, 37 access port, 23, 46 Additional End-of-Record character, 64, 77, 215 additional end-of-record character, 181 AEOR character, 215 AEOR character, 64, 77, 181 alert character block mode, 214 allocate a terminal, 193 assignment statement, 54 Asynchronous Serial Communications (ASC), 22 Attachment Unit Interface (AUI), 30 B backspace character, 100 define, 214 backspace processing, 100 backspace response, 10
Index FCONTROL(10), 169 FCONTROL(11), 80, 169 FCONTROL(12), 171 FCONTROL(13), 85, 171 FCONTROL(14), 173 FCONTROL(15), 173 FCONTROL(16), 175 FCONTROL(17), 175 FCONTROL(22), 68, 178 FCONTROL(23), 179 FCONTROL(24), 80, 179, 192 FCONTROL(25), 64, 77, 181 FCONTROL(26), 63, 85, 184 FCONTROL(27), 63, 85, 184 FCONTROL(28), 187 FCONTROL(29), 61, 187 FCONTROL(34), 189 FCONTROL(35), 189 FCONTROL(36), 80, 179, 191 FCONTROL(37), 193 FCONTROL(38), 195 FCONTROL(39), 197 FCONTROL(4), 64, 70, 167 FCONTROL(40), 80, 198 FCON
Index nailed, 134 private, 132 public, 132 PAD connection, 27 PAD device, 132 page block mode, 60 parallel transmission, 22 parameters optional, 154 required, 154 parity, 65, 179 enabling, 80 setting, 80 parity checking, 211 parity enabling, 211 parity generation, 211 parity type, 191, 211 set, 211 PDN, 132 port, 57 postspace movement, 165 prespace movement, 165 PRINT, 73, 76, 274 printer type, 23 PRINTFILEINFO, 276 private PAD, 132 privileged mode, 271, 273 program captive, 45 programmatic device, 45 prot
Index XON/XOFF flow control, 24, 104, 121, 185, 213 XON/XOFF protocol, 37 334 Index