Mark,
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 )
This Works:
>LIST PRODUCTS LOCATIONS
LIST PRODUCTS LOCATIONS 06:26:43am 25 Sep 2023 PAGE 1
PRODUCTS........................... Location.................
1715358952
This Fails:
>LIST LOCATIONS PRODUCTS
RetrieVe: 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 )
------------------------------
Mike Rajkowski
MultiValue Product Evangelist
Rocket Internal - All Brands
US
------------------------------
Original Message:
Sent: 09-18-2023 14:50
From: Mark Baldridge
Subject: Thought question: Guide to RetrieVe version 11.3.1 states "filename is required and can be almost anywhere in the query."
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)
Thoughts?
------------------------------
Mark A Baldridge
Principal Consultant
Thought Mirror
Nacogdoches, Texas United States
------------------------------