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



Hello:

I have a few questions using Embedded SQL in RPG ILE scenario. Say for
example: I have 2 files. File A is a control file and File B is a
transaction data file.


                        File B has 5 fields: BFIELD1   char    10
                                                   BFIELD2   char    10
                                                   BFIELD3   char    10
                                                   BFIELD4   char    10
                                                   BFIELD5   char    10

                        File A has 1 Field : AField      Char      10

Now the data in File A is: Record 1: BFIELD1
                                            2: BFIELD2
                                            3: BFIELD5

The data above in File A are the field names I want to select from File B.

ProgramX should read File A and build an dynamic SQL statement using the
data from File A. and then the execution of the SQL should result the data
from File B.

Can this be done using EMBEDDED SQL? If yes does any one have a sample code.


Thanks for your help in advance.
GG







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.