|
Simon, Damn, you are good!! Thanks for the reply. I've been off for the past two days for some training. NOT SQL training though. As soon as I get through all of my email, I'll make the changes. Thanks, Mark Mark Walter Sr. Programmer/Analyst Hanover Wire Cloth a div of CCX, Inc. mwalter@hanoverwire.com http://www.hanoverwire.com 717.637.3795 Ext.3040 "Simon Coulter" <shc@flybynight.c To: rpg400-l@midrange.com om.au> cc: Sent by: Subject: Re: SQL Problem rpg400-l-admin@mi drange.com 09/11/2002 02:08 AM Please respond to rpg400-l Hello Mark, You wrote: > SQL5011 30 97 Position 44 Host structure array DSDATA not defined > or not usable. This is wierd. I played with your code and found the same as you. Without the last two procedures it compiles OK. Actually, the problem procedure is dltInvGlmF -- without that one it compiles OK. I compiled different versions of the source removing a different procedure until I had successful compiles. If you specify OUTPUT(*PRINT) when compiling the SQL program you will see that SQL does find the definition of DSDATA so that means the problem is that DSDATA is unusable -- presuming the error message is accurate. OK, lets make that presumption. What is it about dltInvGlmF that makes it different? By a process of elimination I discovered that the dltInvGLmF procedure will compile if the getAllInvGlmF procedure is removed thus we learn that there is contention between getAllInvGlmF and dltInvGlmF. So, what is common to these procedures? Following the rules of RPG IV we find nothing is common. However, we are dealing with the retarded SQL precompiler here so what would it consider common? Since we have previously learned that the SQL precompiler does not understand local variables we can surmise that the local procedure variables declared on the PI for dltInvGlmF (tcode, comno, and itcls) are clashing with the subfields of the same name in the DSDATA data structure. Changing the names of the parameters defined on the dltInvGlmF PI, or adding a prefix to the definition of DSDATA will solve the problem. You could also put each SQL procedure in a separate compilation unit (or at least the two that clash) and bind the resulting modules together. Another problem solved ... damn, I'm good! Forcing programmers to perform these sorts of contortions in order to use both SQL and RPG IV is insane. The sooner Toronto and Rochester replace the SQL precompiler the better. The more I use it the less impressed I am. It's very close to the worst piece of software to come out of IBM -- the worst being PROFS, blech! Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 mailto: shc@flybynight.com.au \ / X ASCII Ribbon campaign against HTML E-Mail / \ -------------------------------------------------------------------- _______________________________________________ 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.