For Programmers: Free Programming Magazines  


Home > Archive > Clarion > April 2005 > Non standard use of BUILD(key) in IMDB









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Non standard use of BUILD(key) in IMDB
johnnymack

2005-04-21, 3:55 pm

I've been able, using the TPS driver, to take advantage of a non
standard use of BUILD(key). Trivial example:

Suppose I'm building a file of my CD collection from scratch (by
reading a text file output from a 3rd party program):

CD FILE,DRIVER('TOPSPEED'),PRE(CD),CREATE,B
INDABLE,THREAD
ByAlbum KEY(CD:Album),NOCASE,OPT
BySongAlbum KEY(CD:Song,CD:Album),NOCASE,OPT
Record RECORD,PRE()
Album STRING(32)
Song STRING(32)
END

Note both keys are unique. I CREATE the file, APPEND all records to it
and then BUILD both keys, ignoring the duplicate key errors. (I can't
ADD nor BUILD(file) because of the duplicate records on the "ByAlbum"
key)

I can code 2 separate browses, one to see just what albums I own and
one to locate a song, using the 2 keys on the same file.

I don't have to create 2 files... nor use just the one file but make
the KEY 'ByAlbum' DUP and do fancy runtime filtering. Very nice, very
easy, very non standard.

When I change the driver to MEMORY, the BUILD(ByAlbum), encountering
the duplicate records, does not work the same, and just seems to bail
out early.

1) Can anyone verify that this is really the case?
2) If so, is there any way to force it to work as it did on TOPSPEED
files? It was so handy....

p.s. I'm neither surprised nor upset, just a wee disappointed.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com