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



I have looked at so many contradictory examples of Stored procedures that my
eyes have gone foggy!

Can somebody with more experience than me please confirm the following:

If you specify PARAMETER STYLE GENERAL then you get passed one parameter for
each of the parameters declared to the procedure.

If you add WITH NULLS then the first group of parms is followed by an equal
number of parms representing the null flags.

Because the null flags are consecutive in memory, defining an array as the
first null flag parm allows you to access null flags 1 to n.

If you specify STYLE SQL then to the above list you add additional parms for
SQLSTATE and a bunch of other stuff. However, in this case - even when using
an array over the null indicators - you must still specify the other n -1
null parameters (even if you don't use them) or the SQLSTATE etc. parms will
not line up.

So - if I have 2 parms and use STYLE SQL, then my parm list looks like this:

Parm1
Parm2
Null_Ind_Parm1  (Can specify Dim(2) here)
Null_Ind_Parm2
SQLSTATE
etc.


Jon Paris
Partner400

www.Partner400.com
www.RPGWorld.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.