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



First off, I think I am somewhat confused about these things. I know I ran into some confusion a couple weeks ago when I was trying to use tests for NULL attributes.

And I wonder if this stuff is part of the tightening of SQL constructs done around 6.1 - here is a statement from V5R2 of the SQL Reference:

"The reference :S1:S2 is a host structure reference if S1 names a host structure. If S1 designates a host structure, S2 must be either a small integer variable, or an array of small integer variables. S1 is the host structure and S2 is its indicator array."

That suggests we CAN use an array that is of the same size as the number of elements in the structure - in fact, the documentation says much about when the sizes don't match. But this is an SQL reference, not RPG reference, and I didn't find an example like this.

I found that I could not use at 7.1 an array for the indicator variables. I had to have a structure with the same number of subfields as the DS for the fields.

Here's a thought - a data structure for the record is column-based - maybe the indicator "array" really has to be a similar structure of int(5 : 0)'s that are also column-based. As far as SQL is concerned, it sees it as an array - a set of contiguous values of the same data type. But for RPG it has to be a DS.

I see that at 7.3 that the LIKEREC and EXTNAME keywords can specify *NULL - this makes a data structure that matches the columns - the data type is indicator - so this is NOT usable for SQL.

I'd like to at least see the LIKEREC or EXTNAME keywords to have an option for *SQLIND (or whatever) to generate this related indicator "array" as a data structure - is that in any RFE?

Cheers
Vern

On 11/18/2016 10:37 AM, Peter Dow wrote:
What else is it about? A google for "SQL null indicator array" finds it. Are you saying /you/ use it for more than just nulls? Or the system does? If the system, what else does it use it for?


On 11/17/2016 9:11 PM, dlclark@xxxxxxxxxxxxxxxx wrote:
"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 11/17/2016
05:10:27 PM:
What would be nicer, imho, is if we didn't have to keep track of those
null indicators - let the system do it. Provide us with a function
%isNull(fieldname) or something, and let it figure it out. Sooo much
simpler.
To all the recent responses.... Keep in mind that the SQL
Indicator array is about so much more than just nulls. This is why it is
NOT called the SQL Null Indicator array.

Sincerely,

Dave Clark



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.