× 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.


  • Subject: Universal SQL procedure
  • From: "Simmerlein, Stefan" <S.Simmerlein@xxxxxxxxxxx>
  • Date: Mon, 12 Mar 2001 14:23:41 +0100

Title: Universal SQL procedure

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 thread ...

Follow-Ups:

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.