|
Andrew, Do you have a support contract? If so, will you open up a pmr? ( Now how does that line go from "Alice's Restaurant" that if we have a certain number of people we have a movement?) Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Andrew Lutz" <alutz@pmigroup.c To: <rpg400-l@midrange.com> om> cc: Sent by: Fax to: rpg400-l-admin@mi Subject: Re: SQL precompiler does not support qualified variables drange.com 02/27/2002 04:48 PM Please respond to rpg400-l Rob, Try using a sub-procedure that uses the non-qualified based on data structure. The address you will base it on is located external from your mainline. I sympathize with your plight, I am developing a data access layer methodology that will communicate via qualified data structures that are driven with embedded SQL. >>> rob@dekko.com 02/27/02 01:24PM >>> I see where you are going but you're moving an individual field A_SQL_30_CHAR_LONG_FIELD_NAME into a data structure. When most of the times you would be moving that field into a datastructure subfield. Also, you're assuming that the unqualified data structure is not in use. Granted that in a subprocedure it might not be. But if I have to create this unqualified data structure, then I have no purpose for the qualified one, thus the basing buys me nothing. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Andrew Lutz" <alutz@pmigroup.c To: <rpg400-l@midrange.com> om> cc: Sent by: Fax to: rpg400-l-admin@mi Subject: Re: SQL precompiler does not support qualified variables drange.com 02/27/2002 03:16 PM Please respond to rpg400-l Rob, Here is a code sample, it doesn't do much here, but it compiles, runs and I am able to debug values retrieved using the qualified names. BTW I do agree IBM should not make us jump through hoops..... D Table1 E DS EXTNAME(ATESTTABLE) D QUALIFIED D Table1A E DS EXTNAME(ATESTTABLE) D BASED(Table1Ptr) C EVAL Table1Ptr = %ADDR(Table1) C/Exec SQL C+ SELECT A_SQL_30_CHAR_LONG_FIELD_NAME INTO C+ :Table1A FROM A_TEST_TABLE_FOR_DEMO_USE C+ WHERE A_SQL_30_CHAR_LONG_FIELD_NAME = 'B' C/End-Exec C RETURN Andrew Lutz Database Administrator (916) 851-7140 alutz@pmigroup.com >>> rob@dekko.com 02/27/02 11:16AM >>> Andrew, I like qualified variables because it allows me to have the same variable name for different meanings. Let's take trigger programs for an example. Picture 3 data structures D NEW E DS EXTNAME(LOGIN) QUALIFIED D OLD E DS LIKEDS(NEW) D WORK E DS LIKEDS(NEW) Put the new buffer into new, the old buffer into old and use the work for temporary values. And if the file has a field called LibName then you will have new.libname, old.libname, work.libname. I use based on variables. I have no problem with them, when applicable. But if I have to do D WORK E DS LIKEDS(NEW) D MyBasedVar s like(work.libname) based(pMyBasedVar) D pMyBasedVar s * Then that won't work either because MyBasedVar is defined like a qualified name I would have to have D ThisVar s 3a Notice, no like allowed because my like would be like the 'sql intolerant' qualified name I suppose I could do: D LOGIN E DS EXTNAME(LOGIN) D NEW E DS LIKEDS(LOGIN) D OLD E DS LIKEDS(LOGIN) D WORK E DS LIKEDS(LOGIN) And the variables in the login datastructure would not be qualified. Me, I'd rather they fix the problem versus me having to constantly work around. Although violence would be temporarily satisfactory. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com 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@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com 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@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com 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@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com 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.