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


  • Subject: Re: SQL pre-compiler
  • From: "Nelson C. Smith" <ncsmith@xxxxxxxx>
  • Date: Sat, 24 Jul 1999 17:12:07 -0400

So, John, have you heard anything back from Rochester on the problems we
were having with the SQL precompiler?  I've run into another serious problem
which I'm not sure if it's something I'm doing wrong or the precompiler.

I have procedures which fetch multiple records into a multiple occurrance
data structure used as a host variable array using the Define Cursor and
Fetch Next For xx Rows method.  The procedures work fine until I include
some null-capable fields in what I'm fetching.
Then the system REQUIRES an associated host variable array for the null
indicators.  Here's where I run into trouble.

 I cannot get the precompiler to accept anything for an indicator host
variable except individual fields.  However, all the manuals say it has to
be another multiple occurrance data structure with the same number of
occurrances as the base MODS has.  Also, (and there is some disagreement
between manuals on this point) it should have one 4B 0 field for each field
in the base MODS (one manual says for each null-capable field and another
says for every field).  No matter how I try to define it, the precompiler
says it is "not defined or useable" whatever that means.  Some of the
reasons given are nonsensical, such as "an indicator array cannot have more
than one element".

Anyway, I thought you might could pass this along to your fiends in
Rochester and see if it is something in the precompiler or just something
I'm defining wrong.  Do you know of anyone who actually has a program
working that retrieves multiple records containing null fields?  The QADB
files in QSYS for example?

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.