home *** CD-ROM | disk | FTP | other *** search
/ Software Du Jour / SoftwareDuJour.iso / BUSINESS / DBASE / DB2IOS.ARC / MAIN.SIG < prev    next >
Encoding:
Text File  |  1983-01-04  |  5.1 KB  |  142 lines

  1. * main.sig 08/18/83
  2. * main command program of inventory data base
  3. * get the drive letter from where we have hidden it
  4. * NOTE - in all cases label what the endif is the if for and
  5. * the enddo is the do for. saves a lot of time debugging.
  6. STORE CHR(PEEK(063))TO dr
  7. USE &dr.:sig/m INDEX &dr.:orders
  8. STORE t TO first
  9. * set up the forever loop for this data base
  10. DO WHILE t
  11.     * to speed things up - only change the parts of the
  12.     * screen that you have to
  13.     IF first
  14.         * if you want intensity - set intensity on here and off after endif first
  15.         * that way the data stands out.
  16.         * set up screen and prompts
  17.         ERASE
  18.         STORE '<F>orward, <B>ackward, <D>elete/Recall, <H>elp' TO prompt1
  19.         STORE '<S>earch, <M>aintenance, <P>rint, <V>oucher, <R>eports' TO prompt2
  20.         STORE '<A>dd, <E>dit, <Q>uit to main menu' TO prompt3
  21.         STORE 'Main Order Module ' TO mode
  22.         @  1,25 SAY mode
  23.         @  2, 0 SAY "+--------------------------------------"
  24.         @  2,39 SAY "----------------------------------------+"
  25.         @  3, 5 SAY "ORDER NUMBER:"
  26.         @  3,43 SAY "Complete:"
  27.         @  4, 8 SAY "Last name:"
  28.         @  4,46 SAY "First:"
  29.         @  5,10 SAY "Address:"
  30.         @  6, 9 SAY "(line 2):"
  31.         @  7, 9 SAY "(line 3):"
  32.         @  8,13 SAY "City:"
  33.         @  8,46 SAY "State:"
  34.         @  8,65 SAY "ZIP:"
  35.         @ 10, 2 SAY "Volumes:"
  36.         @ 12, 3 SAY "Amount:"
  37.         @ 12,46 SAY "Enter:"
  38.         @ 12,64 SAY "Ship:"
  39.         @ 13, 2 SAY "Remarks:"
  40.         @ 14, 2 SAY "Remarks:"
  41.         @ 16, 0 SAY "Backorder:"
  42.         @ 17,44 SAY "Catalog:"
  43.         @ 18, 2 SAY "Shipped:"
  44.         @ 18,26 SAY "Shipped:"
  45.         @ 18,62 SAY "Update:"
  46.         @ 19, 0 SAY "+--------------------------------------"
  47.         @ 19,39 SAY "----------------------------------------+"
  48.         @ 20,12 SAY prompt1
  49.         @ 21,12 SAY prompt2
  50.         @ 22,12 SAY prompt3
  51.     ENDIF first
  52.     STORE f TO first
  53.     STORE '?' TO command
  54.     * check if record marked for deletion
  55.     IF *
  56.         STORE 'Deleted' TO deleted
  57.     ELSE
  58.         STORE '       ' TO deleted
  59.     ENDIF *
  60.     @  1, 0 SAY deleted
  61.     @  3,19 SAY order
  62.     @  3,53 SAY comp
  63.     @  4,19 SAY lname
  64.     @  4,53 SAY fname
  65.     @  5,19 SAY addr1
  66.     @  6,19 SAY addr2
  67.     @  7,19 SAY addr3
  68.     @  8,19 SAY city
  69.     @  8,53 SAY state
  70.     @  8,70 SAY zip
  71.     @ 10,11 SAY vol1
  72.     @ 12,11 SAY amt using '$###.##'
  73.     @ 12,53 SAY entered
  74.     @ 12,70 SAY shipped
  75.     @ 13,11 SAY rem1
  76.     @ 14,11 SAY rem2
  77.     @ 16,11 SAY bo
  78.     @ 17,53 SAY catalog
  79.     @ 18,11 SAY bo:ship
  80.     @ 18,35 SAY bo2:ship
  81.     @ 18,70 SAY dayu
  82.     @ 22,56 SAY 'WHAT NEXT?'
  83.     @ 22,70 GET command PICTURE '!'
  84.     READ
  85.     CLEAR GETS
  86.     DO CASE
  87.         CASE command = 'A'
  88.             DO add.sig
  89.             * note the comma will go to last record as well as 'B'
  90.         CASE (command = 'B' .OR. command = ',')
  91.             * move backwards one record
  92.             SKIP -1
  93.         CASE command = 'D'
  94.             * switch the current record from deleted to recalled
  95.             IF *
  96.                 RECALL
  97.             ELSE
  98.                 DELETE
  99.             ENDIF
  100.         CASE command = 'E'
  101.             DO edit.sig
  102.             * note the period will go forward one record as well as F
  103.         CASE (command = 'F' .OR. command = '.')
  104.             * move forward one record
  105.             SKIP
  106.         CASE command = 'H'
  107.             * display a screen full of instructions
  108.             STORE t TO first
  109.             ERASE
  110.             @ 05,07 SAY 'This program works - or at least we have not yet been able'
  111.             @ 06,07 SAY 'to find major bugs, so let us assume YOU are doing something'
  112.             @ 07,07 SAY 'causing the problem. Before you call us, please try to solve it.'
  113.             @ 09,07 SAY 'Remember, the message above the top line tells you the '
  114.             @ 10,07 SAY 'program module you are in, and whether the file is marked'
  115.             @ 11,07 SAY 'for deletion (to actually delete you must also run the purge'
  116.             @ 12,07 SAY 'program on the maintenance menu.) The material below the '
  117.             @ 13,07 SAY 'bottom line tells you what choice of action you have. They'
  118.             @ 14,07 SAY 'are logical and only one of the listed options will work.'
  119.             @ 15,07 SAY '(Other than a few built in aids, such as a period advancing'
  120.             @ 16,07 SAY 'one record, a comma going back one and a "Q" as an exit'
  121.             @ 17,07 SAY 'from a menu with letter options.)    SO..........'
  122.             @ 19,07 SAY 'Relax for a few minutes - and try again!'
  123.             @ 22,20 SAY 'Hit RETURN to Continue '
  124.             SET CONSOLE OFF
  125.             WAIT
  126.             SET CONSOLE ON
  127.         CASE command = 'M'
  128.             DO maintain.sig
  129.         CASE command = 'P'
  130.             DO print.sig
  131.         CASE command = 'Q'
  132.             RELEASE ALL
  133.             DO menu.sig
  134.         CASE command = 'R'
  135.             DO report.sig
  136.         CASE command = 'S'
  137.             DO search.sig
  138.         CASE command = 'V'
  139.             DO voucher.sig
  140.     ENDCASE
  141. ENDDO while t
  142.