home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol155 / adbug.cmd < prev    next >
Encoding:
Text File  |  1984-04-29  |  4.6 KB  |  122 lines

  1. * ADBUG.CMD ------------------- VERSION 1.0 ------------------- OCTOBER 30, 1982
  2. * by Allen Cleveland                                      CLEVELAND & ASSOCIATES
  3. *
  4. * A program to place a menu on the screen then get the operator selection of
  5. * function:(A) add a record, (F) print form, (M) print mailing lables or
  6. * (L) print listing of data base.
  7. *
  8. * This program is called directly by operator from the dBASE command level.
  9. * This program in turn (depending on function selected) calls on of the
  10. * following: ADD/REC.CMD, FORM/LTR.CMD, MAIL/LAB.CMD, or LIST/PRT.CMD.
  11. *
  12. *
  13. SET TALK OFF
  14. SET ECHO OFF
  15. SET FORMAT TO SCREEN
  16. SET COLON OFF
  17. SET SCREEN ON
  18. STORE " " TO SELECTION
  19. STORE DATE() TO D1
  20. STORE T TO BUSY
  21. *                            * BEGIN MAIN PROCEDURE *
  22. DO WHILE BUSY
  23.      STORE T TO NO:CODE
  24. *                           "Paint" the screen.
  25.      ERASE
  26.      @  1, 7 SAY "+------------------------------------------------------" + ;
  27.                  "------------+"
  28.      @  2, 7 SAY "| Atlanta dBASE II Users Group    Membership Data Base"
  29.      @  2,64 SAY D1
  30.      @  2,74 SAY "|"
  31.      @  3, 7 SAY "+------------------------------------------------------" + ;
  32.                  "------------+"
  33.      @  4, 7 SAY "|                 MENU OF FUNCTIONS AVAILABLE"
  34.      @  4,74 SAY "|"
  35.      @  5, 7 SAY "|"
  36.      @  5,74 SAY "|"
  37.      @  6, 7 SAY "|    (A)-ADD a record to the data base."
  38.      @  6,74 SAY "|"
  39.      @  7, 7 SAY "|          (Add a new name, address and other date to list)"
  40.      @  7,74 SAY "|"
  41.      @  8, 7 SAY "|    (F)-FORM letter or notice from an existing" + ;
  42.                  " LETTERXX.CMD file. |"
  43.      @  9, 7 SAY "|          (Print forms addressed to selected names in" + ;
  44.                  " data base)  |"
  45.      @ 10, 7 SAY "|    (M)-MAILING lables for forms."
  46.      @ 10,74 SAY "|"
  47.      @ 11, 7 SAY "|          (Print mailing labels for forms which have " + ;
  48.                  "been printed)|"
  49.      @ 12, 7 SAY "|    (L)-LISTING of data base records."
  50.      @ 12,74 SAY "|"
  51.      @ 13, 7 SAY "|          (Print out a listing of contents of all records)"
  52.      @ 13,74 SAY "|"
  53.      @ 14, 7 SAY "|    (Q)-QUIT and return to dBASE II"
  54.      @ 14,74 SAY "|"
  55.      @ 15, 7 SAY "|"
  56.      @ 15,74 SAY "|"
  57.      @ 16, 7 SAY "|                     SELECT ONE -->"
  58.      @ 16,44 GET SELECTION
  59.      @ 16,74 SAY "|"
  60.      @ 17, 7 SAY "|"
  61.      @ 17,74 SAY "|"
  62.      @ 18, 7 SAY "|"
  63.      @ 18,74 SAY "|"
  64.      @ 19, 7 SAY "|"
  65.      @ 19,74 SAY "|"
  66.      @ 20, 7 SAY "+-----------------------------------------------------" + ;
  67.                  "-------------+"
  68. *                               Get menu selection.
  69.      READ
  70. *                             * BEGIN SUB-PROCEDURE *
  71.      DO WHILE NO:CODE
  72. *                    Make sure that selection code is upper case.
  73.           STORE !(SELECTION) TO MENU:CODE
  74. *                  Check selection code against each valid choice.
  75.           IF MENU:CODE = "A"
  76.                STORE F TO NO:CODE
  77.                @ 16,22 SAY "   ADD RECORD SELECTED    "
  78.                DO ADD/REC
  79.           ELSE
  80.                IF MENU:CODE = "F"
  81.                     STORE F TO NO:CODE
  82.                     @ 16,22 SAY "    PRINT FORM LETTER SELECTED"
  83.                     DO FORM/LTR
  84.                ELSE
  85.                     IF MENU:CODE = "M"
  86.                          STORE F TO NO:CODE
  87.                          @ 16,22 SAY "    PRINT MAILING LABELS SELECTED"
  88.                          DO MAIL/LAB
  89.                     ELSE
  90.                          IF MENU:CODE = "L"
  91.                               STORE F TO NO:CODE
  92.                               @ 16,24 SAY "    PRINT DATA BASE SELECTED"
  93.                               DO LIST/PRT
  94.                          ELSE
  95.                               IF MENU:CODE = "Q"
  96.                                    STORE F TO NO:CODE
  97.                                    STORE F TO BUSY
  98.                               ELSE
  99. *                                     Selection code is not valid.
  100.                                    STORE " " to SELECTION
  101.                                    @ 15,20 SAY "Enter ONLY an A, F, M, L or Q"
  102.                                    @ 16,44 GET SELECTION
  103.                                    READ
  104.                                    LOOP
  105.                               ENDIF
  106.                          ENDIF
  107.                     ENDIF
  108.                ENDIF
  109.           ENDIF
  110.      STORE " " TO SELECTION
  111.      ENDDO                * END SUB-PROCEDURE *
  112. ENDDO                     * END MAIN PROCEDURE *
  113. *     Make sure dBASE is re-configured the way you found it before "quiting".
  114. SET CONSOLE ON
  115. SET COLON ON
  116. SET FORMAT TO SCREEN
  117. SET SCREEN ON
  118. SET PRINT OFF
  119. SET TALK ON
  120. *           "Returns" back to command level of dBASE
  121. RETURN
  122.