TRANSFER Programming Manual
Sample Client Code
Designing and Writing a Client
9–52 069138, Update 1 to 040970 Tandem Computers Incorporated
977 *********************************************************************
978 * Remove any unwanted packages; this program removes packages *
979 * only from the INBOX. *
980 *********************************************************************
981
982 BEGIN-TRANSACTION.
983
984 MOVE "DISCARD" TO error-name.
985 MOVE 1 TO ih-uows-to-process.
986 MOVE -3 TO ih-request-code.
987 MOVE "INBOX" TO uow-usv-folder-name.
988 MOVE rsp-scn-items-returned( scan-index ) TO uow-usv-item-id.
989
990 DISPLAY TEMP "DISCARDING" IN msg.
991
992 *********************************************************************
993 * SENDS THE IPC TO REMOVE THE PACKAGE FROM THE INBOX. *
994 *********************************************************************
995
996 SEND ipc-hdr, unsave-item-uow
997 TO "TISERV"
998 REPLY CODE 0, 1, 2 YIELDS ipc-hdr, unsave-item-rsp
999 CODE 3, YIELDS ipc-hdr,
1000 ON ERROR MOVE TERMINATION-STATUS TO term-status
1001 PERFORM error-section
1002 ABORT-TRANSACTION
1003 GO TO discard-mail-section-exit.
1004
1005 IF ih-pw-reply-code > 1
1006 PERFORM error-section
1007 ABORT-TRANSACTION
1008 GO TO discard-mail-section-exit.
1009
1010 RESET TEMP msg.
1011
1012 END-TRANSACTION.
1013
1014 MOVE "PREVIOUS ITEM DISCARDED" TO WS-MSG
1015 DISPLAY TEMP msg.
1016
1017 discard-mail-section-exit.
1018 EXIT.
1019 /
1020 compose-mail-section SECTION.
1021
1022 *********************************************************************
1023 * Allows correspondent to compose mail for subsequent transmittal. *
1024 *********************************************************************
1025
1026 DISPLAY OVERLAY mail-posting AT overlay-area.
1027 DISPLAY mail-posting.
1028
1029 accept-mail-posting.
1030
1031 ACCEPT mail-posting
1032 UNTIL logon-key, f2, read-mail, discard-mail,
1033 compose-mail, post-mail
1034 ESCAPE ON return-key, logoff-key.
1035
1036 MOVE TERMINATION-STATUS TO key-pressed.
1037
1038 IF return-request
1039 MOVE 2 TO key-value
1040 GO TO compose-mail-section-exit.
1041
1042 IF logoff-request
1043 MOVE 8 TO key-value
1044 GO TO compose-mail-section-exit.
1045