CP6100 I/O Process Programming Manual
Introduction
HOW DO I USE IT?
To build an interface to a specific device (or to simulate a
device), you follow one of the design strategies shown in
Figure 1-2:
First option. Write a process that uses file system calls--like
OPEN, SETMODE, and WRITEREAD--to communicate with CP6100 and
"fill in" those elements of protocol your application requires.
Clearly, you don't have to repeat functions already in the
protocol module. Your finished program, written in TAL, provides
high-level communication services to other applications; for
example, an application in COBOL can transfer data to and from a
device by way of your interface, without having to embed control
characters or issue special commands to the device.
An example of this option is Tandem's EXCHANGE product, which
builds on the BSC protocol to simulate an IBM Multileaving HASP
Workstation or an IBM 2780/3780 Data Transmission Terminal.
Other applications use EXCHANGE to transfer data in batch mode
over the bisync line.
Second option. Write procedures that use file system calls to
implement the required protocol, and include those procedures in
each application process that uses the line. The procedures
perform functions like opening and closing a line, embedding
control characters in text buffers, and handling line errors.
Which is Better? There is one advantage to writing procedures,
as opposed to a separate process: because a call to a procedure
requires no interprocess messages, the performance of each
application is likely to be optimized. On the other hand,
a separate process has several points to recommend it:
• If you use the same procedures in several applications, an
enhancement to your interface requires several updates and
recompilations. If instead you create one process with
which other applications can communicate, an enhancement
requires only one update and recompilation.
• Another advantage of a separate process is that you can
insulate other applications from data communication concerns.
The same application code that in one instance makes requests
of AM3270 can in another instance use your interface to
communicate with another device. You might have to write
several custom interfaces, tailored to different protocols,
but you can minimize the differences for your users by
accepting requests in the same format, regardless of the
device. To the user, your interface looks like another
GUARDIAN I/O process.
1-4