What Is a Transaction Program?
The part of the communications application that initiates or responds to APPC communications is called a transaction program. A transaction program is not an entire, stand-alone program. Instead, it is the part of the program that handles transactions (exchanges of data) with another program.
When people talk with each other, we say that they are having a conversation. Likewise, the communication between two transaction programs is called a conversation.
A conversation between two programs is similar to a conversation
between two people. When you have a conversation with another person,
you follow unwritten rules that govern how you begin and end the conversation,
take turns speaking, and exchange information. Similarly, APPC is
called a protocol because it provides the rules that govern how conversations
between transaction programs start and stop, which program speaks
first,
and how data is exchanged. Computers need complete and rigid rules
for conversations between programs. For that reason, APPC consists
of a set of well-defined and thorough rules to cover all possible
communications situations.
An APPC program may have several conversations active at one time, with the same transaction program or with different transaction programs.
Every transaction program needs a partner to communicate with. Thus, transaction programs are developed in pairs called partner transaction programs.
People use different parts of speech to communicate with each other. Transaction programs are more limited in their communications; they use only verbs to communicate with each other. The verbs are the programming language you use to start, stop, and control conversations.
- ALLOCATE (CMALLC in CPI-C)
- Starts a conversation with another transaction program
- SEND_DATA (CMSEND in CPI-C)
- Sends data to the partner transaction program
- RECEIVE (CMRCV in CPI-C)
- Receives data from the partner transaction program
- DEALLOCATE (CMDEAL in CPI-C)
- Ends a conversation with another transaction program.
The APPC verbs make up the application programming interface (API) for APPC and CPI-C. In other words, these verbs represent the interface between the transaction program and the APPC software.