|
The problem is that it is not referring to them in the SQL. Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com cozzi@xxxxxxxxx Sent by: To: rpg400-l@xxxxxxxxxxxx rpg400-l-bounces@xx cc: drange.com Subject: Re: Going Nuts 07/31/2003 10:58 AM Please respond to RPG programming on the AS400 / iSeries SQL can only refer to GLOBAL variables. So if it is used in a procedure is may not work or compile. -Bob > > 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 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.