|
Birgitta, It seems that the variables that I was using are defined in only 2 sub procedures, but in one they are numeric, and the other they are character. It seems that it is not respecting the scope of the variable, but is taking subprocedure variables and treating them as global. I have modified my program, but shudder to think what may be waiting to bite me in the future. Thanks, Jeff Young Sr. Programmer Analyst Dynax Solutions, Inc. A wholly owned subsidiary of enherent Corp. IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 IBM Certified Specialist- e(logo) server i5Series Technical Solutions Designer V5R3 IBM Certified Specialist- e(logo)server i5Series Technical Solutions Implementer V5R3 ----- Original Message ---- From: "Hauser, Birgitta" <Birgitta.Hauser@xxxxxxxxxxx> To: "rpg400-l@xxxxxxxxxxxx" <rpg400-l@xxxxxxxxxxxx> Sent: Friday, January 19, 2007 2:52:22 AM Subject: Re: SQL using subprocedure variables - v5r4 Hi, in release V5R2 and before it was already documented, that variables used in embedded SQL statements must be defined unique in the source, even if they are defined locally. But it never was checked by the precompiler. Under release V5R3 the precompiler checks for duplicated variables and throws an error message with error level 30. The only way to get the sources recompiled under release V5R3 is to rename the host variables. With release V5R4 it is changed again: Now you can define standalone variables and parameter fields (in procedure interfaces) that are used in SQL-statement several times. If the variables have the same data type and length, they are accepted. If the variables have the same data type but different length, the precompiler throws a warning (error level 11). If the variables are defined differently the precompiler throws an error with error level 30 Even in release V5R4 data structures and subfields in unqualified data structures must be unique in the source. If you use always the same data structure name, to hold the result of a fetch statement in different procedures, you have to rename the data structures. ... we also have to fight with these "enhancements". IMHO all sources that could be compiled in a previous release must be compilable in a higher release. Birgitta
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.