Basic telecommunications access method
# Basic telecommunications access method

Basic Telecommunications Access Method (BTAM) is a low-level programming interface specified by IBM for use on the IBM System/360 for start-stop and binary synchronous telecommunications terminals. Later, IBM specified higher-level interfaces QTAM and TCAM.

BTAM was superseded by VTAM for Systems Network Architecture (SNA) devices. BTAM continued to be supported in later iterations of the system architecture, and IBM finally withdrew support in 2000.

BTAM requires the application program or transaction processing system to handle almost every detail of the protocol. This is harder than using a higher-layer protocol, but it permits interfacing to non-standard devices in non-standard ways.

## An access method for terminals

BTAM is an access method for interactively communicating with remote terminals, usually connected through a front end processor such as a 270x communications controller, although support for local channel-attached 3270 terminals is included. BTAM dynamically builds Channel command words (CCWs) for reading, writing and "polling" terminals and deals with specific responses from those terminals, according to the success or failure of the communication channel.

## Key role in transaction processing systems

BTAM was a key component in IBM's early transaction processing systems such as MTCS, CICS and IMS and underpinned the rise of online transaction processing for many large commercial banks and insurance companies. It was not unusual for BTAM and later developed access methods (such as VTAM) to co-exist, supporting different devices simultaneously under the same transaction processing system.

## Programming

Material in this section taken from IBM System/360 Operating System Basic Telecommunications Access Method; GC30-2004-6.

BTAM programming requires detailed knowledge of the characteristics of the specific terminals to be used.

THE DCB macro is used to define a communications line group: dcbname DCB DSORG=CX... DEVD=BS can be coded to specify a Binary Synchronous (Bisync) line. Many other operands specify unique characteristics of the attached terminals.

A terminal list, specified by the DFTRMLST macro, identifies the terminals attached to the line. This macro specifies the line characteristics—start-stop, bisync, point-to-point, multipoint, leased line or dial — and the type of polling required— wrap around or open. The polling characters or telephone number used to identify each specific remote device on the line are coded. The CHGNTRY macro can be used to modify information for a specific device in the list during execution. A wrap-around polling list will cause each device in the list to be polled sequentially by the channel until a response was received, This reduces the load on the CPU for continuous polling.

The programmer can specify a buffer pool, a data structure used to hold messages transmitted to or from the terminals. BTAM can construct the pool automatically or the programmer can construct the pool in various ways. The BUILD macro will format the pool in static or dynamic storage previously acquired, or the GETPOOL macro will acquire and format storage automatically. For read operations BTAM will automatically obtain one or more buffers from the pool and store the received message. For a write operation the programmer needs to code REQBUF to obtain the number of buffers necessary to build the output message. In either case the RELBUF is used to free the buffers on completion of the read or write.

Tha ASMTRTAB and TRNSLATE include translation tables and translate to and from non EBCDIC character codes.

The standard OS/360 OPEN and CLOSE macros are used to initiate and terminate processing of a BTAM line. The LOPEN macro can reinitialize a line that, for whatever reason, failed to open successfully.

BTAM provides a large number of options for the READ and WRITE macros, depending on the line and terminal types and the current status. These are such operations as "read initial with reset", "read conversational", "read repeat", "write initial", "write break", and "write continue transparent". These are specified by codes, such as READ decbaddr,TI,... for a "read initial." The read or write operation is executed asynchronously by the channel. Following a read or write, a WAIT or TWAIT macro is required to wait for completion and retrieve ending status.

The RESETPL macro cancels an outstanding read and/or stops polling on a line.

## Supported devices

Amongst many other devices supported, BTAM handles:

* IBM 1050 terminals
* IBM 2740 terminals
* IBM 2741 terminals
* Teletype terminals
* IBM 2260 visual display unit terminals
* IBM 3270 visual display unit terminals
* IBM 2780 terminals used for remote job entry
