× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 25-Jun-2015 12:57 -0600, John R. Smith, Jr. wrote:
I need to generate DDS for a BUNCH of PFs. I have tried several
versions of programs that retrieve DDS and all of them seem to have
bugs that are making this task even more difficult. To add more
difficulty, some of the specific in them (record format name, keys,
etc.) has to be modified slightly from the original.

I have given up on the freebie products and I am working on writing
something that will do exactly what I need. To do this, I am trying
to avoid APIs and DSPFFDs to an outfile. Instead I am trying to
obtain the details using SQL. I found SYSCOLUMNS which provides all
of the field level information.


Unless things have changed beyond what I recall, /all/ is too generous a term both for the SYSCOLUMNS and even the underlying table QADBIFLD; numeric editing surely remains unavailable, and possibly still the VARLEN(vlen) vlen-specification is not included.

The tracking of the file\field information is available mostly to supply data for the SQL Catalog VIEWs [and for the IDDU], so avoiding the APIs [e.g. QDBRTVFD] or avoiding both of the Display File Field Description (DSPFFD) and Display File Description (DSPFD) to get the field/reference/key/format information is not realistic for the sake of completeness; and files in QTEMP are not [yet] tracked in the *DBXREF [System Database Cross Reference] files, so testing would be limited to test-files created in permanent libraries.


I have not been able to find anything that tells me the record
formats or keys.

The record format is in the underlying data; column DBIFMT of QADBIFLD (use QADBIATR as an authorized LF to get the same data).

Key field information is in SYSKEYS and QADBKFLD (use QADBKATR as an authorized LF to get the same data).


Also, if the file has multiple record formats, how
do I know which fields in SYSCOLUMNS belongs to which format?


Each Record Format (RCDFMT) is maintained in the underlying file and the column DBIFMP of QADBIFLD is the relative format to distinguish between same-named formats in a Multiple Format Logical File (MFLF); an MFLF precludes tracking by the SQL Catalogs as the file is considered non-relational, and thus DBIREL='N', but an effective predicate in the SYSCOLUMNS is DBIREL='Y'.


We are running 6.1.

Can anyone help point me in the right direction?


Perhaps use the "Generate SQL" Generate Data Definition Language (QSQGNDDL) API instead? The TABLE sources will not be limited to only the DDS-supported data types.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.