home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / pssst.zip / PSINPUTS.PRG < prev    next >
Text File  |  1986-08-14  |  3KB  |  99 lines

  1. * PSINPUTS.PRG
  2. *
  3. * PUTS new entries into SUSPENSE.PRG
  4. * A DBASE II 16BIT COMMAND FILE to allow input of new entries to
  5. * SUSPENSE file.  Returns to PSJOBTRK.PRG for other suspense options.
  6. *
  7. * Version 1
  8. * By LTC Denny Hugg
  9. * ANGSC/DOS Andrews AFB MD 16 Jul 1985
  10. *
  11. * Version 2  
  12. * modified by Maj Jim McMurry
  13. * ANGSC/DOSC Truax Field, WI 15 Jun 1986
  14. *
  15. ERASE
  16. USE &gsusfile INDEX &gsusindex, &gpryindex
  17. *  BEGIN PREPARATIONS FOR ENTRY OF DATA.
  18. *
  19. DO WHILE T
  20.    ERASE
  21.    APPEND BLANK
  22.    STORE 'INPUT SUSPENSE ITEMS' TO heading
  23.    DO PSHEADING
  24.    @ 22,79 SAY '                        Enter A Blank Description To Exit'
  25.    REPLACE in:date WITH gdate
  26.    @  0, 0 SAY gcuron
  27.    @  5, 0 SAY 'Description ';
  28.            GET  descrip PICTURE;
  29.            '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
  30.    READ
  31.    @  0, 0 SAY gcuroff
  32.    @ 22,79 SAY gclearline
  33.    IF $(descrip,1,3)= '   '
  34.       ERASE
  35.       STORE 10 TO line
  36.       STORE 'No Description Entered ... Reorganizing And Moving On' TO prompt
  37.       DO PSPROMPT
  38.       DELETE
  39.       * --- the pack will recreate the index files from scratch
  40.       * --- we need this periodic mx even if he doesn't add a record
  41.       PACK
  42.       USE
  43.       RELEASE ALL EXCEPT g*
  44.       RETURN
  45.    ENDIF
  46.    * --- test descrip for presence of a semi-colon then get rid of it
  47.    * --- by replacing it with a space.  semi-colons really screw up the
  48.    * --- printouts, so it's worth the time.
  49.    * --- trap out a semi-colon in the last column
  50.    IF $(descrip,55,1) = ';'
  51.       STORE $(descrip,1,54) TO half1
  52.       REPLACE descrip WITH half1
  53.    ENDIF
  54.    * --- trap out a semi-colon in the first column
  55.    IF $(descrip,1,1) = ';'
  56.       STORE $(descrip,2,55) TO half1
  57.       REPLACE descrip WITH half1
  58.    ENDIF
  59.    * --- trap out any semi-colons in between
  60.    STORE 1 TO pointer
  61.    DO WHILE pointer < 56
  62.       IF $(descrip,pointer,1) = ';'
  63.          STORE $(descrip,1,pointer-1) TO half1
  64.          STORE $(descrip,pointer+1,55-pointer) TO half2
  65.          REPLACE descrip WITH half1 + ' ' + half2
  66.       ENDIF
  67.       STORE pointer + 1 TO pointer
  68.    ENDDO
  69.    @  0, 0 SAY gcuron
  70.    @  5,11 SAY ': ' + descrip
  71.    @  7, 1 SAY 'Origin ';
  72.            GET  origin picture '!!!!!!!!'
  73.    @  7,29 SAY 'Priority  .'
  74.    @  7,38 GET  priority PICTURE '9.99'
  75.    @  7,53 SAY 'Date Received   /  /'
  76.    @  7,67 GET  in:date PICTURE '99/99/99'
  77.    @  9, 4 SAY 'Due   /  /'
  78.    @  9, 8 GET  duedate PICTURE '99/99/99'
  79.    @  9,34 SAY 'OPR ';
  80.            GET  opr PICTURE '!!!!'
  81.    @  9,57 SAY 'Phone    -   -'
  82.    @  9,63 GET  phone PICTURE '999-999-9999'
  83.    @ 11, 0 SAY 'Remarks ';
  84.            GET  rem1
  85.    @ 12, 8 GET  rem2
  86.    READ
  87.    @  0, 0 SAY gcuroff
  88.    * --- put the 0's in the priority if necessary
  89.    STORE TRIM(priority) TO mpriority
  90.    IF mpriority = ' .'
  91.       REPLACE priority WITH '0.00'
  92.    ELSE
  93.       STORE '00' TO zeros
  94.       STORE mpriority + $(zeros,1,4-LEN(mpriority)) TO mpriority
  95.       REPLACE priority WITH mpriority
  96.    ENDIF
  97. ENDDO T
  98. * --- EOF PSINPUTS.PRG
  99.