home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / chrchpr2.zip / CSECHECK.CMD < prev    next >
OS/2 REXX Batch file  |  1987-01-06  |  3KB  |  107 lines

  1. * Program CSECHECK - Allows changing a person's record on MEMBERSE file
  2. Select primary
  3. Store F to found
  4. Store T to editing
  5. Do while editing
  6. * ?
  7. * ? DELED," a person's record on the MEMBERSE file."
  8.   ? 'Enter LAST NAME (3 characters) and FIRST NAME (2 characters) '
  9.   Accept '  Name code ' to INHH
  10.   Store T to invalcc
  11.   Do while invalcc
  12.     If (len(INHH) = 1 .and. !(INHH) = 'Q').or.' '=inhh
  13.       Store F to EDITING
  14.       Store F to invalcc
  15.       return
  16.     else
  17.       If len(INHH) <> 5
  18.   Accept 'Invalid entry - must be 5 characters. Please re-enter ' to INHH
  19.       else
  20.        Store !($(INHH,1,1))+$(INHH,2,2) to INLN
  21.        Store !($(INHH,4,1))+$(INHH,5,1) to INFN
  22.        Store F to invalcc
  23.       endif
  24.     endif
  25.   enddo
  26.   ? 'Matching '+trim(INLN)+'..., '+trim(INFN)+'...'
  27.   Store F to MATCH
  28.   Store T to MATCHINGL
  29.   Store T to MATCHING
  30.   FIND &INLN
  31.   If # = 0
  32.     Accept 'No match. Press <retn> to continue. ' to XX
  33.   else
  34.     Do while MATCHING
  35.       Store T to PMATCHING
  36.       Do while PMATCHING *(partial matching)
  37. * Advance a record if current record is marked deleted.
  38.         Store T to NXTMATCH
  39.         Do while NXTMATCH
  40.           If EOF .or. $(last:name,1,3) <> INLN
  41.             ? 'No match. '
  42.             Store F to MATCHINGL
  43.             Store F to MATCHING
  44.             Store F to PMATCHING
  45.             Store F to NXTMATCH
  46.             Store F to MATCH
  47.           else
  48.            If *
  49.              SKIP
  50.            else
  51.              Store F to NXTMATCH
  52.            endif
  53.           endif
  54.         enddo
  55.         If MATCHINGL
  56.           If $(FIRST:NAME,1,2) = INFN
  57.             Store T to MATCH
  58.             Store F to PMATCHING
  59.           else
  60.           If .NOT. EOF
  61.            SKIP
  62.           endif
  63.         endif
  64.       endif
  65.       enddo  *(PMATCHING)
  66.       If MATCH
  67.         ? ' Name: '+trim(first:name)+' '+trim(last:name)+'  Phone: '+home:phone
  68.         Accept 'Is this the right name and phone? [Y/N] ' to XSELECT
  69.         Store T to invalcc
  70.         Do while invalcc
  71.           STORE F TO INVALCC
  72.           Do case
  73.             CASE !(XSELECT) = 'Q'
  74.               STORE F TO MATCHING
  75.             CASE !(XSELECT) = 'Y'
  76.               Store T to found
  77.               Store F to Matching
  78.               Store F to editing
  79.             CASE !(XSELECT) = 'N'
  80.               SKIP
  81.             OTHERWISE
  82.               Accept 'Invalid entry. Please enter again: ' to XSELECT
  83.               STORE T TO INVALCC
  84.             ENDCASE
  85.           enddo
  86.         endif
  87.       enddo    * (MATCHING)
  88.     endif
  89.   enddo
  90. Release editing,invalcc,inhh,inln,infn,matchingl,matching,pmatching,nxtmatch
  91. Release match,xselect
  92. RETURN
  93.  
  94. CHING
  95.           else
  96.           If .NOT. EOF
  97.            SKIP
  98.           endif
  99.         endif
  100.       endif
  101.       enddo  *(PMATCHING)
  102.       If MATCH
  103.         ? ' Name: '+trim(first:name)+' '+trim(last:name)+'  Phone: '+home:phone
  104.         Accept 'Is this the right name and phone? [Y/N] ' to XSELECT
  105.         Store T to invalcc
  106.         Do while invalcc
  107.           STORE F TO IN