In message
<[email protected]>, "Womack,
Adrian" <[email protected]> writes
Here's another simple option:
Use REVISE (or ENTRO, MODIFY, etc) on the file - this will automatically
create an @REVISE phrase in the file's dictionary.
You could then use "LIST filname @REVISE" to see all the fields.
(Note: REVISE will only create the @REVISE phrase if you don't already
have an @ phrase in the dictionary).
Alternatively write a simple program to SELECT all the D-types in the
dictionary and append their names into a string and then build up a LIST
statement containing all the field names.
This was my thought. A bit of pseudo-code (that you'll have to expand)
OPEN DICT FILENAME
EXECUTE "SELECT DICT WITH TYPE EQ 'D'"
(it'll sort them by field number for you implicitly, or it should)
read each record in turn
if field 2 ne previous field 2, add to list
WRITE "PH" :@FM: FIELD.LIST TO DICT , "LIST.ALL"
That's now given you a list of all the fields in a phrase. You said the
dictionary seems pretty much okay, this'll make sure there aren't any
duplicates. Coupled with the routine that checks which fields are
actually used, you'll know you've got everything.
then just do a LIST FILE LIST.ALL TOXML
Actually, you could combine my pseudo-routine with the fields-used
routine. My routine will build a list of the fields in the dictionary,
and you could then go on and check that only those fields are used in
the data (I'd read each record in turn from file, blank out the fields
which I know about, and then check that the record is empty).
Cheers,
Wol
--
Anthony W. Youngman <[email protected]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users