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
/
MBUG102.ARC
/
LISTFILE.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
2KB
|
68 lines
*LISTFILE.PRG
DO WHILE T
STORE ' ' TO DEC
ERASE
@ 1,0 SAY '*****************************************************************'
@ 2,0 SAY ' THIS PROGRAM WILL LIST THE LAST 15 ENTRIES IN THE NOMINATED '
@ 3,0 SAY ' DATAFILE '
@ 4,0 SAY ' PRESS TO VIEW THIS FILE'
@ 5,0 SAY ' 1 CASH SALE '
@ 6,0 SAY ' 2 COLLECTED SALE'
@ 7,0 SAY ' 3 STANDARD ORDER'
@ 8,0 SAY ' 4 RETURN FOR CREDIT'
@ 9,0 SAY ' 5 LEDGER'
@ 10,0 SAY ' 6 PRICELIST'
@ 11,0 SAY ' 7 NAMELIST'
@ 12,0 SAY ' R RETURN TO FILE MAINTENANCE MENU'
@ 13,0 SAY '****************************************************************'
@ 14,0 SAY ' TO VIEW EARLIER RECORDS PRESS CTRL R'
@ 15,0 SAY ' TO VIEW LATER RECORDS PRESS CTRL C'
@ 16,0 SAY ' TO VIEW FIELDS TO THE RIGHT PRESS CTRL B'
@ 17,0 SAY ' TO VIEW FIELDS TO THE LEFT PRESS CTRL Z'
@ 18,0 SAY ' WHEN FINISHED VIEWING, PRESS CTRL W'
?
WAIT TO DEC
STORE !(DEC) TO DEC
DO CASE
CASE DEC='R'
RETURN
CASE DEC='1'
STORE 'DATATEMP' TO DATABASE
CASE DEC='2'
STORE 'HOLDATA' TO DATABASE
CASE DEC='3'
STORE 'DATAFILE' TO DATABASE
CASE DEC='4'
STORE 'RFC' TO DATABASE
CASE DEC='5'
STORE 'LEDGER' TO DATABASE
CASE DEC='7'
STORE 'NAMELIST' TO DATABASE
CASE DEC='6'
STORE 'PRICELIS' TO DATABASE
ENDCASE
USE &DATABASE
COUNT TO TESTNUM
IF TESTNUM<1
LOOP
ENDIF
GO BOTTOM
STORE # TO MARK
STORE 15 TO TEST
IF MARK <15
STORE 1 TO TEST
ENDIF
IF MARK-TEST=0
STORE 0 TO TEST
ENDIF
GOTO MARK-TEST
BROWSE
ENDDO
RETURN
@ 3,0 SAY ' DATAFILE '
@ 4,0 SAY ' PRESS TO VIEW THIS FILE'
@ 5,0 SAY ' 1 CASH SALE '
@ 6,0 SAY ' 2 COLLECTED SALE'
@ 7,0 SAY ' 3 STANDARD ORDER'
@ 8,0 SAY