This was highlighted to me by the Director of Development as a feature when we were shipping UniVerse 4.4.4.
The command syntax is: verb [DICT] filename [records | FROM list#] … where verb is among 18 options including CHECKSUM, COUNT, and LIST.
Do we care if the file name can be almost anywhere in the query?
Do we want to advertise this feature in the documentation?
Should we just follow the documentation which wants [DICT] filename first?
Is this for compatibility with some legacy multivalue environment?
Is this capability simply a side effect of the lex/parse implementation?
Does anyone do things like the following?:
LIST DICT F1 VOC (Split DICT and filename)
LIST F1 DICT MD (Filename after fields)
LIST VOC DICT (At least this does NOT work – if DICT is not a dictionary field)
------------------------------Mark A BaldridgePrincipal ConsultantThought MirrorNacogdoches, Texas United States------------------------------
We always used it this way:
LIST FILENAME FIELD_A FIELD_B WITH FILELD_A = "ABC" AND WITH FIELD_B = "XYZ" BY FIELD_A
also for select and the other verbs.
as far as i knwo have we never used it different...
If you ask for my thoughts, i would prefere a clear way where the parts of the query have there fixed position, but if it was possible in past im almost sure the it has been used in different ways.
Just because you can do a thing, does not mean you should do a thing.
I would stick to the more readable format, where the file name is after the verb.
One issue I see with checking for file names, anywhere in the command line, is that if there is a dictionary item that is the same as another file name, it will fail if comes before the file you are trying to list.
i.e. ( Copy the DICT item LOCATION to LOCATIONS for the PRODUCTS file in the XDEMO account )
>LIST LOCATIONS PRODUCTSRetrieVe: syntax error. Unexpected filename. Token was "PRODUCTS". Scanned command was LIST LOCATIONS PRODUCTS
So, if you are willing to limit the names of the dictionary items to non-file names, and expect everyone to refrain from creating them as such in the future, you can write you query statements with the filename anywhere you want in UniVerse.
( and this does not even get into the portability of the code to other MV Databases, that do not work the same )
77 4th AvenueWaltham, MA 02451 USA
Rocket Support Community
All Support Offerings
About Rocket Software
Training and Services
Forum Terms and Conditions
Contact Forum Moderator