TRANSFER Programming Manual
Sample Client Code
Designing and Writing a Client
9–54 069138, Update 1 to 040970 Tandem Computers Incorporated
 1115 *********************************************************************
 1116
 1117 SEND ipc-hdr,
 1118 add-recip-uow,
 1119 add-subject-rec-uows,
 1120 add-text-rec-uows
 1121 TO "TISERV"
 1122 REPLY CODE 0, 1, 2 YIELDS ipc-hdr,
 1123 add-recip-rsp,
 1124 add-subject-rec-rsps,
 1125 add-text-rec-rsps,
 1126 CODE 3, YIELDS ipc-hdr,
 1127 ON ERROR MOVE TERMINATION-STATUS TO term-status
 1128 PERFORM error-section
 1129 ABORT-TRANSACTION
 1130 GO TO post-mail-section-exit.
 1131
 1132 IF ih-pw-reply-code > 1
 1133 PERFORM error-section
 1134 ABORT-TRANSACTION
 1135 GO TO post-mail-section-exit.
 1136
 1137 MOVE rsp-cri-item-id TO art-item-id, uow-sp-item-id.
 1138 MOVE rsp-ar-accepted-name TO art-client-data.
 1139
 1140 MOVE -3 TO ih-request-code.
 1141 MOVE 2 TO ih-uows-to-process.
 1142
 1143 *********************************************************************
 1144 * SENDS THE IPC TO POST THE PACKAGE. *
 1145 *********************************************************************
 1146
 1147 SEND ipc-hdr,
 1148 add-recip-text-uow,
 1149 submit-pkg-uow
 1150 TO "TISERV"
 1151 REPLY CODE 0, 1, 2 YIELDS ipc-hdr,
 1152 add-recip-text-rsp,
 1153 submit-pkg-rsp
 1154 CODE 3, YIELDS ipc-hdr,
 1155 ON ERROR MOVE TERMINATION-STATUS TO term-status
 1156 PERFORM error-section
 1157 ABORT-TRANSACTION
 1158 GO TO post-mail-section-exit.
 1159
 1160 IF ih-pw-reply-code > 1
 1161 PERFORM error-section
 1162 ABORT-TRANSACTION
 1163 GO TO post-mail-section-exit.
 1164
 1165 END-TRANSACTION.
 1166 /
 1167 *********************************************************************
 1168 * Displays message informing correspondent that package was *
 1169 * posted. *
 1170 *********************************************************************
 1171
 1172 MOVE "PACKAGE POSTED" TO ws-error
 1173 DISPLAY TEMP error-line OF base-screen.
 1174
 1175 RESET TEMP msg.
 1176 GO TO post-mail-section-exit.
 1177
 1178 init-uow-air.
 1179
 1180 * Setup the fields in each text ADD-ITEM-REC uow.
 1181
 1182 MOVE "UW" TO atx-self-ident( air-index ).
 1183 MOVE 104 TO atx-uow-code( air-index ).










