home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dbshop.zip
/
SHOP.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1988-07-25
|
5KB
|
165 lines
**%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%**
** **
** DBSHO╨ ver« 1.0 - A grocery shopping tool **
** copyright (c) 1985 by Larry Marshall **
** **
** This program may be used for noncommercial purposes only. No **
** commercial use of DBSHOP may be made without the author's **
** expressed written permission. **
** **
**%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%**
DO WHILE T
SET TALK OFF
ERASE
?
?
?
? ' ******************************************************************* '
? ' * * '
? ' * ******* SHOPPING LIST ******** * '
? ' * * '
? ' * * '
? ' * 1) ADD A NEW ITEM TO THE DATABASE * '
? ' * * '
? ' * 2) MARK AN EXISTING ITEM FOR PURCHASE * '
? ' * * '
? ' * 3) PRINT A SHOPPING LIST * '
? ' * * '
? ' * 4) RESET NEED TO NONE * '
? ' * * '
? ' * 5) QUIT * '
? ' * * '
? ' * * '
? ' * PLEASE MAKE YOUR SELECTION * '
? ' * * '
? ' ******************************************************************* '
SET CONSOLE OFF
WAIT TO SELECTION
SET CONSOLE ON
DO CASE
CASE SELECTION = '1'
SET CONSOLE OFF
STORE 'G' TO CONTINUE
SET CONSOLE ON
DO WHILE CONTINUE <> 'S' .AND. CONTINUE <> 's'
SET CONSOLE OFF
USE ITEM INDEX LOCAL,LIST
APPEND BLANK
SET CONSOLE ON
ERASE
@ 10,5 SAY "ITEM" GET ITEM
@ 12,5 SAY "FOOD GROUP" GET FOODGROUP
@ 14,5 SAY "LOCATION" GET LOCATION
@ 16,5 SAY "NEED " GET NEED
READ
ERASE
?
?
?
? ' TYPE S TO STOP THE PROCEDURE'
? ' <RETURN> TO ADD ANOTHER RECORD'
SET CONSOLE OFF
WAIT TO CONTINUE
SET CONSOLE ON
ENDDO
CASE SELECTION = '2'
ERASE
STORE 'G' TO BEGIN
DO WHILE BEGIN <> 'S' .AND. BEGIN <> 's'
USE ITEM
ERASE
?
?
?
?
ACCEPT " ENTER THE ITEM NEEDED " TO CHOICE
STORE !(CHOICE) TO CHOICE
?
?
?
ERASE
LOCATE FOR !(ITEM)='&CHOICE'
IF .NOT EOF
STORE ITEM TO MITEM
? ' ',MITEM
?
INPUT " IS THIS THE ITEM? (Y OR N) " TO SAVE
IF SAVE
REPLACE ALL NEED WITH 'Y' FOR ITEM='&CHOICE'
ENDIF
@ 14,15 SAY "ADD ANOTHER ITEM TO LIST? PRESS RETURN"
@ 16,25 SAY "TYPE 'S' TO QUIT "
SET CONSOLE OFF
WAIT TO BEGIN
SET CONSOLE ON
ELSE
@ 10,5 SAY "ITEM IS NOT IN THE FILE, PLEASE ADD TO DATABASE"
@ 12,5 SAY "PRESS 'S' RETURN TO MENU, <RETURN> TO CONTINUE"
SET CONSOLE OFF
WAIT TO BEGIN
SET CONSOLE ON
ENDIF
ENDDO
CASE SELECTION = '3'
USE ITEM INDEX LOCAL
SET TALK OFF
ERASE
SET PRINT ON
? ' **************************************************************'
? ' PEGGY & LARRY`S HANDY-DANDY SHOPPING LIST '
? ' **************************************************************'
?
? ' *** ITEM *** *** FOOD GROUP ***'
?
?
DO WHILE .NOT. EOF
IF NEED = 'Y'
? ' ___',ITEM,FOODGROUP
ENDIF
SKIP
ENDDO
SET PRINT OFF
CASE SELECTION = '4'
INPUT 'ARE YOU SURE YOU WANT TO RESET YOUR NEEDS TO NONE? (Y OR N)' TO GO
USE ITEM
IF GO = 'Y' .OR. 'y'
SET CONSOLE OFF
REPLACE ALL NEED WITH 'N' FOR NEED='Y'
SET CONSOLE ON
ELSE
? 'ABORT RESET FUNCTION '
ENDIF
CASE SELECTION = '5'
ERASE
SET CONSOLE OFF
QUIT
SET CONSOLE ON
ENDCASE
ENDDO
RETURN