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



Sorry but I created a logical file and opted for that over the SQL for now.
Bosses, you know. However the setgt is on one file and the SQL is on
another. I've mixed SQL and traditional code in a subprocedure before
without any problems. And, there are no missed semi-colons. That was the
first thing I checked.

Thanks,

Mark

Mark D. Walter
Senior Programmer/Analyst
CCX, Inc.
mwalter@xxxxxxxxxx
http://www.ccxinc.com


                                                                                
                                                                    
                    Joel Cochran                                                
                                                                    
                    <jrc@xxxxxxxxxx>           To:     RPG programming on the 
AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>                               
                    Sent by:                   cc:                              
                                                                    
                    rpg400-l-bounces@xx        Subject:     Re: Going Nuts      
                                                                    
                    drange.com                                                  
                                                                    
                                                                                
                                                                    
                                                                                
                                                                    
                    07/31/2003 11:06 AM                                         
                                                                    
                    Please respond to                                           
                                                                    
                    RPG programming on                                          
                                                                    
                    the AS400 / iSeries                                         
                                                                    
                                                                                
                                                                    
                                                                                
                                                                    




Mark,

I'm having a little trouble relating the snippet you sent to your
message, so I'm going to focus on your message:

First, you cannot have setgt, eof, or other file processing code in an
SQL procedure, it is either SQL of File processing.

Second, X is obviously defined, but where is it being used?  It could be
something as simple as a missing semi-colon.

Third, the actual physical order of the source lines DOES matter in an
SQL program, so you may be on to something there.

I don't know if any of this helps or not.  You can send me more code if
you want and I'll look at it.

Thanks,

Joel
http://www.rpgnext.com


On Thu, 2003-07-31 at 10:36, MWalter@xxxxxxxxxxxxxxx wrote:
> OK, maybe someone can tell me why this is happening. Here is the code
> snippet:
>
>  DstrDate          S             14  0
>  DendDate          S             14  0
>
>  DsqlStmt          S            500    varying
>  Dx                S              3  0
>  Dcodes            DS             5    DIM(10)  qualified
>  Dhours            DS             5    dim(10)  qualified
>
>   /free
>
>     reset dsHrs;
>     reset Hours;
>     reset Codes;
>
>     // get date range. the previous saturday to the previous saturday
>     setgt chkdate Kalendl8;
>     dou %eof(Kalendl8);
>        readp Kalendl8;
>        if %eof(Kalendl8);
>           return;
>
>
> Firstly the compiler tells me that x is not defined (It is used farther
> down the program)
> Then it tells me that Kalendl8 is not defined. for the 'dou
%eof(Kalendl8);
>
> This code is in a subprocedure that contains SQL. Don't know if that has
> anything to do with it or not.
>
>
>
> Thanks,
>
> Mark
>
> Mark D. Walter
> Senior Programmer/Analyst
> CCX, Inc.
> mwalter@xxxxxxxxxx
> http://www.ccxinc.com
>
> _______________________________________________
> 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.