"I'm looking to dump the data in an easily parseble fashion such that I can use it in a different environment. "

What we have here is a difference in concept. While a relational environment has a schema which must clearly define the database so that the one big tool (SQL) is able to do all of the query/update/delete/modify functions and each table holds one two dimensional data set, we don't. One table may contain any number of 2 (or 3 actually but we wont go into that now) dimensional data sets. Furthermore, since the vast majority of U2 applications use UniBasic to do the query/update/delete/modify functions, the dictionary file is there as a convenience for humans and the native query language only. There may be fields not defined in the dictionary which are being happily used for years with no problem (although if I ever found a developer not defining dictionary items I would probably cause them bodily harm). There may also be dictionaries where the Single/Multi value flag is incorrect and everything still works fine. Oh, and there is likely to be data in the key, in some cases multip[le data elements in the key.

That rant having been completed:

You can go here: http://www.schasny.com/bp/DUMPER

and get this program:

*
* dumps a file to a tab delimited flat file with pipe delimited values
* j.a.schasny
* 02/25/2005
* NOTE: This program changes sub value marks to asterisks. Output is
* written to the current working directory (&UFD&) as FILENAME.txt.
* The first line of the output is a line of fieldnames extracted
* from the first dictionary item I come across for a given field.
* Missing fieldnames will have null headings or no headings if
* they are past the highest numbered field with a name.
* The item key is prepended to each output line as field 1.

If you think it might help.



Evan Carroll wrote:
It is not often you would do something like this as it is generally not
required in the U2 World. We may be able to provide you with better
solutions if we understood what you are trying to achieve by listing
every column?

I have a proprietary database I'm connecting to, all of the fieldnames
are borderline logical all of the display names are almost close to a
satisfactory definition of descriptive. I'm looking to dump the data
in an easily parseble fashion such that I can use it in a different
environment. The issue is a simple LIST shows only the @id and the
@select is just as useless - this seems to rule out a simple LIST and
uvsql SELECT. Furthermore the utilizer of this U2 technology felt the
need to customize everyone's install on field position (amongst other
possibilities that I haven't tested for), there are roughly 400-2000
fields, and the decay of uranium is the most probable factor in the
ordering.

I'm really, and simply, looking for the equiv of `LIST table TOXML
ELEMENTS` where @ is everything. I really don't want to muck with '@'
other because it could very well be a catalyst for armageddon.

I'm thinking I need a BASIC script that does a mix between LIST.ALL
where it picks up data columns, and merges them with the dictionary to
get the Display Names, and/or merges them to get the Column Names.

Ideally, this would just dump the data columns out in something super
easily parse-able:

<record>
<element colname="foo" displayname="foobarbaz"> data; </element>
</record>

The other thing throwing me off task here is my ADHD aproach to the
150,000 pages of unannotated IBM docs of questionable use. I can see
this being done in BASIC, I can see it being maybe done with a
uvsql-type SELECT/JOIN on the table-data, and dictionary, I can see
this being done with something like TABLE.DUMP, or some other subset
of the XML functionality.

I'm still getting my toes wet, with each pass of 900 pocket reference
i'm picking up a little more. I've read a bit of the lists too.


--
------------------------------------------------------------------------
Jeff Schasny - Denver, Co, USA
jschasny at gmail dot com
------------------------------------------------------------------------
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to