home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG061.ARC
/
PRNTSUM.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
7KB
|
263 lines
***** PRNTSUM.CMD *****
ERASE
@ 11,32 SAY [BKKKKKKKKKKKKKKKC]
@ 12,32 SAY [J J]
@ 13,32 SAY [AKKKKKKKKKKKKKKKD]
SET INTENSITY ON
@ 12,34 SAY [CALCULATING]
GO TOP
RESTORE FROM &UseBase
STORE StateBal TO BegBal
**SUMS FOR CANCELLED ITEMS**
**Sum Cancelled Checks**
SUM DEBIT TO CanCheck FOR ((ENTRYCAT = 'C' .OR. ENTRYCAT = 'c') .AND. CAN)
**Sum Cancelled Deposits**
SUM CREDIT TO CanDep FOR ((ENTRYCAT = 'D' .OR. ENTRYCAT = 'd') .AND. CAN)
**Sum Cancelled Miscellaneous Debits and Credits**
SUM DEBIT,CREDIT TO CanMscDeb,CanMscCrd FOR ((ENTRYCAT <> 'D' .AND. ENTRYCAT <> 'd' .AND. ENTRYCAT <> 'C' .AND. ENTRYCAT <> 'c') .AND. CAN)
**Sum Total Cancelled Credits**
STORE (CanDep + CanMscCrd) TO TotCanCrd
**Sum Total Cancelled Debits**
STORE (CanCheck + CanMscDeb) TO TotCanDeb
STORE (BegBal + TotCanCrd - TotCanDeb) TO EndBal
**SUMS FOR OUTSTANDING ITEMS**
**Sum Outstanding Checks**
SUM DEBIT TO OutCheck FOR ((ENTRYCAT = 'C' .OR. ENTRYCAT = 'c') .AND. (.NOT. CAN))
**Sum Outstanding Deposits**
SUM CREDIT TO OutDep FOR ((ENTRYCAT = 'D' .OR. ENTRYCAT = 'd') .AND. (.NOT. CAN))
**Sum Outstanding Miscellaneous Debits and Credits**
SUM DEBIT,CREDIT TO OutMscDeb,OutMscCrd FOR ((ENTRYCAT <> 'D' .AND. ENTRYCAT <> 'd' .AND. ENTRYCAT <> 'C' .AND. ENTRYCAT <> 'c') .AND. (.NOT. CAN))
**Sum Total Outstanding Credits**
STORE (OutDep + OutMscCrd) TO TotOutCrd
**Sum TOTAL Outstanding Debits**
STORE (OutCheck + OutMscDeb) TO TotOutDeb
STORE (EndBal + TotOutCrd - TotOutDeb) TO CheckBal
ERASE
GO TOP
STORE ' ' TO Decision
SET INTENSITY OFF
@ 12,17 SAY [-P- -S-]
SET INTENSITY ON
@ 12,21 SAY [PRINT HARD COPY]
@ 12,45 SAY [SCREEN DISPLAY]
@ 12,37 GET Decision
READ
ERASE
IF !('&Decision') = 'P'
SET INTENSITY OFF
@ 12,17 SAY [-I- -E-]
SET INTENSITY ON
@ 12,21 SAY [ITOH FORMAT]
@ 12,45 SAY [EPSON FORMAT]
STORE ' ' TO DecisionB
@ 12,35 GET DecisionB
READ
ERASE
STORE 57 TO L
SET FORMAT TO PRINT
SET PRINT ON
SET CONSOLE OFF
SET MARGIN TO 11
IF !('&DecisionB') = 'E'
? CHR(15)
ERASE
ENDIF
ELSE
STORE 24 TO L
ENDIF
RELEASE P
STORE 1 TO P
?
?
? [DATABASE: &UseBase PAGE ]+STR(P,1,0)
?
? [ CHECKING ACCOUNT TRANSACTIONS]
?
? [**CHECKS**]
?
? [ DATE CHECK TO: AMOUNT OUT]
? [ NO.]
?
STORE 1 TO C
LOCATE FOR (ENTRYCAT = 'C' .OR. ENTRYCAT = 'c')
DO WHILE ((C<(L-10)).AND. (.NOT. EOF))
IF (.NOT. CAN)
STORE [*] TO OUT
ELSE
STORE [ ] TO OUT
ENDIF
? DATE,NO,' ',TO,DEBIT,' ',OUT
CONTINUE
STORE (C+1) TO C
ENDDO
IF !('&Decision')<>'P'
WAIT
ERASE
SET INTENSITY OFF
ENDIF
DO WHILE .NOT. EOF
EJECT
STORE P+1 TO P
STORE 1 TO C
?
? [DATABASE: &UseBase (**CONTINUED**) PAGE ]+STR(P,1,0)
?
?
? [ DATE CHECK TO: AMOUNT OUT]
? [ NO.]
?
DO WHILE ((C<(L-6)).AND. (.NOT. EOF))
IF (.NOT. CAN)
STORE [*] TO OUT
ELSE
STORE [ ] TO OUT
ENDIF
? DATE,NO,' ',TO,DEBIT,' ',OUT
CONTINUE
STORE (C+1) TO C
ENDDO
IF !('&Decision')<>'P'
WAIT
ERASE
ENDIF
ENDDO
GO TOP
EJECT
STORE P+1 TO P
@ 2, 0 SAY [DATABASE: &UseBase]
@ 2,65 SAY [PAGE ]+STR(P,1,0)
@ 4, 0 SAY [**DEPOSITS**]
@ 07, 2 SAY [DATE AMOUNT OUT]
STORE 1 TO C
LOCATE FOR (ENTRYCAT = 'D' .OR. ENTRYCAT = 'd')
DO WHILE ((.NOT. EOF) .AND. (C<L-11))
IF (.NOT. CAN)
STORE [*] TO OUT
ELSE
STORE [ ] TO OUT
ENDIF
? DATE,' ',CREDIT,' ',OUT
CONTINUE
STORE C+1 TO C
ENDDO
GO TOP
?
?
? [**ELECTRONIC FUNDS TRANSFERS AND DESCRIPTIVE TRANSACTIONS**]
?
?
? [ DATE DESCRIPTION CREDIT DEBIT OUT]
?
LOCATE FOR ((ENTRYCAT <> 'C' .AND. ENTRYCAT <> 'c') .AND. (ENTRYCAT <> 'D' .AND. ENTRYCAT <> 'd'))
DO WHILE ((C<L-11) .AND. (.NOT. EOF))
IF CAN
STORE ' ' TO OUT
ELSE
STORE '*' TO OUT
ENDIF
DO CASE
CASE (ENTRYCAT = 'W' .OR. ENTRYCAT = 'w')
STORE 'Withdrawal ' TO Descrip
CASE (ENTRYCAT = 'T' .OR. ENTRYCAT = 't')
STORE 'Account Transfer ' TO Descrip
CASE (ENTRYCAT = 'E' .OR. ENTRYCAT = 'e')
STORE 'Elec. Funds Transfer ' TO Descrip
CASE (ENTRYCAT = 'B' .OR. ENTRYCAT = 'b')
STORE 'Bank Service Charge ' TO Descrip
ENDCASE
? DATE,' ',DESCRIP,CREDIT,DEBIT,' ',OUT
STORE C+1 TO C
CONTINUE
ENDDO
IF !('&Decision')<> 'P'
WAIT
ERASE
ENDIF
DO WHILE .NOT. EOF
EJECT
STORE P+1 TO P
STORE 1 TO C
?
? [DATABASE: &UseBase (**CONTINUED**) PAGE ]+STR(P,1,0)
?
? [ DATE DESCRIPTION CREDIT DEBIT OUT]
?
DO WHILE ((C<(L-5)) .AND. (.NOT. EOF))
IF CAN
STORE ' ' TO OUT
ELSE
STORE '*' TO OUT
ENDIF
DO CASE
CASE (ENTRYCAT = 'W' .OR. ENTRYCAT = 'w')
STORE 'Withdrawal ' TO Descrip
CASE (ENTRYCAT = 'T' .OR. ENTRYCAT = 't')
STORE 'Account Transfer ' TO Descrip
CASE (ENTRYCAT = 'E' .OR. ENTRYCAT = 'e')
STORE 'Elec. Funds Transfer ' TO Descrip
CASE (ENTRYCAT = 'B' .OR. ENTRYCAT = 'b')
STORE 'Bank Service Charge ' TO Descrip
ENDCASE
? DATE,' ',DESCRIP,CREDIT,DEBIT,' ',OUT
STORE C+1 TO C
CONTINUE
ENDDO
IF !('&Decision')<> 'P'
WAIT
ERASE
ENDIF
ENDDO
EJECT
SET PRINT OFF
SET CONSOLE ON
STORE P+1 TO P
IF !('&Decision')<> 'P'
ERASE
ENDIF
@ 2,0 SAY [DATABASE: &UseBase]
@ 2,65 SAY [PAGE ]+STR(P,1,0)
@ 4,20 SAY [********************************]
@ 5,20 SAY [* STATEMENT SUMMARY *]
@ 6,20 SAY [********************************]
@ 8, 3 SAY [**STATEMENT** **OUTSTANDING**]
@ 10, 7 SAY [Deposits:]
@ 10,24 SAY CanDep
@ 10,45 SAY [Deposits:]
@ 10,62 SAY OutDep
@ 11, 7 SAY [Misc. Credits:]
@ 11,24 SAY CanMscCrd
@ 11,45 SAY [Misc. Credits:]
@ 11,62 SAY OutMscCrd
@ 13, 7 SAY [Checks:]
@ 13,24 SAY CanCheck
@ 13,45 SAY [Checks:]
@ 13,62 SAY OutCheck
@ 14, 7 SAY [Misc. Debits:]
@ 14,24 SAY CanMscDeb
@ 14,45 SAY [Misc. Debits:]
@ 14,62 SAY OutMscDeb
@ 16,20 SAY [BEGINNING BALANCE:]
@ 16,44 SAY BegBal
@ 17,20 SAY [TOTAL DEPOSITS/CREDITS:]
@ 17,44 SAY TotCanCrd
@ 18,20 SAY [TOTAL CHECKS/DEBITS:]
@ 18,44 SAY TotCanDeb
@ 20,20 SAY [ENDING BALANCE:]
@ 20,44 SAY EndBal
@ 22,20 SAY [CHECKBOOK BALANCE:]
@ 22,44 SAY CheckBal
IF !('&Decision')<> 'P'
WAIT
ENDIF
EJECT
SET FORMAT TO SCREEN
SET INTENSITY ON
RELEASE Decision, DecisionB
RELEASE L
ERASE
RETURN