home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dba0187.zip
/
STUB.PRG
< prev
next >
Wrap
Text File
|
1986-12-05
|
1KB
|
41 lines
*
* Copyright 1986, Data Based Solutions, Inc.
* All Rights Reserved
*
SET TALK OFF
SET PROCEDURE TO validate.prg
CLEAR
* main program stub for calling the GETFILE validation routines
* contained in procedure "validate.prg"
* set up the file, since one example validates the entry is on file
USE FK customer.dbf INDEX name.ndx
* set up default values for each field to be entered, followed by the
* validation information for the field that will be passed to the
* GETFILE.
STORE "IN" TO y.state
* the stateval.prg GETFILE needs no validation variable
STORE "APPLE " TO y.fruit
STORE "APPLE |ORANGE|PEAR " TO y.fruitx
STORE SPACE(10) TO y.name
STORE "FK" TO y.namex
STORE 1.25 TO y.price
STORE "0.01|9.99" TO y.pricex
* GET the `y.state' field, using the stateval.prg GETFILE routine to
* validate the field's entry
@ 10,10 SAY "Enter the state " GET y.state PICTURE "!!" ;
GETFILE stateval.prg
* GET the `y.fruit' field, using the strngval.prg GETFILE routine and
* the information in `y.fruitx' to validate the field's entry
@ 11,10 SAY "Enter the fruit " GET y.fruit PICTURE "!!!!!!" ;
GETFILE strngval.prg
@ 12,10 SAY "Enter the name " GET y.name PICTURE "!!!!!!!!!!" ;
GETFILE fileval.prg
@ 13,10 SAY "Enter the price " GET y.price PICTURE "99.99" ;
GETFILE range.prg
READ
RETURN