TRANSFER Programming Manual

Sample Client Code
Designing and Writing a Client
9–48 069138, Update 1 to 040970 Tandem Computers Incorporated
701 ON ERROR MOVE TERMINATION-STATUS TO term-status
702 PERFORM error-section
703 ABORT-TRANSACTION
704 GO TO logon-accept-data.
705
706 IF ih-pw-reply-code > 1
707 PERFORM error-section
708 ABORT-TRANSACTION
709 GO TO logon-accept-data.
710
711 END-TRANSACTION.
712
713 RESET TEMP msg.
714 MOVE "Y" TO session-flag.
715 MOVE 2 TO key-value.
716
717 *********************************************************************
718 * (3) EXITS THE LOGON SECTION. *
719 *********************************************************************
720
721 logon-section-exit.
722 EXIT.
723 /
724 function-section SECTION.
725
726 *********************************************************************
727 * This section displays the function selection menu and accepts *
728 * a function key. In this example, not all function keys are *
729 * tested -- those which are not included in the accept list will *
730 * not be recognized. *
731 *********************************************************************
732
733 RESET TEMP msg.
734
735 display-function.
736
737 DISPLAY OVERLAY select-function AT overlay-area.
738
739 accept-function.
740
741 ACCEPT
742 ESCAPE ON
743 logon-key, f2, read-mail, discard-mail,
744 compose-mail, post-mail
745 return-key, logoff-key.
746
747 MOVE TERMINATION-STATUS TO key-pressed.
748
749 IF return-request OR logoff-request
750 MOVE 8 TO key-value
751 GO TO function-section-exit.
752
753 IF NOT function-request
754 MOVE "FUNCTION KEY PRESSED IS NOT ALLOWED" TO ws-error
755 DISPLAY TEMP error-line OF base-screen
756 GO TO accept-function.
757
758 MOVE key-pressed TO key-value.
759
760 function-section-exit.
761 EXIT.
762 /
763 read-mail-section SECTION.
764
765 DISPLAY OVERLAY read-mail-screen AT overlay-area.
766
767 **********************************************************************
768 * Initializes the GET-ITEM-REC UOWs for the subject, recipient, and *
769 * text records. These remain as constants, so they need only be *