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



You can get around this.

You need to have all the sql in one module (MOD2) and the non-sql code in
another module (MOD1).

In MOD1, define a qualified data structure.

>From MOD1, call the sql subprocedure in MOD2 that contains the FETCH
statement, passing the address of the qualified data structure.  In MOD2,
after the FETCH, assign the address of MOD2's datastructure to the pointer
you passed in. On return, the qualified data structure in MOD1 will have
your data.

Phil



                                                                                
                                          
                      "Wills, Mike N.                                           
                                          
                      (TC)"                     To:       RPG programming on 
the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>  
                      <MNWills@taylorcor        cc:                             
                                          
                      p.com>                    Subject:  RE: SQL and qualified 
DS                                        
                      Sent by:                                                  
                                          
                      rpg400-l-bounces@m                                        
                                          
                      idrange.com                                               
                                          
                                                                                
                                          
                                                                                
                                          
                      05/28/2004 10:35                                          
                                          
                      AM                                                        
                                          
                      Please respond to                                         
                                          
                      RPG programming on                                        
                                          
                      the AS400 /                                               
                                          
                      iSeries                                                   
                                          
                                                                                
                                          
                                                                                
                                          




Yes, I ran into this problem in the past (it is in the archives). You can't
use qualified DS for SQL.

Mike Wills
Taylor Development
Lawson Administrator/Programmer
Ph. (507) 386-3187

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Frank.Kolmann@xxxxxxxxxx
Sent: Thursday, May 27, 2004 7:27 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: SQL and qualified DS





Hi Everyone

I  did a  SQL PREPARE  to set up and SQL insert with parm markers.
Then an SQL EXECUTE USING and I tried a qualified DS to pass variables.
Program compiled but when it ran it did not work properly.

I am confused.
The archives have examples that seem to show that qualified DS can be used
with SQL but the heading reads as SQL precompiler does not support
qualified
variables .

Are there issues with SQL and qualified DS.
we are on V5R2.

Regards
Frank Kolmann


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.