Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
David Grove on 12.10.FC14 found dbschema concatenates overloaded SPLs with the same name into one file. He asked if it always orders them by ascending procid. Art Kagel confirmed dbschema orders by object ID and said myschema offers three other orderings. Paul Watson said his modified myschema writes each entity to a unique file, a quick change in print_procedures.ec.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
David Grove — source: IBM Community (ConnectedCommunity.org) Informix forum
Informix 12.10.FC14
Solaris 10 1/13
I have used dbschema to generate individual text files for each SPL by rippling through sysprocedures and calling dbschema for each one.
That works fine, so long as SPLs are not overloaded.
When encountering overloaded SPLs, dbschema concatenates all of the SPLs with the same name into a single text file.
I don't see anything in the documentation for dbschema that indicates any way to disambiguate function/procedure names, or to force dbschema to generate a single file for each SPL. I could be missing something because of the inconcistency (I would go so far as to use the term "error") in the documentation for dbschema. (The text differs from the syntax diagram, and I believe this is true for both the 12.X and 14.X published documentation. Of course, it wouldn't be the first time my [alleged] mind has gotten me on the wrong track.)
I realize I could break the SPLs out manually-- there are only about 40 of them. Or, I could program what I want by writing a script that also extracts the procid (to use in generating a unique name for the generated text files for each SPL) and also by using sed or awk to parse out the individual SPLs from the concatenated file, and create new ones, uniquely named, that each contained exactly one SPL. But, it never hurts to (first) make sure there isn't "lazier" way to do this.
Thank you for any comments.
Regards,
DG
P.S. I am truly grateful for the many previous responses in another thread. This forum is very generous. But I'd like to be clear that I am not trying to get my work done for free! Just wondering if there is any way to use existing tools to extract a database's SPLs (particularly overloaded SPLs) into individual files.
------------------------------
David Grove
------------------------------
#Informix
↪ replying to David Grove
David Grove — source: IBM Community (ConnectedCommunity.org) Informix forum
P.S. Consider the case of overloaded SPLs. So far, I have observed that 'dbschema' dumps the SPLs in order of ascending procid. But, this is just a few anecdotal observations.
Does anyone know if it is necessarily so that 'dbschema' orders SPLs (of same name) by ascending procid?
Thank you.
------------------------------
David Grove
------------------------------
↪ replying to David Grove
Art Kagel — source: IBM Community (ConnectedCommunity.org) Informix forum
Dbschema orders everything be it's object ID, yes.
If you need different ordering, myschema offers three alternatives. By name and hierarchical parent first or children first.
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Paul Watson — source: IBM Community (ConnectedCommunity.org) Informix forum
One of my tweaks to myschema dumps every entity to a unique file. For SPL it is a quick hack in print_procedures.ec
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.