TRANSFER Programming Manual
Sample Agent Program Code
Designing and Writing an Agent
10–24 069138, Update 1 to 040970 Tandem Computers Incorporated
225
226 SEND ih-ipc-hdr, uow-ar-add-recip-uow, uow-air-add-item-rec-uow
227 TO "TISERV"
228 REPLY CODE 0, 1, 2 YIELDS
229 ih-ipc-hdr, rsp-ar-add-recip-rsp, rsp-air-add-item-rec-rsp,
230 CODE 3 YIELDS ih-ipc-hdr.
231
251 **********************************************************************
252 * BUILD THE UOW TO ADD THE ORIGINAL PACKAGE TO THE NEW PACKAGE *
253 * *
254 * uow-atc-attach-compnt-a01-uow *
255 * *
256 **********************************************************************
257
258 MOVE rsp-cri-item-id TO uow-atc-parent-item-id.
259 MOVE ag-lnk-package-id TO uow-atc-compnt-id.
260 MOVE 1 TO uow-atc-rel-position.
261 MOVE 100 TO uow-atc-compnt-type.
262
263 **********************************************************************
264 * BUILD THE UOW TO SUBMIT THE NEW PACKAGE FOR DELIVERY *
265 * *
266 * uow-sp-submit-pkg-uow *
267 * *
268 **********************************************************************
269
270 MOVE rsp-cri-item-id TO uow-sp-item-id.
271
272 **********************************************************************
273 * ISSUE THE SEND *
274 **********************************************************************
275
276 MOVE 2 TO ih-uows-to-process.
277 MOVE -2 TO ih-request-code.
278
279 SEND ih-ipc-hdr, uow-atc-attach-compnt-a01-uow,
280 uow-sp-submit-pkg-uow
281 TO "TISERV"
282 REPLY CODE 0, 1, 2 YIELDS
283 ih-ipc-hdr, rsp-atc-attach-compnt-a01-rsp,
284 rsp-sp-submit-pkg-rsp,
285 CODE 3 YIELDS ih-ipc-hdr.
286
287
288 200-ack-and-unsave.
289
290 **********************************************************************
291 * The following 2 UOW's will be sent in the same SEND *
292 **********************************************************************
293
294 **********************************************************************
295 * BUILD THE UOW TO ACKNOWLEDGE RECEIPT OF THE ORIGINAL PACKAGE *
296 * *
297 * uow-ack-ack-receipt-uow *
298 * *
299 **********************************************************************
300
301 MOVE ag-lnk-package-id TO uow-ack-item-id.
302
303 **********************************************************************
304 * BUILD THE UOW TO REMOVE THE ORIGINAL PACKAGE FROM THE INBOX *
305 * *
306 * uow-usv-unsave-item-uow *
307 * *
308 **********************************************************************
309
310 MOVE ag-lnk-package-id TO uow-usv-item-id.