TRANSFER Programming Manual
Sample Client Code
Designing and Writing a Client
9–46 069138, Update 1 to 040970 Tandem Computers Incorporated
563 PIC X(40)
564 FROM gsu-data-string .
565 05 FILLER AT 8, 1
566 VALUE "Text" .
567 05 line-out AT 10, 2
568 PIC X(78)
569 OCCURS ON 5 LINES
570 REVERSE, DIM
571 FROM ws-data-recs .
572 05 FILLER AT 20, 1
573 VALUE "F3 = Read Next" .
574 05 FILLER AT 20, 19
575 VALUE "F4 = Discard" .
576 05 FILLER AT 20, 36
577 VALUE "F16 = Return SF16 = Logoff" .
578 /
579 PROCEDURE DIVISION.
580
581 *********************************************************************
582 * MAIN ROUTINE. *
583 *********************************************************************
584
585 DECLARATIVES.
586
587 logon-recovery SECTION.
588 USE FOR SCREEN RECOVERY.
589
590 DISPLAY base-screen.
591
592 END DECLARATIVES.
593
594 START-PROGRAM SECTION.
595
596 DISPLAY BASE base-screen.
597
598 sp-main-entry.
599
600 * key-value will be set to the correct value for branching
601 * to one of the following routines.
602
603 PERFORM ONE OF
604 logon-section,
605 function-section,
606 read-mail-section,
607 discard-mail-section,
608 compose-mail-section,
609 post-mail-section,
610 logoff-section,
611 logoff-section
612 DEPENDING ON key-value.
613
614 IF logoff-request
615 PERFORM logoff-section
616 GO TO sp-main-exit
617 ELSE
618 GO TO sp-main-entry.
619
620 sp-main-exit.
621 EXIT PROGRAM.
622 /
623 logon-section SECTION.
624
625 *********************************************************************
626 * The logon screen is displayed and either function key 1 (F1) or *
627 * shifted function key 16 (SF16) is accepted. F1 logs on, *
628 * exits; all other keys are in error. *
629 * *
630 * Following successful logon, key-value is set to 2 to force *
631 * branching to the select screen. SF16 invokes the logoff *