home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr2.zip
/
CSEREPTS.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
7KB
|
232 lines
* Program CSEREPTS - Gives reports of all Church Special Event Categories
Store T to LEVEL3
Do while LEVEL3
Erase
@ 0,1 say ename
@ 0,60 say curdate
@ 1,1 say 'DATA DISK = '+D
@ 2,21 say 'CHURCH SPECIAL EVENT REPORTS 3-7-/CSEREPTS/'
@ 4,16 say '1) Full-Information Report'
@ 5,16 say '2) Two-line Report'
@ 6,16 say '3) Mailing Labels'
@ 7,16 say '4) Financial Summary'
@ 8,16 say '5) Lodgings'
@ 9,16 say '6) Sessions'
@ 10,16 say '7) Transportation'
?
Accept ' Enter selection ' to MSEL
?
Select primary
Store F to validd1
Do while .NOT. validd1
Store T to validd1
Do CASE
CASE MSEL = '1'
GOTO TOP
Set format to print
Store 99 to curline
Store 0 to pag
Do while .not. EOF
If curline>58
If curline<>99
Eject
endif
Store pag+1 to pag
@ 1,10 say ename
@ 1,55 say curdate+' Page'+str(pag,3)
Store 4 to curline
endif
Store trim(last:name)+', '+trim(first:name) to names
If len(names)>30
Store $(names,1,30)+'_' to names
endif
@ curline,0 say 'TRANSP: '+transpor+' LODGING: '+room
@ curline,40 say names
@ curline,71 say home:phone
@ curline+1,0 say 'PAID: $'+paid1+$(paid2,1,13)
@ curline+1,40 say address
@ curline+1,68 say ss:sc:memb+' '+$(membstatus,1,2)+$(membstatus,9,1)
@ curline+2,0 say 'DUE: $'+str(amount:due,7,2)+' ('+str(amount,7,2)+')'
@ curline+2,40 say trim(city:state)+' '+zip
@ curline+2,67 say 'BD: '+$(birthdate,1,5)
@ curline+3,0 say 'SESS: '+sessions
@ curline+3,51 say familycode+comments
@ curline+4,0 say 'EQUIPMENT: '+equipment
Store curline+6 to curline
SKIP
enddo
Eject
Set format to screen
Accept 'Report is complete. Press <RETURN>' to xx
CASE MSEL = '2'
GOTO TOP
? 'Now printing the CSEVENT Two-line report'
Set format to print
Store 99 to curline
Store 0 to pag
Do while .not. EOF
If curline>58
If curline<>99
Eject
endif
Store pag+1 to pag
@ 1,10 say ename
@ 1,55 say curdate+' Page'+str(pag,3)
Store 4 to curline
endif
Store trim(last:name)+', '+trim(first:name) to names
If len(names)>30
Store $(names,1,30)+'_' to names
endif
Store trim(address)+', '+trim(city:state) to addr
If len(addr)>34
Store $(addr,1,34) to addr
endif
Store str(val($(paid1,4,6))+val($(paid2,4,6)),6,2) to paidx
@ curline,0 say 'TRAN: '+transpor+' LODG: '+room+' PD:'+paidx
@ curline,40 say names
@ curline,71 say home:phone
@ curline+1,0 say 'SESS: '+$(sessions,1,30)
@ curline+1,40 say addr+' '+$(zip,1,5)
Store curline+3 to curline
SKIP
enddo
Eject
Set format to screen
Accept 'Report is complete. Press <RETURN>' to xx
CASE MSEL='3'
GOTO TOP
? 'Now printing CSEVENT Mailing Labels.'
Accept 'Enter the mailing labels spacing (press <retn> for 12) ' to xx
If xx=' '
Store 12 to lspacing
else
Store val(xx) to lspacing
endif
If lspacing<6 .or. lspacing > 66
? 'Invalid label spacing. Must be between 6 and 66.'
else
Set format to print
Store 99 to curline
Store 0 to pag
Do while .not. EOF
If curline>60
If curline<>99
Eject
endif
Store 0 to curline
endif
Store trim(last:name)+', '+trim(first:name) to names
If len(names)>30
Store $(names,1,30)+'_' to names
endif
Store trim(city:state)+', '+zip to addr
@ curline,0 say names
@ curline+1,0 say address
@ curline+2,0 say addr
Store curline+lspacing to curline
SKIP
enddo
Eject
Set format to screen
endif
Accept 'Report is complete. Press <RETURN>' to xx
CASE MSEL='4'
GOTO TOP
? 'Now printing the CSEVENT Financial Summary'
Set format to print
Store 99 to curline
Store 0 to pag
Store 0.00 to owed:total
Store 0.00 to paid:total
Do while .not. EOF
If curline>58
If curline<>99
Eject
endif
Store pag+1 to pag
@ 1,5 say $(ename,1,30)+' FINANCES'
@ 1,50 say curdate+' Page'+str(pag,3)
@ 3,1 say 'AMOUNT PAID-1 PAID-2 DUE'
@ 4,1 say '------ ----------- ----------- ------'
Store 5 to curline
endif
Store trim(last:name)+', '+trim(first:name) to names
If len(names)>29
Store $(names,1,29)+'_' to names
endif
Store val($(paid1,4,6))+val($(paid2,4,6)) to paidx
Store paid:total+paidx to paid:total
Store amount+owed:total to owed:total
@ curline,0 say str(amount,7,2)+$(paid1,1,15)+$(paid2,1,15)
Store amount-paidx to duex
If duex>0
@ curline,38 say str(duex,7,2)
endif
@ curline,47 say names
@ curline,71 say home:phone
Store curline+1 to curline
SKIP
enddo
@ curline,2 say ;
'-----------------------------------------------------------------------------'
@ curline+1,4 say 'Total AMOUNT: '+str(owed:total,8,2)+' Total RECEIVED: '+;
str(paid:total,8,2)+' Total DUE:'+str(owed:total-paid:total,7,2)
Eject
Set format to screen
Accept 'Report is complete. Press <RETURN>' to xx
CASE MSEL='5' .or. MSEL='6' .or.MSEL='7'
Select secondary
GOTO TOP
If MSEL='5'
Accept 'Enter a Lodging code ' to ssel
Store 'ROOM='+ssel to xsel
Store ' Report for Lodging = ' to ANAME
else
If MSEL='6'
Accept 'Enter a Session code ' to ssel
Store 'SESS='+ssel to xsel
Store ' Report for Session = ' to ANAME
else
Accept 'Enter a Transportation code ' to ssel
Store 'TRAN='+ssel to xsel
Store ' Report for Transportation = ' to ANAME
endif
endif
Find &xsel
If #=0
Accept 'This code is not found. Press <retn> ' to xx
else
?
? ANAME,ssel,' ',curdate
?
Do while spact=xsel.and. .not. EOF
? $(spact,6,55)
SKIP
enddo
?
Accept 'End of report. Press <retn> ' to xx
endif
CASE !(MSEL) = 'Q'
Store F to LEVEL3
OTHERWISE
Accept 'Illegal selection. Please enter again ' to MSEL
Store F to validd1
ENDCASE
ENDDO
endif
ENDDO
RETURN
be deleted: ',last:name,first:name
Accept 'OK? ' to xx
If !(xx)='Y'
? 'DELETED -',last:name,first:name
DELETE
else
? 'No delete is made.'
endif
else