Appendix A: HASP Multileaving
HASP (Houston Automatic Spooling Program) is a subsystem which essentially runs within OS/360 as a job but takes over the batch processing management functions from the operating system. That is, HASP handles spooling of card input and printer and punch output, queueing and scheduling of job execution, and the operator control interface. It is a tightly-written and efficient system for running a large and varied job load through a large-scale machine. The name results from the historical fact that HASP was originally by a local IBM group for one particular customer, NASA Houston.
HASP has always been an anomaly in the IBM scheme of things. The system was written around 1965 by two programmers; the HASP group has probably averaged three programmers during most of its life. The leader of the group has been "Mr. HASP", Tom Simpson. The HASP system spread rapidly through (more or less) underground channels to many of the medium and large scale 360's. At least once, only intense customer pressure prevented IBM from killing the HASP effort. HASP generated an astonishing emotional mystique among its users. The HASP sessions at SHARE Meetings were reminiscent of revival meetings. For years every SHARE Meeting has included HASP song sessions around the piano during the nightly open bar. HASP forms a fascinating chapter in the history of IBM's large machine business.
The core concepts in HASP are pseudo-devices, and the general technique of intercepting supervisor calls to augment operating system functions without changing the operating system itself. A generation of OS/360 system programmers learned these techniques from HASP. (These important techniques are hardly ever described in the literature, and "practical" programmers don't read the literature anyway).
When HASP starts up (in supervisor state), it overlays an instruction in the I/O Supervisor with a branch to its own code. A user program is written as if it were doing real I/O to card readers and printers. HASP intercepts and interprets these I/O operations to handle job I/O in a manner transparent to OS/360. It similarly intercepts and interprets operator console I/O.
HASP includes batch remote job entry using binary synchronous communication. The HASP communication protocol and message formats use a scheme developed by Simpson's group called "Multileaving Protocol". The HASP rje system, by far the best rje package IBM has produced, finally replaced two competitive IBM packages and has effectively become the IBM standard for rje. CCN's RJS system not only adopted the Multileaving Protocol but essentially copied its binary synchronous communication line handler directly form HASP.
The Multileaving Protocol is described in the HASP manual(1) as the "fully synchronized, pseudo-simultaneous, bidirectional transmission of a variable number of data streams between two or more computers using binary synchronous communications facilities". It allows a remote batch terminal to operate a variable number of card readers and printers simultaneously at different speeds over one communication line. It is not surprising that HASP Multileaving contains in miniature many of the features of IMP-IMP Protocol and a little host-host protocol. Specifically, Multileaving includes the following general features:
(1) "Conversational" transmission line protocol using transparency (DLE STX, etc.).
(2) "Strong" error control and retransmission using a 16-bit CRC and a modulo-16 block sequence number.
(3) Flow control for multiple streams in both directions. This includes the interchanging of matching control records ("RFC's") to open a stream, and a set of flow control bits in each block. Each flow control bit is logically equivalent to an ALLOcate command for one "message" (buffer) for a particular stream.
(4) Optional Special Control Information for remote devices. This includes printer carriage control, switching card reader hoppers, etc.
(5) Multiplexing ("multileaving") multiple streams into a single block for transmission.
(6) Marking end of file and ends of records within each stream.
(7) Compressing transmitted text by encoding repeated blanks and repeated single characters.
Finally, we have reached the (only) aspect of HASP relevant to FTP: its compression scheme. HASP uses the following encoding:
8
+---------+
End of Record: | 0 ... 0 |
+---------+
2 6 8 8
+---+---------+ +-------+ +--------+
Data String: |1 1| N | | d | ... | d |
| | | | 1 | | N |
+---+---------+ +-------+ +--------+
3 5
+---+--------+
N Duplicate Blanks |100| N |
+---+--------+
3 5 8
+---+---------+ +---------+
N Replicated Characters D |101| N | | D |
+---+---------+ +---------+
HASP is concerned only with 8-bit bytes. However, there is a provision (which was never implemented) in the Multileaving Protocol to set the unit of the counts N as 1 byte, 2 bytes, or 4 bytes.
Reference:
(1) HASP II System Manual, IBM Corporation (February 26, 1971)
[ This RFC was put into machine readable form for entry ] [ into the online RFC archives by Via Genie 4/00]