To provide the fast, high integrity communication required by most mainframe computers, HUNTER has a synchronous data communication capability.
Communication takes place using synchronous transmission of data blocks. These blocks are checked using check characters and acknowledged as appropriate using particular protocols.
Currently available as a factory option is the IBM 27801 communication protocol providing the bisynchronous communications. Other protocols are in development.
The IBM 2780 is a very popular data transmission terminal used for remote job entry. The transmission protocol developed for this device has been widely implemented on other mainframes to the extent of becoming a de facto industry standard. HUNTER's implementation mimics 2780 protocol to provide well proven, fast and extremely reliable data transfers.
IBM 2780 is used for batch entry by use of "job cards". HUNTER is easily programmed to simulate the use of job cards providing all the processing facilities normally available on a remote terminal.
HUNTER is the most advanced portable to offer a comprehensive implementation of IBM 2730 in true synchronous mode.
This well proven and sophisticated protocol gives HUNTER reliable, high speed communications over relatively poor data links such as the public switched telephone network at speeds as high as 2400 baud.
Use of this standard provides access to a wide range of mainframe computer systems, directly and without need for supporting equipment. Data files can be exchanged between HUNTER and mainframe with great flexibility, convenience and dependability.
The internal self-synchronising feature enables HUNTER to HUNTER communications over standard 300 baud asynchronous modems.
Synchronous communication transfers data as a continuous stream of data characters, without the need for start and stop bits as used in asynchronous communication. This maximises the data transfer rate for a given channel bandwidth. For the receiver to be able to use the data two levels of synchronisation need to take place:
This allows the receiver to save the state of each bit correctly, preferably sampled at the centre of each bit.
Each block of eight bits which represent a character needs to be identified from within the data stream.
Two techniques are used by HUNTER to achieve bit synchronisation.
External Clocking allows both transmit and receive to be synchronised using two independent clocking signals. These signals are generated by either a modem or modem eliminator. The selection 'CLK' on the speed selection of transmit or receive menus selects this mode.
Two pins are provided for the clock signals, Pin 15 provides the transmit clock and pin 17 the receive clock.
On transmit, a rising edge (-12V to +12V) causes a bit to change on the transmit output (pin 2). On receive, a falling edge (+12V to -12V) causes the state of the receive input (pin 3) to be sampled.
It is important that maximum clock speed on HUNTER should not exceed 9600 Hz (giving a data rate of 9600 baud). The minimum speed is approximately 100Hz. Exceeding this clock rate may cause unpredictable results.
Alternatively, HUNTER can self clock. This is achieved by selecting from the menu the desired transmit and receive baud rates in the range 50-4800 baud, as for asynchronous. On transmit, the data is sent out by using internal timing, with no reference to any external clock source.
To receive incoming data HUNTER times from rising edges (-12V to +12V) on the receive data line to give internal clocking.
Self clocking is useful for HUNTER - HUNTER communications. It may be used over asynchronous modems to provide both increased throughput and data integrity.
To be able to extract eight bit data characters, HUNTER has to synchronise itself to the incoming characters correctly. This is done by detecting special synchronising characters called SYN characters (32H). HUNTER considers synchronisation to have been achieved after receiving two contiguous SYN characters.
After receiving the two synchronising characters each group of eight received bits are then considered to be a character.
Synchronisation is considered to have been lost if a line turnaround character is received (CFFH). This is equivalent to an open line.
Prior to sending the synchronising characters, HUNTER transmits an 0AAH pad character which is to assist in bit synchronisation.
Every data block whether it consists of one or 500 characters, must start with a pad character, and two SYN characters and terminate with line turnaround.
The information carrier for 2780 is the binary synchronous communications (BSC) procedure. The character set used is EBCDIC (Extended Binary Coded Decimal Interchange Code). The following is a description of the subset of BSC used for HUNTER 2780 eoulation.
HUNTER generally operates using the USACII (United States of America Standard Code for Information Interchange). Characters either transmitted or received by Basic will be in ASCII, so CHR$, LOPCHR, etc., instructions all generate ASCII characters. To use EBCDIC the 2780 driver software utilises an ASCII to EBCDIC and EBCDIC to ASCII code converter. The conversions used are listed in section ASCII To EBCDIC Conversion. The code used on the transmission channel is transparent to Basic programs, and need not concern the programmer.
BSC defines general structural procedures for the blocking of information. Several control characters are used for the control of message blocks.
A message consists of one or more blocks of text data. The start of text character (STX) is used immediately preceeding each block of data. Each data block but the last is terminated by an end of transmission block (ETB) character or an intermediate text block (ITB) character. The last data block ends with an end of text (ETX) character.
Each block of data is error checked by the receiver by a cyclic redundancy check (CRC). After each transmission the receiver normally replies with ACK0 or ACK1 - data accepted continue sending; of with NAK - data not accepted (e.g. due to a data transmission error), retransmit the previous block.
HUNTER uses the accepted error checking method of the cyclic EBCDIC 2780. The redundancy check is a division at both the transmitting and receiving stations using the numeric value of the message as a dividend, divided by a constant. The quotient is discarded and the remainder is used as the check character.
This is transmitted imuediately following an ITB, ETB or ETX. The receiver checks this value and finds no error if they are equal.
CRC-15 uses the polynomial (x15+x15+x2+1) as the divisor constant. The 16 bit remainder is sent as two eight bit characters. This is also sometimes referred to as the BCC (Block Check Character).
For either HUNTER or base computer to transmit a message, the line must first be seized. This requires sending an enquiry (ENQ) character. A positive acknowledgement permits the start of a message.
The data link is controlled by the use of the following control characters:
This character is used to establish synchronisation. Two contiguous SYNs are required for synchronisation. They may also be used as pad characters, although never used as such by HUNTER. Syncs will be ignored after synchronisation has been established except as part of CRC.
This character is used as the start of text preceeding all text blocks. It is not part of the CRC accumulation.
The ETB character indicates the end of a block of data characters. A block check character is sent immediately following an ETB. A reply is required after an ETB (ACK0, NAK, etc).
ITB is also called lUS or US (Unit Separator). This enhances the throughput due to not having to go through a line turnaround. The CRC accumulation is reset after an ITB. It is not necessary to send an STX after the ITB.
If the error check fails then a NAK is sent at the end of the transmitted message, i.e. after the ETB or ETX. The whole of the message is retransmitted in the event of a NAK being the reply to a complete message block.
ETX is transmitted after a block of characters started by an STX. The CRC is sent immediately after an ETX. A reply is required to indicate the receiver status.
This character terminates a message transmission containing a number of blocks. It is also used to indicate a system malfunction.
ENQ is used as the line bid to start a transmission sequence. ENQ is also used to obtain a repeat transmission of a response, in the case of a garbled response.
This is one of two positive acknowledgements to error checked message buffers. This informs the transmitting station that the message was received satisfactorily. This acknowledgement is also used to confirm a request for the line. ACK0 alternates with ACK1 positive acknowledge.
Alternating Affirmative Acknowledgement
Alternating ACK0 and ACK1 provides sequential checking of replies, this ensures that the blocks are replied to correctly. ACK0 is used as the response to a line bid.
It should be noted that ACK0 and ACK1 consist of two 8 bit characters.
This is the alternate acknowledge. It is used with ACK1 to respond correctly to incoming messages.
A receiving station that has correctly received a message not yet but is in a condition to use the data, can send a WACK. It is a positive acknowledge. The transmitting station should then respond with an ENQ. WACK is also a two character sequence. WACK's may be sent indefinately at 3 second intervals to stop further transmission.
This character informs the transmitting station that a message was received in error. It causes retransmission of the erroneous message.
Data link escape is used to provide various line control characters, e.g. WACK, ACK0, ACK1 and RVI.
Reverse interrupt is used as a positive acknowledgement (in place of ACK0 or ACK1). However, it requests termination of the current message, due to a high priority message needing to be sent from the receiving station.
HUNTER will never generate and RVI but will respond to one.
This sequence informs the receiver that the transmitter is shutting down.
This character is used as a delimiter in 3780 configurations. Reception of this returns a CR (carriage return).
The following Illustrate various message sequences and error handling.
TX = Transmitting station. RX = Receiving station.
HUNTER will retry for a total of 10 ENQ's. Many mainframe systems never give up.
Number of retries can vary. HUNTER will retry 10 times, but some mainframe systems will retry indefinately.
HUNTER does not count TTD/NAK sequences or generate TTDs.
HUNTER will send 10 ENQs before giving up.
HUNTER sends out 10 ENQs.
Failure to receive further messages could be timed out by the Basic applications program.
The foregoing describes in general operations on the communications line for 2780 protocol. HUNTER has particular features and handling which may be important to users.
To implement this synchronous protocol it is necessary to use buffering on transmit and receive so that error checking and re-transmission can be performed.
To enhance throughput there are two buffers each for transmit and receive, the operation of which is described below.
On transmit while one buffer is being filled from the user program the other is being sent. When the new buffer is full the buffers effectively swap over and the cycle is continued:
The maximum buffer length, including control characters, can that be received is 512 characters. However, some systems are only configured for 256 characters. For this reason HUNTER will only default to transmitting 200 characters for ease of interfacing.
As with the transmit buffer arrangement, one buffer is being filled from the communications line while the other is being emptied by the user program.
HUNTER is able to accommodate 2780 protocol as both fixed and variable block lengths. Also, 3780 is accommodated.
It is possible to configure the bisync emulator to provide very flexible interfacing for a variety of different host machines.
Standard configurations can be made for:
The block sizes and record sizes can be adjusted for compatibility and maximum throughput on the communication channel.
Other features which are available for special purposes are:
Features not implemented are:
All features are discussed in detail later. Although they may all be selected individually, they may not make a compatible protocol. Standard configurations are as follows:
(This is the default configuration)
Space compression is only normally used in 3780 installations.
Virtually all HUNTER data is delimited by CR (carriage return).
Blocks of data loaded by LINPUT statements are terminated by CR, as are lines of printout. The most straightforward method of block creation is to treat data between CRs as cards of data.
On transmit, if a CR is detected in the data, the communication software will treat it as a record end. The action taken depends upon the amount of room left in the current buffer being prepared for transmission.
For further details on end of record action see Configuring The Protocol.
To maintain compatibility with existing transmission programs it is essential they should operate without modification. This leaves a problem of how to send the final message buffer if it has not been filled up. If greater than 5 seconds elapses between characters sent from the Basic applications program, then the end of a complete transmission sequence is assured and the current block terminated by ETX CRC. After this has been acknowledged the EOT (end of transmission) is sent to close down the line.
The computer generating data for transmission to HUNTER will also block data into records.
To provide application programs with "CR" delimiters, any end of record is converted to CR. The end of record will depend upon the configuration in use. The sequences lUS CRC and IRS will always return CR.
This means that HUNTERS will communicate directly when connected back to back.
BSC receiving stations use ESC sequences for special functions like skipping line. These sequences are ESC n where n can be a number of printable characters. To avoid confusion when these are received HUNTER will ignore received ESCs and their associated following character.
HUNTER does not implement any of the transparency features of BSC. It is, therefore, not possible to send any of the following characters:
If any of these characters are sent then they may either be lost or cause disruption to the transmission channel.
For maximum flexibility there are a number of features which may be controlled by the user. These are controlled by a number of flags which are memory locations, listed through this section and also in Memory Locations. All of these locations are preserved after timing set, as with all other communications parameters such as transmission speed.
They may be changed from within a user program using POKE in Basic or direct writing in machine code. Alternatively, the Basic program "SENTSYNC’' will give a menu of options. A listing is included in section 9.5.
This is a single byte which defines the maximum record length. It has a range of 1-255, with a default of 80. When outputing data, this length should not be exceeded as there may be insufficient space left in the block to accommodate the record.
If record padding is used, all records are either padded or truncated to fit this length.
This is a two byte number which defines the maximum length of a block. It has a permitted range of 10-512 with a default of 200. The block length must be greater than the selected record length. This control is useful for adjusting the throughput for good or bad telephone lines when transmitting over modems or acoustic couplers. For a good line, the buffer length could be set to maximum so that line turnarounds are kept to a minimum and the maximum data is sent in one block. If, however, the line is a bad one, then if the buffer length is set to a single record length, the amount of data to be re-transmitted in the event of a NAK or data corruption due to the bad line, is kept to a minimum. On Receive, the block length can be anything up to 512 characters. It should be remembered that the block Includes all control characters and record separators.
This flag controls whether there is single or multiple records in a block. If set to zero (default value) there will be multiple records in each block. If set non-zero, there is only one record transmitted per block.
This single byte flag is used to control record padding. If this byte is set to non-zero, a record is padded with spaces to its maximum length as defined by record length before being transmitted. On receiving a record, trailing spaces are stripped off. If this flag is set to zero, record padding is inhibited and trailing spaces are not stripped on reception. The default state of this flag is zero.
Record padding is only normally used on fixed length 2780 communications.
This flag determines the essential difference between 2780 and 3780. It selects between terminating a record with US (IFH), followed by CRC, or with IRS (lEH) followed by CRC.
2780 mode is the default with the mode flag set to 0. A nonzero flag selects 3780.
Fixed length records are terminated by any of the following:
US,CRC : used for a partly filled buffer
ETB,CRC : used for a full buffer
ETX,CRC : used for the last buffer to be sent
Variable length records are terminated by any of the following:
EM,US,CRC : used for a partly filled buffer
EM,ETB,CRC : used for a full buffer
EM,ETX,CRC : used for the last buffer to be sent
All records are terminated with:
On receive, record terminators (CR) are always returned for:
irrespective of the setting of the mode flag.
This flag is a single byte and controls the use of intermediate STXs. If the flag is set to non-zero, at the start of every intermediate record an STX is inserted. If the flag is zero, then STXs are not inserted except at the start of the first record in a block. Intermediate STXs are ignored on reception. The default of this flag is zero.
This feature is normally only used in 278O installations.
This single byte flag controls how the protocol handles errors. If the flag is set to zero (its default state), then error when an in communication causes the HUNTER to re-try sendine the last block, the HUNTER will re-try 10 times before giving a communications error. If, however, the flag is set to non-zero the HUNTER will re-try indefinately until either it succeeds or the operator switches the HUNTER off.
This single byte flag controls the operation of space compression. If the byte is set non-zero, any string of more than 2 spaces is compressed into an IGS character and a space count code on transmission. The reverse happens on receive (i.e. the codes are expanded to the string of spaces). If the byte is set to zero (its default state) spaces are not compressed on transmission or expanded on receive.
This feature is not normally used in 2780 installations. It can be used to give increased throughput on a line where there are many spaces.
|Name||Location (Hex)||Location (Decimal)||Default Value||Description|
|SRFLG||F856||63574||0||Single record flag|
|SCFLG||F85B||63579||0||Space compression flag|
These flags are preserved during power off and so will remain at their previous setting after subsequent power on.
Buffer Length Record Record Record Length Length Length ----------------------------------------------------------------------------- |P| |S| DATA | | | DATA | | | DATA | | |E|C| | | | |A|SYNS|T| CHARACTERS | | | CHARACTERS | | | CHARACTERS | | |T| R | | | |D| |X| | | | | | | | | |B| |C| | | ----------------------------------------------------------------------------- IRS or EM if selected Record Terminator. An intermidiate STX, Line Depending on the state of the if selected, would be turnaround mode flat, this would be either: inserted here. characters a) an IRS character, or (FFH). b) an IUS character followed (Note: If selected by 2 intermidiate characters. the STX would not be counted as part of the Record).
When calculating the buffer length, space should be included for the characters at the start of the buffer (i.e. PAD, SYNS and STX), the characters at the end (i.e. ETB or ETX, 2 CRC characters and 2 line turnaround characters) and all the required record terminators and intermediate STXs.
Although 2780 work stations are not generally interactive devices, it is possible to use HUNTER in this mode when, for example, testing the system with LOG ON cards, etc.
When in Terminal Emulation any received data is displayed on the screen.
To transmit, a message character may be typed in directly. Provided no mistakes are made, and there is less than 5 seconds between each character, the message is sent on the transmission channel.
There are a number of different line errors which may occur when using this protocol. These are detected and then displayed as communications errors. An error number is also displayed. The meaning of these error numbers is shown in Message Transmission. If use of the ON COMMS statement is made then the error number will be in the COMERR flag.
There is one exception to this rule, see Unanswered Line Bid. This is the most usual error and will generally be due to a connection fault, as no characters have been received. The option is then given to: Retry transmission ?(Y/N) if 'Y' is pressed then HUNTER will send out up to 10 more ENQs (enquiries) and the offer of retry made again. If 'N' is pressed then the error O1 is returned, and if programmed through ON COMMS, returns control back to Basic.
This is due to not receiving any reply in a request for the line, usually caused by incorrect connection of the communications channel.
After establishing the line, a buffer has been sent to which no response has been given, despite 10 ENQs having been sent.
The wrong positive acknowledgement has been given to a buffer, despite confirmation requests.
Repeated transmission of a buffer gets only the NAK response, has tried 10 times.
Having sent out a WACK no acknowledging ENQ has been received for 5 seconds.
This protocol is generally used with modems or modem simulators. The use of RTS (Request to Send) and CTS (Clear to Send) is therefore specified by the modem, particularly if half duplex or two wire operation is desired (as on the public switched telephone network). Both RTS and CTS may be deactivated as usual.
If they are used, then the following takes place:
There are no timeouts on the handshakes.
The transmission channel could be the switched public network, 4 wire private lines etc.
The two modems and the channel could be a modem eliminator for nearby operation.
As can be seen the modems generally create all the clocking in this simple arrangement. HUNTER will not generate any actual clocking of its own, except when self synchronising to the data.
The handshake signals RTS and CTS ensure correct data flow over a half duplex line (allowing the modems to settle etc.) They may not be necessary over 4 wire links.
To operate this protocol back-to-back between two HUNTER'S it is only necessary to use a crossed 3 wire lead (TX,RX and ground). If the handshake lines are connected, then CTS must be deselected on the menu as the handshaking is only configured for modem operation.
HUNTER'S need to be set for self clocking at the designed speed, typically 1200 baud or 300 baud over slow speed async modems.
IBM and 2780 are registered trademarks of IBM Corp. ↩