home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr3.zip
/
MCONEDIT.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-01-21
|
6KB
|
171 lines
* Program MCONEDIT - Allows changes to one page of contributions
Release samepage,penvno,wknumb,continu
Store '0' to ENVNUMBX
Store EC to ECMAX
Store 0 to EC
Do while EC < ECMAX
ERASE
Store EC+1 to EC
Store $(envnbrs,EC*4-2,4) to envno
@ 2,9 SAY 'CONTRIBUTIONS REPORTING - - WEEK OF '+WKNAME
@ 4,2 say 'RECHECKING PAGE '+PTCS+' TOTALS.. OFFERINGS FOR ENVELOPE NUMBER '+;
ENVNO
Store val(envno) to envnumb
STORE 'N' TO RESP
GOTO envnumb
Store 0.00 to OCATEGT2
Store 0.00 to OCATEGT3
Store 0.00 to OCATEGT4
Store '0' to N
Store 6 to XX
Do while N<>OT
STORE STR(VAL(N)+1,1) TO N
Store $(OCATEG&N,FL+1,8) TO RESP
Store RESP to OCATEGM&N
Store &RESP to OCATEGT&N
IF N=OT
@ XX,18 SAY '------'
STORE XX+1 TO XX
ENDIF
@ XX,2 say OCATNAM&N
@ XX,16 say OCATEGM&N
STORE XX+1 TO XX
ENDDO
?
ACCEPT 'IS THIS RECORD CORRECT? (Y/N/A/Q/<RETN>) ' TO RESP
Store F to valid2
Do while .not. valid2
If !(resp)='Y' .or. !(resp)='Q' .or. !(resp)=' '
Store F to currec
Store T to valid2
else
If !(resp)='N' .or. !(resp)='A'
Store T to valid2
Store T to currec
Store ocategt4 to I
else
Accept 'Invalid response. Please enter again ' to RESP
endif
endif
enddo
Do while CURREC
Do while !(resp)='N' .or. !(resp)='A'
DO CASE
CASE !(resp) = 'N'
ERASE
@ 2,10 say 'CONTRIBUTIONS REPORTING - - WEEK OF '+WKNAME
@ 4,5 say 'Rechecking page '+PTCS+' TOTALS.. OFFERINGS FOR ENVELOPE '+ENVNO
Store 6 to XX
Store '1' to N
Do while N<>OT
@ XX,2 say OCATNAM&N
@ XX,15 get OCATEGT&N
Store XX+1 to XX
Store str(val(N)+1,1) to N
enddo
@ XX,20 say '------'
READ
Store 0.00 to OCATEGT&OT
Store OCATEGT1+OCATEGT2+OCATEGT3+OCATEGT4 to OCATEGT&OT
@ XX+1,17 say str(OCATEGT&OT,9,2)
?
Accept 'Is this record correct? ' to resp
If !(resp)<>'N'
Store 'Y' to resp
If OCATEGT4<>I
? 'CONTRIBUTION for Special Account has changed. It will be right in the '
?? 'CONTRIB'
? 'file but you must edit the Special Account file amount for this envelope.'
?
Accept ' Press <return> ' to N
endif
endif
CASE !(resp)='A'
Store ENVNO to ENVNUMBX
Accept 'Enter envelope number ' to ENVNO
Store val(ENVNO) to envnumb
@ 12,0
@ 13,0
@ 14,0
@ 4,0
Store F to valid2
Do while .not. valid2
If !(envno)='Q'
Store T to valid2
Store F to currec
else
if envnumb>0 .and. envnumb<offermax+1
GOTO ENVNUMB
Store EC to ECX
Release samepage,penvno,wknumb,currec
DO MCINSCRN.CMD
If EC<>ECX
Store ECMAX+1 to ECMAX
endif
Store envnumbx to ENVNO
Store val(envno) to envnumb
GOTO envnumb
Store '0' to N
Do while N<>OT
Store str(val(N)+1,1) to N
Store $(OCATEG&N,FL+1,8) to OCATEGM
Store OCATEGM to OCATEGM&N
Store &OCATEGM to OCATEGT&N
enddo
Store T to valid2
Store T to currec
else
?
ACCEPT 'Invalid envelope number. Please enter again' to ENVNO
endif
endif
Store 'N' to resp
enddo
CASE !(resp)='Q'
Store F to currec
endcase
If !(resp)='Y'
Store '0' to N
Do while N<>OT
Store str(val(N)+1,1) to N
Replace OCATEG&N with $(OCATEG&N,1,FL)+STR(OCATEGT&N,8,2)+$(OCATEG&N,SS,SL)
ENDDO
Store '0' to N
Do while N<>OT
Store str(val(N)+1,1) to N
Store OCATEGM&N to OCATEGM
Store OCATPT&N + OCATEGT&N - &OCATEGM to OCATPT&N
enddo
Store F to currec
else
If !(resp)='A'
@ 15,0
@ 14,0
endif
endif
enddo
enddo
If !(resp)='Q'
Store ecmax to EC
Store T to valid1
endif
enddo
Release OCATEGM1,OCATEGM2,OCATEGM3,OCATEGM4,OCATEGM5,ECX
RETURNETURNnddo
enddo
If !(resp)='Q'
Store ecmax to EC
Store T to valid1
endif
enddo
Release OCATEGM1,OCATEGM2,OCATEGM3,OCATEGM4,OCATEGM5,ECX
RETURNN=OT
@ XX,18 SAY '------'
STORE XX+1 TO XX
ENDIF
@ XX,2 say OCATNAM&N
@ XX,16 say OCATEGM&N
STORE XX+1 TO XX
ENDDO
?
ACCEPT