TRANSFER Programming Manual

Basic Steps for Sending a Package
Designing and Writing a Client
9–10 069138, Update 1 to 040970 Tandem Computers Incorporated
Basic Steps for Sending a
Package
The basic steps for sending a package are listed below by UOW:
1. START-SESSION. Establish TRANSFER context.
2. CREATE-ITEM. Create an item. Set IS-PKG-HDR to Y. To create a mail message,
set ITEM-TYPE to a number from 109 (original mail package) to 114. This step
also creates a default item descriptor. To create a nonmail message, select an item
type other than 109 through 114.
3. ADD-ITEM-REC (Optional.) Add item data records for the message text. Data
records have a record type of 120. To add a subject field, add a record with record
type 115.
4. ADD-RECIP. Add recipients to the package. You can also add X400 recipients to
the package with the ADD-X400-RECIP UOW.
5. SUBMIT-PKG. Submit the package to the TRANSFER delivery system.
6. END-SESSION. Formally end the session.
Basic Steps for
Receiving a Package
When you receive a package and make the contents available to the recipient, you can
display the originator, the components, and the recipient list for the package. The
minimum steps to process a package are listed below, by UOW:
1. START-SESSION. Establish TRANSFER context and see what folders are
defined.
2. SCAN-FOLDER. Request a list of item IDs. You can call this UOW repeatedly if
there are many item IDs.
3. GET-ITEM-DES-C20. Get information about the message—priority, notification
requests, and so on. (If the X400-ORIG flag is Y, the message came from an X400
originator; Section 6 lists instructions for X400 packages.)
5. GET-ITEM-COMPNT-A01. Get associated messages if attachments are indicated
in the item descriptor (optional).
6. GET-ITEM-REC. If you are following the PS MAIL convention, retrieve the
subject, text, recipients, and originator by record type.
7. GET-RECIP. List recipients.
8. ACK-RECEIPT. Acknowledge that the message was read and triggers receipt
notification (optional).
9. END-SESSION. Formally end the session.
Grouping UOWs
into IPCs
You can use a single SEND statement or WRITEREAD call to request multiple services
as long as all of those services are for the same correspondent. There is only one
request header to identify the correspondent. You use a unit of work (UOW) for each
service request.