home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / chrchpr3.zip / CPRUPDAT.CMD < prev    next >
OS/2 REXX Batch file  |  1991-01-21  |  3KB  |  92 lines

  1. * Program CPRUPDAT - Allows entry/editing of property items
  2. Store T to level3
  3. Set colon on
  4. Set bell on
  5. Store d+':CPRLOCAT' to MFILE1
  6. Store T to initial
  7. Use &MFILE index &MFILE,&MFILE1
  8. Do while LEVEL3
  9.   If .not. initial
  10.     Erase
  11.     @ 18,20 say 'Property Update Routine                      1-/CPRUPDAT/'
  12.   endif
  13.   @ 20,4 say ;
  14.   'This routine allows adding and changing records in the CPROPRTY file.'
  15.   ?
  16.   ? '      Select:  [A]dd an entry             [C]hange an item'
  17.   Accept '               [D]elete an item           [Q]uit          ' to esel
  18.   ?
  19.   Store F to initial
  20.   Store F to DO:EDIT
  21.   Store T to inval2
  22.   Do while inval2
  23.     Store F to inval2
  24.     Do CASE
  25.     CASE !(ESEL)='A'
  26.       Append blank
  27.       Store T to DO:EDIT
  28.     CASE !(esel)='C' .or. !(esel)='D'
  29.      If len(esel)>1
  30.        Store len(esel)-1 to lenxx
  31.        Store val($(esel,2,lenxx)) to I
  32.        ? 'Going to record',I
  33.        GOTO I
  34.      else
  35.       Accept 'Enter property item number' to XX
  36.       GOTO &XX
  37.      endif
  38.       If #=0
  39.         Accept 'Cannot fine XX' to XX
  40.       else
  41.         If !(esel)='D'
  42.           ? '#',str(#,4),iname,itype,ilocation
  43.           Accept 'OK to DELETE this item? ' to XX
  44.           If !(XX)='Y'
  45.             DELETE
  46.             ? iname,itype,' is deleted.'
  47.             Replace iname with '`'+iname
  48.           else
  49.             ? 'Not deleted.'
  50.           endif
  51.         else
  52.           Store T to DO:EDIT
  53.         endif
  54.       endif
  55.     CASE !(ESEL)='Q'
  56.       Store F to LEVEL3
  57.     otherwise
  58.       Accept 'Invalid entry. Please enter again' to ESEL
  59.       Store T to inval2
  60.     endcase
  61.     enddo
  62.     If DO:EDIT
  63.       Set intensity on
  64.       ERASE
  65.       @ 1,1 say MFILE
  66.       @ 1,62 say 'Record number'+str(#,5)
  67.       @ 2,20 say chname+' property items editing.'
  68.       @ 5,4 say  'item      ' get iname
  69.       @ 6,4 say  'type      ' get itype
  70.       @ 7,4  say 'location  ' get ilocation
  71.       @ 8,4  say 'cost      ' get icost
  72.       @ 9,4  say 'value     ' get ivalue
  73.       @ 10,4 say 'status    ' get status
  74.       @ 5,40 say 'used by          ' get used:by
  75.       @ 6,40 say 'received by      ' get recvd:by
  76.       @ 7,40 say 'date obtained    ' get indate
  77.       @ 8,40 say 'brand            ' get ibrand
  78.       @ 9,40 say 'next service date' get servdate
  79.       @ 10,40 say 'checked out      ' get chkd:out
  80.       ?
  81.       ? '                 Press <ctrl-W> when complete.'
  82.       ReAD
  83.       Set intensity off
  84.     endif
  85.   enddo
  86. USE
  87. Set colon off
  88. Set bell off
  89. RETURN
  90.  
  91. OTO &XX
  92.      endi+C-3  Hill           Sherrie       ,C-3  Holmberg       Bert          -C-3  Josephson      Carrie        .C-3  Keller         Jim           /C-3  Kiefer         Carla         0C-3  Kuhn           Helen         1C-3  Larpenter      Diane         6C-3  Lehman         Barrett       7C-3  Lester         Andrew        8C-3  Lincoln        Rhonda        9C-3  MacArthur      Pearl         :C-3  Maravich       Gene           C-3 *Barry          Alice          C-3 *Baxter