home *** CD-ROM | disk | FTP | other *** search
- /*
- Listing 19.17 SUBSET database example
- Author: Joe Booth
- Excerpted from "Clipper 5: A Developer's Guide"
- Copyright (c) 1991 M&T Books
- 501 Galveston Drive
- Redwood City, CA 94063-4728
- (415) 366-3600
- */
-
- field state, id_code
- local jj, flds
- use CUSTOMER new
- index on state+id_code to cust
- seek "PA"
- copy to pa_cust while state == "PA" // Create subset
- use PA_CUST new // Use the subset file
- go top
- browse() // Allow user to work with subset
- flds := fcount()
- go top
- while !eof()
- select CUSTOMER
- seek PA_CUST->state + PA_CUST->id_code
- if eof()
- append blank
- endif
- for jj = 1 to flds
- Fieldput(jj, PA_CUST->(fieldget(jj)))
- next
- select PA_CUST
- skip +1
- enddo
-
- // end of file CHP1917.PRG
-