Telecommunications - BSC 3270 related protocols

Host Terminal

Protocol PSS Protocol

Convertor ............... Convertor

Host __________ . . ________

Computer | | . . | | 3270

_______ | | . . | | _________

| | | | . . | | | |

| | | | . . | | | |

|HOST |_| PAD |____. PACKET ._____| PAD |___| CU |

| | | | . SWITCHING . | | | |

|_______| |__________| ................. |_________| |_________|

|

| __

|_| \__

| |_____|

| __

|_| \__

| |_____|

| __

|_| \__

|_____|

<---------------- 3270 data stream ------------------------>

<----DSP -------------------------->

<-- BSC ---><----X.25 -------------------------><-- BSC -->

I have further information on the following,

IBM-BSC.TXT Binary Synchronous Communications

IBM-DSP.TXT Display System Protocol

IBM-DS.TXT 3270 Datastream

IBM-SNA.TXT Systems network Architecture

IBM-GTE.TXT Telenet 3010 PAD

IBM-PAR.TXT Telenet 3010 Parameters

IBM-TRI.TXT Information on the 3270 BSC Trial

IBM-PLAN.TXT Information on BT use of IBM protocols

2 - Data Transmission

If terminals are to sited more than a few feet from a computer then the are usually connected by a serial link, this is because:

  1. parallel connection is more expensive on wire.
  2. different delay times in all the wires would cause synchronization problems

When computers first started to be used the terminals which were connected to them were based on the terminals that existed at the time, ie telex terminals. This basic form of start-stop operation was used although different character codes were used.

3 - Start-Stop - asynchronous operation

This is a simple system able to be used by mechanical terminals:

hammers

|||||||||||||||||||

-+-+-+-+-+-+-+-+-+-+--- ---+-+-+-+-+-+-+-+-+-+--

--++--++--++--++--++-- ---++--++--++--++--++--

----++++----++++----- o--------------------o ----++++----++++------

--------++++++++------ / line \ ---------++++++++------

----------------++++--- ------------------++++--

||||||||||||||||||||

o o o o o o o

o o o o o o o

o o o o o o

Keyboard Printer

This is a mechanical way of providing parallel to serial conversion at the transmitting end and serial to parallel conversion at the receiving end. In other words the characters are coded as a series of binary (two state) signals, each element known as a BInary digiT (BIT) which can represent say 0 or 1, ON or OFF, YES or NO etc. Although modern terminals are electronic the signal on the line is still the same.

4 - Sinal on Line

mark = positive = 1 ---> ____ _______ _______________

| | | |

|___| |_______|

space = negative = 0 ---> ^ ^ ^ ^ ^ ^ ^ ^

| | | | | | | |

start bit bit bit bit bit stop

bit 1 2 3 4 5 bit

The start and stop bits provide synchronization as follows:

when nothing is being transmitted a mark (positive) signal is sent to line, this continues until a character is to be sent. The first bit sent is the start bit this is always a space (negative) signal to ensure that the chter always begins with a positive to negitive transition.

The receiving station must sample the voltages in the middle of each bit to minimise the posibility of errors. As the start of the character is known by the positive to negative transition then bit 1 must be sampled 1.5 bit-periods after this, then at 1 bit intervals for subsequent bits. The stop bit, or bits, are always set to a mark to ensure that the next character will always start with a positive to negative transition.

The receiving station must know what speed the transmitting station is sending at to ensure both ends are synchronized, providing this is done then this method provides a simple way of transmitting a sequence of characters over a serial link.

If the receiver is a long distance from the transmitter then the voltages will be distorted by the line. Telex gets round this problem by using high voltages +80v and -80v but for the higher speeds required by computer terminals we have to use modems (MOdulator and DEModulator) this allows circuits designed for speech to be used.

5 - CHARACTER CODES

The number of bits needed to repesent each character depends on how many characters are needed in the character set, the letters A to Z give 26 characters with another 26 for lower case,10 for numbers plus say about 40 for punctation and special characters this gives a total of 102 which can be represented by 7 bits with room to spare. However since 8 bits, known as a byte or octet is so commonly used, many codes are expanded out to 8 bits.

Baudot (International Alphabet No 2 - IA2), which is used by telex, uses 5 bits which gives 32 combinations, but to extend this 'figure shift' and 'letter shift' are used however the character set is limited and lower case is not used.

ASCII (IA5) uses 7 bits which gives 128 combinations, but a parity (error check bit) is added to give 8 bits.

EBCDIC uses 8 bits which gives 256 combinations although not all of these are used as characters, some are not assigned and some are used for line control.

Other differences between the code is the order that the bits are sent to

line ...


8 - TYPES OF CIRCUIT

______________ ______________

| | | |

| Sender | ------------------------------------> | Receiver |

|______________| |______________|

SIMPLEX

______________ ______________

| | | |

| Sender |_ _| Receiver |

|______________| \ / |______________|

______________ \_________________________________/ ______________

| | / \ | |

| Receiver |_/ HALF DUPLEX \_| Sender |

|______________| |______________|


______________ ______________

| | | |

| Sender | ------------------------------------> | Receiver |

|______________| |______________|

______________ ______________

| | | |

| Receiver | <------------------------------------ | Sender |

|__________| |______________|

FULL DUPLEX


______________

| |

| Sender |_____________________________________________________

|______________| | | | | | |

______________ | | | | | |

| | | | | | | |

| Receiver |____|________|__________|________|__________|________|

|______________| | | | | | |

| | | | | |

__|___ __|___ __|___ __|___ __|___ __|___

| S | | R | | S | | R | | S | | R |

| e | | e | | e | | e | | e | | e |

| n | | s | | n | | s | | n | | s |

| d | | e | | d | | e | | d | | e |

| e | | i | | e | | i | | e | | i |

| r | | v | | r | | v | | r | | v |

| | | e | | | | e | | | | e |

| | | r | | | | r | | | | r |

|______| |______| |______| |______| |______| |______|

MULTIPOINT

9 - USE OF REMOTE COMUTER TERMINALS

One of the earliest and most common uses of remote terminals is as follows:

company x

........................ ........................

: : : :

: REMOTE OFFICE : : REMOTE OFFICE :

: : : :

: _ terminals _ : : _ terminals _ :

: | \_ | \_ : : | \_ | \_ :

: |___| |___| : : |___| |___| :

.....:............:..... .....:............:.....

. . ....................................: .

. . . .................................................

. . . . ...........................

. . . . : HEAD OFFICE :

. . . . : :

. . . . : mainframe local :

. . . . : computer terminals :

. . ..:: ___________ _ :

.......:::::|oo|oo|oo|oo|....| \_ :

...............::|__|__|__|__|. |___| :

. . : . _ :

. . : ..| \_ :

. . : |___| :

. . ...........................

. ...........

. ........................ .

. : : .

. : REMOTE OFFICE : .

. : : .

. : _ terminals _ : .

..:..| \_ | \_ ..:...

: |___| |___| :

:......................:

Each terminal at the remote site requires its own asynchronous data-link to

the head office, this has the following disadvantages:

  1. Datalines are expensive
  2. These lines are not protected against errors caused by line noise.
  3. The head office requires a large rack of modems.
  4. The central computer must do some processing on each character as it is sent to the computer.

10 - One solution to the problem

Improvements in technology allow 'intellegance' ie processing power to be devolved out from the cenral site to the remote offices.

A control unit such as the 3270 series devices is really a small computer specialised to do the following:

  1. Do some local processing which allows 'order entry' for example to work effectivly.
  2. Concentrate all the terminals onto one dataline.
  3. use an efficient line protocol which also provides error correcting

company x

......................... .........................

: : : :

: REMOTE OFFICE : : REMOTE OFFICE :

: : : :

: _ terminals _ : : _ terminals _ :

:| \_ _______ | \_ : :| \_ _______ | \_ :

:|___|-|control|-|___| : :|___|-|control|-|___| :

: | unit | : : | unit | :

: |_______| | : |_______| |

...........:............. ...........:.............

. .

. .............................................

. . ...........................

. . : HEAD OFFICE :

. . : :

. . : mainframe local :

. . : 'host'computer terminals :

. .: ___________ _ :

........:| |oo|oo|oo|....| \_ :

................:|__|__|__|__|. |___| :

. :front end . _ :

. :comms ..| \_ :

. :controller |___| :

. ...........................

.

........................

. : :

. : REMOTE OFFICE :

. : :

. : _ terminals _ :

. :| \_ _______ | \_ :

. :|___|-|control|-|___| :

. : | unit | :

. : |_______| |

. ...........:.............

. .

..............

This might work as follows:

1 - The Host (say the head office) computer could send the cluster controller a message, this would contain the number of the terminal followed by a screen full of data and embedded in it are control sequences, which define 'fields' on the screen, some of these fields would be for responses from the terminal operator.

______________________________________________________________________

| |

| EXAMPLE 3270 SCREEN |

| ------------------- |

| ORDER ENTRY |

| |

| Customer name [ ] |

| |

| Customer address [ ] |

| [ ] |

| [ ] |

| |

| Item Code [ ] |

| |

| Quantity [ ] |

| |

| Date dispatched [ ] |

|______________________________________________________________________|

The embedded commands in the 3270 datastream protocol allow the cursor to jump to any point on the screen and therefore unnecessary spaces do not have to be transmitted allowing the full screen to be sent using a minimum number of bytes.

Once the screen has been received on the terminal the operator can enter or alter the fields, this is purely a local operation so the operator can make as many changes as he/she likes without generating any line traffic.

When all the fields are correct the operator can hit the enter key, the host computer will then request the terminal to transmit all the fields that have been altered.

The Host computer can then send the next screen, therefore the only time the operator could by held up by line delays is between one screen being filled in and the next one received, this makes efficient use of the line and the host computer, although it does make the line traffic 'lumpy'.

11 - SYNCHRONOUS DATANSMISSION

To improve line efficiency by the elimination of start and stop periods for each character "synchronous" transmission is used.

bit-synchronisation is maintained by ensuring that 0 to 1 and 1 to 0 transitions occur sufficiently frequently to synchronize a local receive clock in the modem. This is often done by including special characters in the messages.

Character-synchronisation also is achieved by special characters at the start of the message, each character in the message must then follow without any gaps, to do this the transmitting station must buffer the message.

Text Blocking

The 3274 Performs inbound text blocking. Each Block of data can contain a maximum of 256 text characters. Of that total, each block contains the STX and ETB (or ETX) data-link control characters. Two adress bytes (CU poll address and device address) precede the read heading in the first block only and are included in the 256-character total.

General and Specific Poll Sequences

When a general or specific poll sequence is issued (fig 4-1), one of three possible results occurs:

  1. If status and sense information is pending with or without an AID (attention identifier) present, a status and sense message is generated.
  2. If status and sense information is not pending and an AID is present, a Read Modified command is executed.
  3. If there is no status or sense information or no AID pending, an EOT response is generated.

General Poll Address byte sequence:

SYN

SYN

3274 Poll Address

3274 Poll Address

7F (EBCDIC) or 22 (ASCII) Used in place of the two

7F (EBCDIC) or 22 (ASCII) device-address bytes

ENQ

Specific Poll address byte sequence:

SYN

SYN

3274 Poll Address

3274 Poll Address

Device Address

Device Address

ENQ


Example of 3274 Addressing

EBCDIC ASCII
General Poll CU5 CU C5 45
address C5 45
Device 7F 22
Specific Poll CU C5 45
Device 4 on CU 5 address C5 45
Device C4 44
Select Device 4 CU E5 56
on CU 5 address E5 56
Device C4 44
address C4 44

______________________________________________

Responses to poll

Status message Text request message Read Modified or short read message Read Partition (query)
SOH SOH STX DLE
% % 3274 poll STX
R / address 3274 poll
STX STX device address
3274 poll text address device
address . text address
device . . text
address . . .
s/s 0 ETX or ETB . .
s/s 1 BCC ETX or ETB .
ETX BCC DLE
BCC ETX
BCC

Status and Sense (S/S) Bytes

The coding of these bytes depends on the link protocol being used, the

following is the coding for BSC using EBCIDC:

S/S byte 0:

bit
0 Dependent on setting of bits 2-7
1 Always 1
2 Reserved
3 Reserved
4 Device busy (DB) This bit indicates that the addressed device is busy executing an operation or that a busy detection was previously made by a command or specific poll. The device is busy when it is executing an erase all unprotected command or a print operation, accepting data from the operator identification card reader, or performing various keyboard operations.
5 Unit Specify (US) This bit is set if any S/S bit is set as a result of a device-detected error or if a command is addressed to a busy device.
6 Device End (DE) This bit indicates that the addressed device has changed from unavailable to available and not ready to ready, or busy to not busy. This bit is included during a specific or general poll but is not considered pending status by a selection-addressing sequence.
7 Reserved.

S/S byte 1:

bit
0 Dependent on setting of bits 2-7
1 Always 1
2 Command Reject (CR) - This bit is set upon receipt of an invalid 3270
command
3 Intervention Required (IR) - This bit is set if:
* A copy command contains a "from" address in its data stream which
specifies an unavailable device.
* A command is attempted to start a printer but is found not ready.
The printout is suppressed.
* The 3274 recieves a selection addressing sequence or a specific poll
sequence for a device which is unavailable or which became no ready
during a printout. A general poll sequence does not respond to the
unavailable/not ready indication and proceeds to determine the state
of the next device.
* The 3274 receives a command for a device which has been logged as
unavailable or not ready.
4 Equipment Check (EC) - This bit indicates a printer character
generator or sync check error occured, the printer became mechanically
disabled, or a 3274 detected a bad parity from the device.
5 Data Check (DC) This bit indicates a 3274 operation to a device was
unsuccessful
6 Reserved
7 Operation Check (OC) This bit when set alone, indicates one of the
following:
* Receipt of an illegal buffer address or of an incomplete order
sequence on a Write, Erase/Write, or Erase/Write Alternate command
* The device did not receive a CCC or a "from" address on a copy
command.
* Receipt of an invalid command sequence (ESC is not received in the
second data character position of the sequence.)
* The internal buffering capability is exceeded on a 3274.

19 - Sample traces

The following traces were taken Using a Telenex Autoscope tee'd in to an

IBM PC connected to a Telenet 3006 making a call to a Tandem computer

acting as a host (Mediat).

emulated on IBM PC PSS Mediat

................... .......... ....................

. . . . . .

. terminal 3274 . ______ . . . .

. _ ____ . | |X.25. . . .

. _/ |_| |_._| 3006 |____..........__. Tandem .

. |___| |____| . |______| | . . . Host .

. . | . . . .

................... | .......... ....................

|

___|_____

| |

| our |

| tester |

|_________|


The trace is read as follows:

sync timestamp hex coding of

character | data on line

| | |

v v v

from 3010 to host - High BCD --> FFs314:58:5844772FF

low BCD --> FFy2 00FFDFF

from host to 3010 - High BCD --> FFFF FFFFFFF

low BCD --> FFFF FFFFFFF

___________________

Trace 1

Status from terminal

01 SOH
6C %
D9 R
02 STX
40 3274 poll address
40 device address
C2 S/S 0
40 S/S 1
03 ETX
8B BCC
60 BCC


 


metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover The Essential Guide to Telecommunications (Essential Guide).

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.