home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr4.zip
/
FCATTEND.CMD
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
6KB
|
178 lines
* Program FCATTEND - Attendance Marking, Check Lists
Select Primary
Store d+':members' to MFILE
USE &MFILE index &MFILE
Store T to LEVEL3
Store T to undated
STORE F TO FCATTD
Store "ALL" to ANAME1
Store 'ANAME1' to ANAME
Release LEVEL1,cxname,VALIDD,level2,cyearcon
Do while LEVEL3
Erase
@ 2,12 say 'Full Church Attendance Marking, Reports 2-9-/FCATTEND/'
IF .NOT. UNDATED
@ 4,62 SAY 'WEEK: '+WEEKNAME
ENDIF
@ 5,9 say '1) Active Attenders Check List'
@ 6,9 say '2) Add new people'
@ 7,9 say '3) Mark Attendance - all attenders'
@ 8,9 say '4) NEWLY-ACTIVES List'
@ 9,9 say '5) NEWLY-INACTIVES List '
@ 10,9 say '6) 1ST TIMERS List'
@ 11,9 say '7) 1ST TIMERS, Mailing Labels'
@ 12,9 say '8) Attendance Report - year-to-date'
@ 13,9 say '9) Set up Attendance Marks for a New Year'
?
Accept ' Enter selection ' to NSEL
IF !(nsel)='Q'
RETURN
endif
Select secondary
USE MDIRFILE index MDIRFILE
STORE "$(MEMBSTATUS,2,1)='*' " TO BNAM
Select primary
STORE F TO VALID3
If (nsel='2'.or.nsel='3'.or.nsel='4'.or.NSEL='5'.or.NSEL='6'.or.NSEL='7' ;
.or.NSEL='1') .and. undated
Do MATTDATE.CMD
Store F to undated
endif
Store 'ALL' to ANAME1
Store 'ANAME1' to aname
Store ' ' to fcolhdr
Store 'fcolhdr' to fcolumn
Store val($(nsel,1,1)) to N
If N>0 .and. N<10
Store T to invalid3
Store CHNAME to actvnam
Set intensity off
Select primary
endif
Select primary
Do while .NOT. valid3
Store T to valid3
Do CASE
CASE NSEL = '1'
Store BNAM+".or. $(membstatus,8,1)='*'" to BNAME
Store "$(membstatus,7,2)+' '+$(ssscattd,curwk5,6)" to fcolumn
Store "Attendance" to fcolhdr
Store actvnam+' Attendance Checker ' to actvname
? ' ',actvname
Do MONELINE.CMD
CASE NSEL = '3'
Store BNAM+".or. $(membstatus,8,1)='*'" to BNAME
Store actvnam to actvname
Do MSSATTND.CMD
CASE NSEL = '2'
* Enter MUPADD with a flag set for '1N' in MEMBSTATUS,7,2.
Store 'SCFUL' to MSEL
Store d+':MEMBERS ' to MFILE
Use &MFILE index &MFILE
Store ' ' to eselect
Store ' ' to xaddress
Store ' ' to xcityst
Store ' ' to xzip
Store ' ' to xfamcode
Store ' ' to homephone
Store ' ' to lastname
Store ' ' to firstname
Do MUPADD.CMD
Release eselect,lastname,firstname,xaddress,xcityst,xzip,xfamcode,homephone
Store d+':SCMEMBRS.NDX' to MFILENDX
Set console off
delete file &MFILENDX
Store d+':OFFERNDX.NDX' to MFILENDX
delete file &MFILENDX
Set console on
Release lastname,firstname,xaddress,xcityst,xzip,xfamcode,homephone
Release eselect,aname,aname1,inhh,inh1,inh2,fcode9,matching,match,curwk
Release lastcod,lastcode,firstcode,curfnum,addedrec,lastnam,locating
Release waraddr,invalcc,inhhc,curfnumb,valid1
CASE NSEL = '4'
Store actvnam+' NEWLY-ACTIVES list ' to actvname
Store BNAM+" .or. $(membstatus,8,1)<>'X' " to BNAME
? ' ',actvname
Do MONELINE.CMD
CASE NSEL = '5'
Store actvnam+' NEWLY-INACTIVES list ' to actvname
Store BNAM+".or.($(membstatus,7,1)<>'I')" to BNAME
? 'Now printing ',actvname
Do MONELINE.CMD
CASE NSEL = '6'
Store actvnam+' 1ST TIME VISITORS ' TO ACTVNAME
Store BNAM+".or. $(membstatus,7,2)<>'1N'" to BNAME
? ' ',actvname
Do MONELINE.CMD
CASE NSEL='7'
Store MFILE+' index '+MFILE to SPFILE
?
? ' Mailing Labels - - 1ST TIME VISITORS'
?
Store BNAM+".or. $(membstatus,7,2)<>'1N'" to BNAME
Do MSPFMAIL.CMD
Select secondary
Use MDIRFILE index MDIRFILE
Select primary
Use &MFILE index &MFILE
CASE NSEL = '8'
Store actvnam+' Attendance to date ' to actvname
? ' ',actvname
Do MATTYEAR.CMD
Store 'BNAM' to bname
CASE NSEL='9'
Accept 'Enter the last week number in the year just past [52/53] ' to XX
Store val(XX)+1 to xnum
If xnum=53.or.xnum=54
? 'Now setting up attendance markings for next year.'
Store 0 to curnum
Store 0 to curr
Do while .not. EOF .and. (&ANAME=ANAME1)
Replace ssscattd with $(ssscattd,xnum,5)
SKIP
Store curr+1 to curr
If curr=20
Store 20+curnum to curnum
? curnum,' records processed.'
Store 0 to curr
endif
enddo
Store curnum+curr to curnum
? curnum,' records processed.'
else
Accept 'Invalid week number (52 or 53). Press <retn> ' to XX
endif
Release xnum,curr,curnum
CASE !(NSEL) = 'Q'
Release undated,fcattd,aname,aname1,bnam,valid3,curwk5,n,invalid3,actvnam
Release bname,actvname,curwk,weekname
Store T to level2
STORE F TO LEVEL3
Store chname to cxname
OTHERWISE
Accept 'Illegal selection. Please enter again ' to NSEL
Store F to validd1
ENDCASE
ENDDO
If NSEL='1'.or.NSEL='4'.or.NSEL='5'.OR.NSEL='6'.OR.NSEL='7'.OR.NSEL='8'.or. ;
NSEL='9'
?
ACCEPT 'Processing is complete. Press <RETURN> to exit.' to XX
endif
ENDDO
Release undated,nsel,ins,curweek,weekname,N,fcattd,curwk5,actvnam,curwk
Select secondary
Use
Select primary
USE
RETURN
SE NSEL = '3'
Store BNAM+".or. $(membstatus,8,1)='*'" to BNAME
Store actvnam to actvname
Do MSSATTND.CMD
CASE NSEL = '2'
* Enter MUPADD with a flag set for '1N' in MEMBSTATUS,7,2.