Dump dynamic Prodataset/temp-table(s) schema to static defin

Posted by stevenseagal007 on 04-Feb-2011 17:45

Hello,

I have been given an XML schema (.xsd) that I have to follow when sending information to an external source.  I am able to read this information into a Prodataset using the READ-XMLSCHEMA method, but this definition will not change and I would prefer not taking the run-time hit of loading/using a dynamic Prodataset.

Is there any way that I can read this definition in once ahead of time using READ-XMLSCHEMA, and call some sort of write method that will give me a compatible static schema definition like so:

DEFINE TEMP-TABLE ttMyTable NO-UNDO NAMESPACE-URI "foo"

  FIELD b AS INTEGER XML-NODE-NAME "bar".

DEFINE DATASET ...

that I can then use as a static definition?

Thank you,

STEVEN SEAGAL

All Replies

Posted by Admin on 07-Feb-2011 02:26

Is there any way that I can read this definition in once ahead of time using READ-XMLSCHEMA, and call some sort of write method that will give me a compatible static schema definition like so:

 

Haven't tried it in a while, but you may try

%DLC%\bin\bproxsdto4gl

Please let us know if that works for you

Posted by stevenseagal008 on 11-Feb-2011 15:01

Yes, that worked perfectly!  I thought it was possible or else I wouldn't have asked; I now remember seeing this utility a very long time ago.

Sorry I forgot my password, otherwise I would mark this as answered (created a new acct).

This thread is closed