home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr3.zip
/
MCONINPU.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-01-21
|
4KB
|
145 lines
* Program MCONINPU - Monitors input of contributions
Erase
@ 2,20 say 'Contributions Entry Routine'
?
Accept 'Enter number of week in month/quarter ' to WKNO
Store T to continu
Do while continu
Store val(wkno) to wknumb
Store (wknumb*8)+1 to FL
Store FL+9 to SS
Store 50-SS to SL
If wkno='1' .or. wkno='2' .or. wkno='3' .or. wkno='4' .or. wkno='5'
Store F to continu
else
If wknummax=15 .and. wknumb<15
Store F to continu
Store 122-SS to SL
else
Accept 'Invalid week number. Please re-enter [1-5, or 1-14] ' to wkno
endif
endif
enddo
Store $(curdateS,wknumb*6-5,5) to wkname
Store chname+' Contributions for '+wkname+' - - '+curdate to HDR3A
Select secondary
Use CDIRFILE index CDIRFILE
Select primary
Store d+':CONTRIB' to MFILE
Use &MFILE
Release wkno,goodhdr,curdates,voteage,comments,lsep,msel,mfile,level1,validd1
Release curdatex,curmonth,cmonthco,maxoffer,offnote,osel,nmonth,d,indate,chname
Release offsform,offpledg,curdate,curyear
Set intensity off
Store T to continu
Store '0' to N
Do while N<>OT
Store str(val(N)+1,1) to N
Store 00.00 to OCATPT&N
Store 00.00 to OCATGT&N
enddo
STORE 00.00 TO TOTALGT
Store 1 to curptc
?
Accept 'Starting at first page? ' to RESP
If !(resp) = 'N'
Store 'N' to resp
Do while !(resp)<>'Y'
Erase
@ 12,10 say 'Enter starting page number ' GET CURPTC
@ 14,10 say 'Enter previous partial grand total for '+OCATNAM1 get OCATGT1
If OT<>'2'
@ 16,10 say 'Enter previous partial grand total for '+OCATNAM2 get OCATGT2
IF OT<>'3'
@ 18,10 say 'Enter previous partial grand total for '+OCATNAM3 get OCATGT3
If OT<>'4'
@ 20,10 say 'Enter previous partial grand total for '+OCATNAM4 get OCATGT4
endif
endif
endif
READ
Store str(curptc,3,0) to ptcs
Store OCATGT1 TO OCATGT5
IF OT<>'2'
STORE OCATGT2+OCATGT5 TO OCATGT5
IF OT<>'3'
STORE OCATGT3+OCATGT5 TO OCATGT5
IF OT<>'4'
STORE OCATGT4+OCATGT5 TO OCATGT5
ENDIF
ENDIF
ENDIF
STORE str(OCATGT5,9,2) to enblank
Store OCATGT5 to OCATGT&OT
? 'Page'+PTCS+' starting GRAND TOTAL = $'+ENBLANK
Accept 'Ok? ' to resp
enddo
endif
Store ' ' to enblank
Store '0' to envno
Do while continu
Store 0 to EC
Store enblank+enblank+enblank+enblank+enblank+enblank to envnbrs
Store str(curptc,3,0) to ptcs
Store T to samepage
Do while samepage
Erase
Store envno to penvno
@ 2,1 say 'CONTRIBUTIONS REPORTING - - WEEK OF '+;
WKNAME+' Previous Envl No: '+PENVNO
@ 3,61 say 'Page:'+PTCS
If EC<60
?
Accept ' Enter envelope number ' to envno
else
?
? 'Record count for this page total has reached 60. Page totaling is forced.'
Accept 'Press <retn> to continue ' to XX
Store 'P' to envno
endif
Store F to valid1
Do while .not. valid1
Do CASE
CASE !(envno)='Q'
Store F to continu
Store T to valid1
Store T to samepage
CASE !(envno)='P'
Store F to samepage
Store T to valid1
Store EC to ECMAX
otherwise
Store val(envno) to envnumb
If envnumb>offermax .or. envnumb<1
?
Accept 'ENVELOPE NUMBER NOT VALID. PLEASE ENTER ANOTHER ' to envno
ELSE
Store '0' to ENVNUMBX
GOTO envnumb
DO MCINSCRN.CMD
STORE T TO VALID1
ENDIF
ENDCASE
enddo (VALID1)
enddo (samepage)
If continu
Do MCPGTOTL.CMD
Accept 'Last page of contributions? ' to resp
Store T to continu
If !(resp)='Y' .or. !(resp)='Q'
Store F to continu
? "Write down the above figures as tie-out figures for the week."
Accept 'Then press <retn> to exit ' to resp
endif
Store curptc+1 to curptc
endif
enddo
USE
RETURN
If wknummax=15 .and. wknumb<15
Store F to continu
Store 122-SS to SL
else
Accept