home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr3.zip
/
CFBUDGET.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1991-01-21
|
4KB
|
152 lines
* Program CFBUDGET - Controls all Church Budget operations
Set talk off
Set bell off
Clear
Select primary
Set deleted on
Set intensity off
Set exact off
? 'Now loading the CFBUDGET program.'
Do BMEMVARS.CMD
Store T to LEVEL2
Do while LEVEL2
Save to FMEMVARS
Erase
@ 0,1 say chname
@ 0,60 say curdate
@ 1,1 say 'DATA DISK = '+D
@ 2,24 say 'CHURCH BUDGET MANAGER 2-/CFBUDGET/'
@ 4,9 say '1) View/edit the church expenses /CFBUDGMO/'
@ 5,9 say '2) Enter church received amounts, by Department /CFBRECVD/'
@ 6,9 say '3) Print checks of amounts marked to be posted /CFBUDGPC/'
@ 7,9 say '4) Post accounts with amounts marked to be posted /CFBUDGPC/'
@ 8,9 say '5) Display payment amounts that were posted on a specified date'
@ 9,9 say "6) Start a new month's budget /CFBNEWMO/"
@ 10,9 say "7) Start a new year's account"
@ 11,9 say '8) Print/display the history of accounts, year-to-date'
@ 12,9 say '9) Set Up'
?
Accept ' Select one of the above operations ("Q" = quit) ' to MSEL
?
Store 'S' to DF
If !(MSEL)='DISK='
Store !($(MSEL,6,1)) to D
? 'Disk now being set to drive',D
Save to FMEMVARS
endif
Store $(msel,1,1) to XX
Do while @(xx,'123456789QqDd')=0
Accept 'Invalid entry. Please enter again ' to XX
Store $(xx,1,1) to msel
enddo
If msel='9' .or. !(msel)='D'
If msel='9'
Do CFBSETUP.CMD
Clear
Store T to LEVEL2
Store '9' to msel
Do BMEMVARS.CMD
Save to FMEMVARS
endif
else
If len(MSEL) > 1
Store !($(msel,2,1)) to XX
If rank(XX) > 64 .and. rank(XX) < 84
Store XX to DF
Set raw on
? ' Input file is "ACCOUNT',DF,'".'
Set raw off
else
? 'Invalid ACCOUNT file special character. "ACCOUNTS" is used.'
endif
endif
Store D+':ACCOUNT'+DF to MFILE
Select primary
If file(MFILE)
Use &MFILE index &MFILE
else
Set raw on
? 'ACCOUNT',DF,' file not present on the data disk. '
Accept 'Perform SET UP to create it. Press <RETURN> ' to xx
Set raw off
Store 'D' to msel
endif
endif
Do CASE
CASE MSEL = '1'
Do CFBUDGMO.CMD
CASE MSEL = '2'
Do CFBRECVD.CMD
CASE MSEL='3'
Do CFBUDGPC.CMD
CASE MSEL='4'
Do CFBUDGPC.CMD
CASE MSEL='5'
? 'The date for account postings is ',date()
Accept ' Change to . . . . ' to INDATE
If INDATE=' '
Store date() to INDATE
endif
Store T to beginng
Find D
If #=0
Accept 'Invalid ACCOUNTS file. Press <RETURN>' to XX
else
?
? 'Accounts posted on ',INDATE
?
Do while account='D' .and. .not. EOF
If .not. beginng
? ' ',$(account,4,25),'$ ',newpaid
SKIP
endif
Store F to beginng
Do while (PP<>'*' .or. newpdate<>indate) .and. .not. eof
SKIP
enddo
enddo
Accept 'End of POSTINGS list. Press <RETURN> ' to XX
endif
Use
Release indate,xx,beginng
CASE MSEL = '6'
Do CFBNEWMO.CMD
CASE MSEL = '7'
Use
Select primary
Store d+':ACCOUNT'+DF to MFILE
If .not.file('ACCOUNTZ')
Accept 'File ACCOUNTZ is not on the program disk. Press <RETURN>' to XX
else
? 'Now about to create a new',MFILE,'file.'
Accept 'OK?' to XX
If !(XX)='Y'
USE ACCOUNTZ
copy to &MFILE
use &MFILE
Index on account to &MFILE
use
? 'File',MFILE,'has now been created as new.'
Accept 'Press <RETURN> to continue' to XX
endif
endif
Use
CASE MSEL = '8'
? curdate,' Accounts History ',MFILE
?
? ' DEPARTMENT PAIDYTD PREVOWED NEWOWED NEWPAID NEWPDATE'
?? 'PP'
LIST str(#,3),$(account,1,22),paidytd,prevowed,newowed,newpaid,newpdate,pp OFF
USE
?
Accept ' - END OF ACCOUNTS FILE - press <return>' to xx
CASE !(MSEL) = 'Q'
Store F to LEVEL2
RETURN
ENDCASE
endif
ENDDO
Restore from FMEMVARS
ENDDO
RETURN