home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr4.zip
/
MSSATTND.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
3KB
|
116 lines
* Program MSSATTND - Marks SSSCATTD field with this week's attendance
Set bell off
Select primary
Store curwk-1 to curwk1
Store curwk+1 to curwk2
Store 59-curwk to curwk3
Store curwk-3 to curwk4
Store curwk-5 to curwk5
Do while (* .or. &BNAME) .and. .not. EOF
SKIP
enddo
sTORE 0 TO ATTCOUNT
Do while .not. EOF .and. &ANAME=ANAME1
Erase
@ 1,10 say 'Attendance Marking for '+actvname+' Week '+weekname
Store 2 to LINECNTR
Do while LINECNTR<22 .and. &ANAME=ANAME1 .and. .not. EOF
Store linecntr+1 to linecntr
Store $(ssscattd,curwk,1) to NMC
Store $(membstatus,7,1) to N1
Store $(membstatus,8,1) to N2
If N2='X'
Store ' ' to N2
Replace membstatus with $(membstatus,1,7)+' '+$(membstatus,9,2)
endif
Store ' ' to NMCX
If NMC<>' '
Store 'X' to NMCX
endif
@ linecntr,1 say N1+N2
@ linecntr,4 say $(ssscattd,curwk5,5)
@ linecntr,11 get NMC
@ linecntr,16 say last:name+first:name+home:phone
READ
Do case
CASE !(NMC)='Q'
goto top
RETURN
CASE NMC='!'
Store $(membstatus,8,1) to N2
Store trim(last:name)+', '+trim(first:name) to tname
If len(tname)>21
Store $(tname,1,21) to tname
endif
@ linecntr,1 say XX+XX
@ linecntr,1 say 'New Counter' get N1
@ linecntr,17 say 'Active Status' get N2
@ linecntr,36 say "Today's Attendance" get NMC
@ linecntr,58 say tname
READ
If N1<>$(membstatus,7,1) .or. N2<>$(membstatus,8,1)
Replace membstatus with $(membstatus,1,6)+N1+N2+$(membstatus,9,2)
endif
CASE NMC<>' '
Store 'X' to NMC
otherwise
endcase
If N1='I'
If !(N2)<>'A'
Replace membstatus with $(membstatus,1,6)+' *'+$(membstatus,9,2)
Replace ss:sc:memb with $(ss:sc:memb,1,4)+'*'
Store '*' to N2
else
Replace membstatus with $(membstatus,1,6)+' A'+$(membstatus,9,2)
endif
endif
If NMC=' '
If $(ssscattd,curwk4,2)=' '
If N2=' '
Replace membstatus with $(membstatus,1,6)+'I '+$(membstatus,9,2)
else
if N2='N'
Replace membstatus with $(membstatus,1,1)+'*'+$(membstatus,4,2)+' *'
endif
endif
endif
else
STORE ATTCOUNT+1 TO ATTCOUNT
If N2='N'
Store curwk5 to N
Store 0 to attdcnt
Do while N<curwk
If $(ssscattd,N,1)='X'
Store attdcnt+1 to attdcnt
endif
Store N+1 to N
enddo
If attdcnt>1
Replace membstatus with $(membstatus,1,6)+' X'+$(membstatus,9,2)
else
Store val($(membstatus,7,1))+1 to NMCNT
Replace membstatus with $(membstatus,1,6)+str(NMCNT,1)+$(membstatus,8,3)
endif
endif
endif
If NMC<>NMCX
Replace SSSCATTD with $(SSSCATTD,1,curwk1)+NMC+$(ssscattd,curwk2,curwk3)
endif
SKIP
Do while (* .or. &BNAME) .and. .not. EOF
SKIP
enddo
enddo
If .not. (EOF .or. &ANAME<>ANAME1)
Accept ' Press <retn> to advance to next screen of names.' to XX
endif
enddo
Release NMC,LC,LINECNTR,LINX,curtop,curbotm,curwk1,curwk2,ins,curweek,nmcnt
Release curdatey,attdcnt,curwk3,curwk4,curwk5,nmcx,n1,n2,n,tname
? ' Attendance marking is complete. Total marked present = ',str(attcount,4)
?
Release attcount
Accept ' Press <retn> to exit.' to XX
Set bell on
Return