home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr4.zip
/
SCATTEND.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
7KB
|
231 lines
* Program SCATTEND - Attendance Marking, Check Lists
Select secondary
Use MDIRFILE index MDIRFILE
Select Primary
Store d+':members' to MFILE
Store d+':SCMEMBRS.NDX' to MFILENDX
If .not. FILE(MFILENDX)
Use &MFILE
? 'File',MFILENDX,'not found. Now indexing MEMBERS file to create it.'
Set talk on
Index on ss:sc:memb+last:name+first:name to &MFILENDX
Set talk off
endif
USE &MFILE index &MFILENDX
Release LEVEL1,LEVEL2,cyearcon,invalidd
Store T to LEVEL3
Store T to undated
STORE F TO FCATTD
Do while LEVEL3
Erase
@ 1,1 say chname
@ 1,60 say curdate
@ 2,1 say 'DATA DISK = '+D
@ 3,15 say 'Small Church Attendance Marking, Reports'
@ 3,64 say '3-4-/SCATTEND/'
IF .NOT. UNDATED
@ 4,64 SAY 'WEEK: '+WEEKNAME
ENDIF
@ 5,9 say '1) Small Church MONTHLY Attendance Check Lists'
@ 6,9 say '2) Small Church WEEKLY Attendance Check Lists'
@ 7,9 say '3) Mark Attendance, by Small Church'
@ 8,9 say '4) Add New People'
@ 9,9 say '5) NEWLY-ACTIVES List'
@ 10,9 say '6) NEWLY-INACTIVES List '
@ 11,9 say '7) 1ST TIMERS List'
@ 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'
Release MFILENDX,XX,N,BNAM,FCOLHDR,FCOLUMN,ANAME1,ANAME,INVALID3,INS,ACTVNAM
Release curwk5,curweek
Release ACTVNAME,BNAME,LEVEL3,UNDATED,FCATTD,NSEL,MFILE,valid3,weekname
Store T to LEVEL2
Store F to invalidd
STORE '4' to msel
RETURN
endif
STORE F TO VALID3
If (nsel='2'.or.nsel='3'.or.nsel='4'.or.NSEL='5'.or.NSEL='6'.or.NSEL='7') ;
.and. undated
Do mattdate.cmd
Store F to undated
endif
Store "$(membstatus,2,1)='*' .or. $(ss:sc:memb,5,1)='*' " to BNAM
Store ' ' to fcolhdr
Store 'fcolhdr' to fcolumn
Store val($(nsel,1,1)) to N
If N>1 .and. N<10
Select secondary
?
Accept 'Enter Small Church code ' to ANAME1
If aname1=' ' .or. !(aname1)='Q'
Store T to valid3
else
Store 'SS:SC:MEMB' to ANAME
Store T to invalid3
If NSEL='1' .and. !(ANAME1)='ALL'
Store 'SSSC=' to insssc
Find &INSSSC
If #=0
Accept 'No S.C. section in MDIRFILE. It must be rebuilt. Press <retn> ' to XX
RETURN
endif
Store $(spact,6,4) to spactiv
Store 'ALL' to INS
Store ' ' to actvnam
SKIP
Store F to invalid3
else
Do while invalid3
Store 'SSSC='+ANAME1 to INS
If !(ANAME1)='Q'
USE
Select primary
Return
endif
Find &INS
If #=0
Accept 'Invalid entry. Please enter again ' to ANAME1
else
Store F to invalid3
endif
enddo
Store trim($(spact,10,20)) to actvnam
Set intensity off
Select primary
Find &ANAME1
IF #=0
Accept 'No names found with this S.C.code. Press <retn> to exit.' to XX
STORE T TO VALID3
endif
endif
Release INS,invalid3
endif
endif
Select primary
Do while .NOT. valid3
Store T to valid3
Do CASE
CASE NSEL = '1'
ACCEPT 'Does the MSCROST file have the latest updates from MEMBERS?' to XX
If !(XX)<>'Y'
Do MGSCROST.CMD
endif
Store actvnam to actvname
Do SCATTD.CMD
Release N,XX,spactiv
CASE NSEL = '2'
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
Release curwk5,nn,na,np,nd,xx
CASE NSEL = '3'
Store BNAM+".or. $(membstatus,8,1)='*'" to BNAME
Store actvnam to actvname
Do MSSATTND.CMD
CASE NSEL = '4'
* Enter MUPADD with a flag set for '1N' in MEMBSTATUS,7,2.
Store 'SCATT' 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
Store d+':SCMEMBRS.NDX' to MFILENDX
Set console off
delete file &MFILENDX
Store d+':OFFERNDX.NDX' to MFILENDX
delete file &MFILENDX
Release lastname,firstname,xaddress,xcityst,xzip,xfamcode,homephone
Release eselect,aname,inhh,inh1,inh2,fcode9,matching,match,curwk
Release lastcod,lastcode,firstcode,curfnum,addedrec,lastnam,locating
Release waraddr,inhhc,c2inhh,curfnumb,invalcc,valid1,curwk5,N,
Set console on
Select secondary
Use mdirfile index mdirfile
Select primary
Use &MFILE
? 'Now re-indexing the MEMBERS file by SS:SC:MEMB producing SCMEMBRS.NDX.'
Set talk on
Index on ss:sc:memb+last:name+first:name to &MFILENDX
Set talk off
Use &MFILE index &MFILENDX
CASE NSEL = '5'
Store actvnam+' NEWLY-ACTIVES list ' to actvname
Store BNAM+" .or. $(membstatus,8,1)<>'X' " to BNAME
? ' ',actvname
Do MONELINE.cmd
CASE NSEL = '6'
Store actvnam+' NEWLY-INACTIVES list ' to actvname
Store BNAM+".or.($(membstatus,7,1)<>'I')" to BNAME
? ' ',actvname
Do MONELINE.cmd
CASE NSEL = '7'
Store actvnam+' 1ST TIME VISITORS ' TO ACTVNAME
Store BNAM+".or. $(membstatus,7,2)<>'1N'" to BNAME
? ' ',actvname
Do MONELINE.CMD
CASE NSEL = '8'
Store actvnam+' Attendance to date ' to actvname
? 'Now printing ',ACTVNAME
Do MATTYEAR.CMD
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'
STORE F TO LEVEL3
OTHERWISE
Accept 'Illegal selection. Please enter again ' to NSEL
Store F to validd1
ENDCASE
ENDDO
If NSEL='2'.or.NSEL='5'.OR.NSEL='6'.OR.NSEL='7'.OR.NSEL='8'
?
ACCEPT 'Processing is complete. Press <RETURN> to exit.' to XX
endif
ENDDO
Release undated,nsel,ins,curweek,weekname,N,fcattd,curwk5,actvnam,curwk
Release MFILE,mfilendx,level3,fcattd
Select secondary
Use
Select primary
USE
RETURN
STORE T TO VALID3
endif
endif
Release INS,invalid3
endif
endif
Select prima