     *****************  ACCOUNTS COMMAND FILE   *****************
* THIS IS THE CONTROL MODULE FOR ALL THE PROCEDURES USED IN THE ACCOUNTING
* FUNCTIONS.  (MENU DRIVEN).  The operator is given a choice of major
* functions.  The menu selection here calls up menus of sub-functions
* to as many levels as necessary.  A package of utility functions is
* also provided as part of the overall system for file maintenance, etc.
******************************************************

SELECT PRIMARY
CLEAR
SET TALK OFF
SET EJECT OFF
* SET MARGIN TO 38 FOR CENTER FEED IN A SHEETFEED PRINTER
SET MARGIN TO 8
SET RAW ON

*****************************************************************
* This group of commands is hardware-dependent, may be eliminated
* down to the next row of asterisks.
SET PRINT ON
   * Sets (8-1)=7 lines/inch and 89 lines/page, Diablo 1650/sheet feeder
*  ?? CHR(27)+CHR(30)+CHR(8)
*  ?? CHR(27)+CHR(12)+CHR(89)
SET PRINT OFF
* End printer setup commands.
*************************************************************

STORE T TO Accounting
DO WHILE Accounting
   ERASE
   ?
   ?
   ? '1> ENTER BILLS & TIME SHEETS       6> REPORTS & PRINTOUTS'
   ? '                                      Job cost & billing summaries'
   ? '2> PAY BILLS AND SALARIES             Find & Edit bills by name'
   ? '                                      Review/print databases'
   ? '3> DEPOSITS & CHECKBOOK               Quarterly Sales Tax'
   ?
   ? '4> MEDIA INSERTION ORDERS'
   ?
   ? '5> CLIENT BILLINGS & INVOICES'
   ?
   ?
   ? '                 Pick a number (Q to QUIT)'
WAIT TO Action

 IF !(ACTION) = 'Q'
*  I have chose to omit this sequence at this time, it does work.
*
    * This sequence homes the cursor and erases the screen on the IBM 3101
*   STORE chr(27) + chr(76) + chr(27) + chr(89) + chr(0) TO q
    * This sequence homes the cursor and erases the screen on              
    * the Heath/Zenith H-89
 *  STORE CHR(27) + CHR(72) + CHR(27) + CHR(89) + CHR(0) TO q
 *  QUIT TO '&q'

   ERASE
   QUIT
ELSE
   IF Action = '1'
      DO CostMenu
   ELSE
      IF Action = '2'
         DO PayMenu
      ELSE
         IF Action = '3'
            DO DepMenu
         ELSE
            IF Action = '4'
               DO IOMenu
            ELSE
               IF Action = '5'
                  DO InvMenu
               ELSE
                  IF Action = '6'
                     DO ReportMe
                  ELSE
                     IF Action = '7'
                        ERASE
                        @ 5,10 SAY '     HELP file not ready yet.'
                        ? '  <Return> to continue.'
                        WAIT
                     ENDIF 7
                  ENDIF 6
               ENDIF 5
            ENDIF 4
         ENDIF 3
      ENDIF 2
   ENDIF 1
ENDIF Q
STORE T TO Accounting
ENDDO Accounting
