home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug061.arc
/
ENTERMSC.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
5KB
|
168 lines
***** ENTERMSC.CMD *****
RESTORE FROM &UseBase
STORE DATE() TO MDate
USE &UseBase
DO WHILE T
ERASE
SET INTENSITY ON
@ 1, 6 SAY "********************************************************************"
@ 2, 6 SAY "* *"
@ 3, 6 SAY "********************************************************************"
SET INTENSITY OFF
@ 2,29 SAY "MISCELLANEOUS ENTRIES"
@ 9,30 SAY "1 Withdrawal"
@ 10,30 SAY "2 Transfer of Funds"
@ 11,30 SAY "3 Bank Service Charge"
@ 12,30 SAY "4 Electronic Funds Transfer"
SET INTENSITY ON
@ 14,30 SAY "X Exit to Menu"
SET INTENSITY OFF
STORE ' ' TO MiscChoice
@ 16,34 SAY "Choice?"
SET INTENSITY ON
@ 16,42 GET MiscChoice
READ
DO WHILE (MiscChoice < '1' .OR. MiscChoice > '4') .AND.(!('&MiscChoice') <> 'M')
IF !('&MiscChoice') = 'X'
RELEASE MiscChoice, MDate
SAVE TO &UseBase
RELEASE Balance, MNo, StateBal
SAVE TO CkMem
RETURN
ELSE
@ 18,0
STORE 1 TO N
DO WHILE N < 10
STORE N+1 TO N
ENDDO
RELEASE N
@ 18,24 SAY "INVALID CHOICE. PLEASE TRY AGAIN."
@ 16,42 GET MiscChoice
READ
ENDIF
ENDDO
SET COLON OFF
DO CASE
CASE (MiscChoice='M'.OR. MiscChoice = 'm')
ERASE
DISPLAY MEMORY
WAIT
CASE MiscChoice = '1'
APPEND BLANK
REPLACE DATE WITH MDate, ENTRYCAT WITH 'W'
ERASE
@ 6,22 SAY "*****************************"
@ 7,22 SAY "* *"
@ 8,22 SAY "*****************************"
SET INTENSITY OFF
@ 7,27 SAY "WITHDRAWAL OF FUNDS"
SET INTENSITY ON
@ 11,37 SAY "DATE:"
@ 11,43 GET DATE PICTURE '99/99/99'
@ 12,28 SAY "PRIOR BALANCE:"
@ 12,43 SAY STR(Balance,8,2)
@ 13,21 SAY "AMOUNT OF WITHDRAWAL:"
@ 13,43 GET DEBIT
READ
STORE DATE TO MDate
IF DEBIT = 0
DELETE
PACK
RELEASE MiscChoice, MDate
SAVE TO &UseBase
RELEASE Balance, MNo, StateBal
SAVE TO CkMem
SET COLON ON
RETURN
ENDIF
@ 14,30 SAY "NEW BALANCE:"
STORE (Balance - DEBIT) TO Balance
@ 14,42 SAY STR(Balance,8,2)
@ 19,23 SAY "HIT TO CONTINUE"
SET INTENSITY OFF
@ 19,28 SAY "<RETURN>"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CASE MiscChoice = '2'
APPEND BLANK
REPLACE DATE WITH MDate, ENTRYCAT WITH 'T'
ERASE
@ 6,22 SAY "*****************************"
@ 7,22 SAY "* *"
@ 8,22 SAY "*****************************"
SET INTENSITY OFF
@ 7,28 SAY "TRANSFER OF FUNDS"
SET INTENSITY ON
@ 11,37 SAY "DATE:"
@ 11,43 GET Date PICTURE '99/99/99'
@ 12,28 SAY "PRIOR BALANCE:"
@ 12,43 SAY STR(Balance,8,2)
@ 13,35 SAY "CREDIT:"
@ 13,43 GET CREDIT
@ 14,36 SAY "DEBIT:"
@ 14,43 GET DEBIT
READ
STORE DATE TO MDate
IF (DEBIT = 0 .AND. CREDIT = 0)
DELETE
PACK
RELEASE MiscChoice, MDate
SAVE TO &UseBase
RELEASE Balance, MNo, StateBal
SAVE TO CkMem
SET COLON ON
RETURN
ENDIF
STORE (Balance + CREDIT - DEBIT) TO Balance
@ 15,30 SAY "NEW BALANCE:"
@ 15,42 SAY STR(Balance,8,2)
@ 19,23 SAY "HIT TO CONTINUE"
SET INTENSITY OFF
@ 19,28 SAY "<RETURN>"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CASE MiscChoice = '3'
APPEND BLANK
REPLACE DATE WITH MDate, ENTRYCAT WITH 'B'
ERASE
@ 6,22 SAY "*****************************"
@ 7,22 SAY "* *"
@ 8,22 SAY "*****************************"
SET INTENSITY OFF
@ 7,27 SAY "BANK SERVICE CHARGE"
SET INTENSITY ON
@ 11,37 SAY "DATE:"
@ 11,43 GET Date PICTURE '99/99/99'
@ 12,28 SAY "PRIOR BALANCE:"
@ 12,43 SAY STR(Balance,8,2)
@ 13,25 SAY "AMOUNT OF CHARGE:"
@ 13,43 GET DEBIT
READ
STORE DATE TO MDate
IF DEBIT = 0
DELETE
PACK
RELEASE MiscChoice, MDate
SAVE TO &UseBase
RELEASE Balance, MNo, StateBal
SAVE TO CkMem
SET COLON ON
RETURN
ENDIF
@ 14,30 SAY "NEW BALANCE:"
STORE (Balance - DEBIT) TO Balance
@ 14,42 SAY STR(Balance,8,2)
@ 19,23 SAY "HIT TO CONTINUE"
SET INTENSITY OFF
@ 19,28 SAY "<RETURN>"
SET CONSOLE OFF
WAIT
SET CONSOLE ON
CASE MiscChoice = '4'
DO EFT
ENDCASE
SET COLON ON
ENDDO