home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr4.zip
/
MUPCHNG.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
4KB
|
132 lines
* Program MUPCHNG - Allows changing a person's record on MEMBERS file
Store T to EDITING
If !(ESEL) = 'D'
Store ' Deleting' to DELED
else
If !(ESEL) = 'J'
Store 'Making small church inactive' to DELED
else
If !(ESEL) = 'I'
Store 'Making full-church inactive' to DELED
else
Store ' Editing' to DELED
endif
endif
endif
Do while EDITING
? ' '
? DELED," a person's record on MEMBERS file. "
If FAUPDATE='Y'
?? ' FAMILY ADDRESS UPDATING'
endif
? ' '
? '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'
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' .and. !(esel)='S'
Replace membstatus with $(membstatus,1,8)+'x'+$(membstatus,10,1)
? "The above person's record has now been marked 'SPECIAL.'"
Store F to matching
CASE !(XSELECT) = 'Y' .AND. !(ESEL)='D'
DELETE
? "The above person's record has now been deleted."
Store ' ' to calling
Store F to Matching
CASE !(XSELECT)='Y' .AND. !(ESEL) = 'I'
Replace membstatus with $(MEMBSTATUS,1,1)+'*'+$(MEMBSTATUS,3,8)
? "The above person's record has now been made full-church inactive."
Store ' ' to calling
Store $(dates,1,5)+indate to dates
Store F to matching
CASE !(XSELECT)='Y' .AND. !(ESEL) = 'J'
Replace ss:sc:memb with $(ss:sc:memb,1,4)+"*"
? "The above person's record has now been made Small Church inactive."
Store F to matching
CASE !(XSELECT)='Y' .AND. !(ESEL) = 'P'
Replace calling with $(indate,3,2)+'\'+$(indate,1,2)+'\'+$(date(),4,2)
? "The above person's record now has today's date for pastoral call."
Store F to matching
CASE !(XSELECT)='Y' .and. !(ESEL)<>'I' .and. !(ESEL)<>'J'
* Go edit current record
Release INHH,INLN,INFN,MATCHINGL,NXTMATCH,PMATCHING
Do MUPEDIT.CMD
Store F to MATCHING
CASE !(XSELECT) = 'N'
Store F to MATCH
SKIP
OTHERWISE
Accept 'Invalid entry. Please enter again: ' to XSELECT
STORE T TO INVALCC
ENDCASE
enddo
endif
enddo * (MATCHING)
endif
ENDDO
RETURN