home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr2.zip
/
CSECHECK.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
3KB
|
107 lines
* Program CSECHECK - Allows changing a person's record on MEMBERSE file
Select primary
Store F to found
Store T to editing
Do while editing
* ?
* ? DELED," a person's record on the MEMBERSE file."
? 'Enter LAST NAME (3 characters) and FIRST NAME (2 characters) '
Accept ' Name code ' to INHH
Store T to invalcc
Do while invalcc
If (len(INHH) = 1 .and. !(INHH) = 'Q').or.' '=inhh
Store F to EDITING
Store F to invalcc
return
else
If len(INHH) <> 5
Accept 'Invalid entry - must be 5 characters. Please re-enter ' to INHH
else
Store !($(INHH,1,1))+$(INHH,2,2) to INLN
Store !($(INHH,4,1))+$(INHH,5,1) to INFN
Store F to invalcc
endif
endif
enddo
? 'Matching '+trim(INLN)+'..., '+trim(INFN)+'...'
Store F to MATCH
Store T to MATCHINGL
Store T to MATCHING
FIND &INLN
If # = 0
Accept 'No match. Press <retn> to continue. ' to XX
else
Do while MATCHING
Store T to PMATCHING
Do while PMATCHING *(partial matching)
* Advance a record if current record is marked deleted.
Store T to NXTMATCH
Do while NXTMATCH
If EOF .or. $(last:name,1,3) <> INLN
? 'No match. '
Store F to MATCHINGL
Store F to MATCHING
Store F to PMATCHING
Store F to NXTMATCH
Store F to MATCH
else
If *
SKIP
else
Store F to NXTMATCH
endif
endif
enddo
If MATCHINGL
If $(FIRST:NAME,1,2) = INFN
Store T to MATCH
Store F to PMATCHING
else
If .NOT. EOF
SKIP
endif
endif
endif
enddo *(PMATCHING)
If MATCH
? ' Name: '+trim(first:name)+' '+trim(last:name)+' Phone: '+home:phone
Accept 'Is this the right name and phone? [Y/N] ' to XSELECT
Store T to invalcc
Do while invalcc
STORE F TO INVALCC
Do case
CASE !(XSELECT) = 'Q'
STORE F TO MATCHING
CASE !(XSELECT) = 'Y'
Store T to found
Store F to Matching
Store F to editing
CASE !(XSELECT) = 'N'
SKIP
OTHERWISE
Accept 'Invalid entry. Please enter again: ' to XSELECT
STORE T TO INVALCC
ENDCASE
enddo
endif
enddo * (MATCHING)
endif
enddo
Release editing,invalcc,inhh,inln,infn,matchingl,matching,pmatching,nxtmatch
Release match,xselect
RETURN
CHING
else
If .NOT. EOF
SKIP
endif
endif
endif
enddo *(PMATCHING)
If MATCH
? ' Name: '+trim(first:name)+' '+trim(last:name)+' Phone: '+home:phone
Accept 'Is this the right name and phone? [Y/N] ' to XSELECT
Store T to invalcc
Do while invalcc
STORE F TO IN