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



rob wrote:

> 1 - member type is SQLRPGLE and not RPGLE, right?
> 2 - Code snippet please.  Because the lines below should be in a declare 
> cursor.



hi rob,

yes member type is SQLRPGLE...   i have other SQL statements working ok...



 D  Sql_MainAct    S            200    INZ('Select distinct * from      -      
 D                                     LEVNTN0P where ENEVRF in         -       
 D                                     (Select E1EVRF from LEVNAC1L')           
        
                                                                   


0273.00  *    Dynamically construct SQL statement                              
0274.00                                                                        
0275.00 C                   If        @SortByActn  = *Off                      
0276.00 C                   Eval      Sql_Command  = Sql_Main                  
0277.00 C                   Else                                               
0278.00 C                   Eval      Sql_Command  = Sql_MainAct               
0279.00 C                   EndIf                                              
0280.00   

xxxxx  other selection stuff for other options

0319.00                                                                    
0320.00  *    Prepare SQL cursor                                           
0321.00                                                                    
0322.00 C/Exec SQL                                                         
0323.00 C+ Prepare SqlMasterRead From :Sql_Command                         
0324.00 C/End-Exec                                                         
0325.00                                                                    
0326.00                                                                    
0327.00  *    Declare SQL cursor                                           
0328.00                                                                    
0329.00 C/Exec SQL                                                         
0330.00 C+ Declare @Master_Read cursor for SqlMasterRead                   
0331.00 C/End-Exec                                                         
0332.00                                                                    
0333.00 C/Exec SQL                                                         
0334.00 C+ Open @Master_Read                                               
0335.00 C/End-Exec                                                         
0336.00                                                                    
0336.00                                                                      
0337.00  *    MAIN READ LOOP                                                 
0338.00                                                                      
0339.00 C                   DoU       SqlCod <> 0                            
0340.00                                                                      
0342.00 C/Exec SQL                                                           
0343.00 C+    Fetch         NEXT From @Master_Read                           
0344.00 C+    Into          :Mst_Record                                      
0345.00 C/End-Exec                                                           
0354.00                                                                      
0355.00 C                   If        SQLCOD   = 0                           
0356.00                                                                      
0357.00  *    Populate subfile fields                                        
0358.00                                                                      


at this point SQLCOD is -206

which according to the IBM library means:

SQL0206 
Message Text: Column &1 not in specified tables. 
Cause Text: &1 is not a column of table &2 in library &3. If the table is *N, 
&1 is not a column of any table or view that can be referenced. 
Recovery Text: Do one of the following and try the request again: 
Ensure that the column and table names are specified correctly in the 
statement. 
If this is a SELECT statement, ensure that all the required tables were named 
in the FROM clause. 
If the column was intended to be a correlated reference, qualify the column 
with the correct table designator. 
 
SQLCODE or SQLCODEs: -206 

The subfile screen comes back as blank... 

The job log contains the message:  
"Column E1ACDT not in specified tables."                                        
                                          

cheers,
max


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.