|
Hi guys.
I hope anyone can help me.
I need an "universal sql procedure" (RPGIV)
The only parameter is the sql-statement
The result of the sql-procedure should be the whole record of the sql or only the
fields that i have selected in the sql-statement.
Until now we solved the problem on this way.
We have a sql_procedure with 2 parms.
For Example:
callp sql_exec('FILENAME':SQL_STATEMENT)
In the procedure we have a select-statement on the filename.
For every file we have DECLARE, PREPARE, ...... statements and
export-data-structures.
The problem:
For every new file in the sql-procedure we need a
new cursor/declare/prepare statement and the
export-data-strcuture declaration.
For Example:
d file1_ds e ds extname(file1)
d file2_ds e ds extname(file2)
d file3_ds e ds extname(file3)
How can i make this universal ? With only one cursor declaration and
one global Export-DS ?
Stefan
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.