|
Paul, You should be able to use describe to get the field types and attributes and then run a create table. The iSeries-toolkit at www.iseries-toolkit.org has a CRTDBF command that uses this technique. It will take a select statement and then generate a database file for the results. So running CRTDBF DBF(mylib/myfile) SQLSTM('select * from somefile join anotherfile on somefile.key = anotherfile.key where selfield = 'xxx') Results in a file being created named myfile in mylib that contains the results of the select. It will recognize functions etc., so you can actually convert the type of a field. It does not generate DDS, but uses Create Table. The source is included and you could modify it to generate the dds, David Morris >>> qppaul@mmm.com 05/09/02 02:12AM >>> -- Is it possible to create a physical file with n number of fields dynamically. No of fields will be determined by SQLRPGLE program. Regards Paul.
As an Amazon Associate we earn from qualifying purchases.
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.