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



----- Original Message -----
From: "Joe Pluta" <joepluta@xxxxxxxxxxxxxxxxx>
To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
Sent: Sunday, February 17, 2008 11:16 AM
Subject: Re: SQL0314 on V5R4 - Was (Encapsulation - Service Programs,Procedures, SQL, LDA, etc.)


Have you tried just using simple variable names?

Oddly enough, just pulling the DirE and DirGrp out of the Qualified DataStructure was enough to make it work.

Basically, I changed my D-Specs to define the subfields separately as such:
D DirEDs ds likeds(l_DirEDs) inz
D DirE s like(l_DirEDs.DirE) inz
D DirGrp s like(l_DirEDs.DirGrp) inz

Then I also changed the SQL to use the simple variables and added code to move data in/out of the data structure manually. It is not pretty, but at least it compiles.

Summary when using sql host variables in more than one procedure:
Unique Qualified DS in SQL = Ok
Duplicate Simple Variables in SQL = Ok
Duplicate Qualified DS in SQL = Kaboom

Hopefully none of this will be needed in V6R1.

Thanks for the input, Joe. Good to see I am not the only one around on a Sunday morning. I was getting ready to pull my hair out,
JD

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.