• Subject: Re: DDS from SQL
  • From: Jromeh@xxxxxxx
  • Date: Sat, 4 Oct 1997 04:35:25 -0400 (EDT)

Date: Fri, 03 Oct 1997 11:07:17 -0600
From: David Morris <dmorris@plumcreek.com>
Subject: DDS from SQL -Reply

>>Can somebody tell me if I can (and how to) 'retrieve' the DDS from an
>>SQL created file? 

>You might look into the retrieve file description API QDBRTVFD.  We use it 
>for
>a similar purpose, it gives you what you would need.  The format of the 
>return
>information is very convoluted and confusing but you can work with it 
>(trial and
>error.)  There are simpler APIs, QUSLFLD, QUSLRCD, etc, that give back a
>subset of this information.  You might not give everything you want but the
>return info could be used to create an editable base.

Like Al and David suggested, we've created commands to do this for 
various file transforms, like converting signs and creating .CSV before 
CPYTOPCDs.  

If performance isn't your greatest concern (and why would it be in this 
case?) create a CL using TAATOOL/WRTSRC to process a command like:

RTVPFDDS PFILE(&lib/&file) SRCFILE(&srclib/&srcfil) 
SRCMBR(*PFILE|&srcmbr) REPLACE(*YES|*NO) 

It's pretty easy, there isn't much can happen in an SQL output file. Some 
steps:

Declare source buffer variable
Declare outfile template file

Bail on existing member with REPLACE(*NO)
DSPFFD to QTEMP outfile
Open source member using TAATOOL/WRTSRC
WRTSRC record format record
Loop on QTEMP outfile
  Handle field types
  WRTSRC field record
End Loop
Close source member using TAATOOL/WRTSRC

HTH, 


Jerome Hughes                     jromeh@aol.com
InterPro Consulting Services      www.interproinc.com
Rosemont, IL USA                  these are my own opinions only

OMNI User Communications Dir.     www.omniuser.org

"Remember, I started this company in my parent's garage." Steve Jobs



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...


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

This mailing list archive is Copyright 1997-2019 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].