This is a multi-part message in MIME format.
------_=_NextPart_001_01C8D853.27E2FD96
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I've gotten strange errors before if I assign a char value to ''. I've
always used a blank space, ' '. HTH.
=20
Thank you,
Jim Goldrick
Judson University
1151 North State Street
Elgin, Illinois 60123
573-332-7739
http://www.judsonu.edu
jgoldrick@[EMAIL PROTECTED]
informix-list-bounces@[EMAIL PROTECTED]
On Behalf Of Art Kagel
Sent: Thursday, June 26, 2008 10:15 PM
To: informix-list@[EMAIL PROTECTED]
SPL Bug?
=20
Version: IDS 11.50.UC1X2=20
Platform: 2.6.18
Has anyone seen this one yet? Long complex SPL function with dynamic
SQL. Somewhere in the function as assign the contents of a variable
(type LVARCHAR(200)) to another var (type LVARCHAR(6000)) to append to
the var. The assignment returns a -661 error:
-661 Number of variables does not match number of values returned.
The number of variables on the left side of a LET statement does not
match the number of values on the right side.
So, in pseudo code:
DEFINE final LVARCHAR(6000);
DEFINE hold LVARCHAR(200);
LET final =3D '';
LOOP
FETCH acurs INTO hold;
LET final =3D final || hold; -- Gets -661 error exiting the SPL
function.
....
END LOOP
Tried an intermediate var, it fails in that assignment instead. Tried
renaming the var I'm fetching into, no change. Since the string being
assigned contains a URL, though there might be strange characters
causing the problem, so I tried replacing the assignment of the entire
var with a loop that appends each character one at a time using
SUBSTR(hold, pos, 1) looping on pos from 1 to length(rtrim(hold)). It
fails with the same -661 error on assigning the first character, the 'h'
from 'http:' at the start of the URL. =20
I had this the other day (same function, different assignment).
Converting several hard coded SQL statements into dynamic ones got me
past this, now its back. I'll re****t this one in the AM, but it would
be good if someone else has seen it before.
--=20
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@[EMAIL PROTECTED]
)
Disclaimer: Please keep in mind that my own opinions are my own opinions
and do not reflect on my employer, Oninit, the IIUG, nor any other
organization with which I am associated either explicitly or implicitly.
Neither do those opinions reflect those of other individuals affiliated
with any entity with which I am affiliated nor those of the entities
themselves.
------_=_NextPart_001_01C8D853.27E2FD96
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
..shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags" =
name=3D"PostalCode"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"State"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"City"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"Street"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"address"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"PlaceName"/>
<o:SmartTagType =
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"
name=3D"place"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@[EMAIL PROTECTED]
11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@[EMAIL PROTECTED]
Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dblue>
<div class=3DSection1>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>I’ve gotten strange errors =
before if
I assign a char value to ‘’. I’ve always used a =
blank space,
‘ ‘. HTH.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<p><font size=3D2 color=3Dnavy face=3D"Times New Roman"><span =
style=3D'font-size:10.0pt;
color:navy'>Thank you,<br>
<br>
Jim Goldrick<br>
<st1:place w:st=3D"on"><st1:PlaceName w:st=3D"on">Judson</st1:PlaceName> =
<st1:PlaceName
w:st=3D"on">University</st1:PlaceName></st1:place><br>
<st1:Street w:st=3D"on"><st1:address w:st=3D"on">1151 North State =
Street</st1:address></st1:Street><br>
<st1:place w:st=3D"on"><st1:City w:st=3D"on">Elgin</st1:City>, =
<st1:State w:st=3D"on">Illinois</st1:State>
<st1:PostalCode w:st=3D"on">60123</st1:PostalCode></st1:place><br>
573-332-7739<br>
<a href=3D"http://www.judsonu.edu">http://www.judsonu.edu</a><br>
jgoldrick@[EMAIL PROTECTED]
></font><font color=3Dnavy><span =
style=3D'color:navy'> </span></font><o:p></o:p></p>
</div>
<div>
<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>
<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>
</span></font></div>
<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'>
informix-list-bounces@[EMAIL PROTECTED]
[mailto:informix-list-bounces@[EMAIL PROTECTED]
=
<b><span
style=3D'font-weight:bold'>On Behalf Of </span></b>Art Kagel<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Thursday, June 26, =
2008
10:15 PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
informix-list@[EMAIL PROTECTED]
>
<b><span style=3D'font-weight:bold'>Subject:</span></b> SPL =
Bug?</span></font><o:p></o:p></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><font size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>Version: =
IDS
11.50.UC1X2 <br>
Platform: 2.6.18<br>
<br>
Has anyone seen this one yet? Long complex SPL function with =
dynamic
SQL. Somewhere in the function as assign the contents of a =
variable (type
LVARCHAR(200)) to another var (type LVARCHAR(6000)) to append to the =
var.
The assignment returns a -661 error:<o:p></o:p></span></font></p>
<div style=3D'margin-left:30.0pt'>
<p class=3DMsoNormal style=3D'margin-bottom:12.0pt'><font size=3D3
face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'>-661
Number of variables does not match number of values returned.<br>
<br>
The number of variables on the left side of a LET statement does not<br>
match the number of values on the right =
side.<o:p></o:p></span></font></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>So, in pseudo code:<br>
DEFINE final LVARCHAR(6000);<br>
DEFINE hold LVARCHAR(200);<br>
LET final =3D '';<br>
<st1:place w:st=3D"on">LOOP</st1:place><o:p></o:p></span></font></p>
<div style=3D'margin-left:30.0pt'>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>FETCH acurs INTO hold;<br>
LET final =3D final || hold; -- Gets -661 error =
exiting
the SPL function.<br>
....<o:p></o:p></span></font></p>
</div>
<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'>END <st1:place w:st=3D"on">LOOP</st1:place><br>
<br>
Tried an intermediate var, it fails in that assignment instead. =
Tried
renaming the var I'm fetching into, no change. Since the string =
being
assigned contains a URL, though there might be strange characters =
causing the
problem, so I tried replacing the assignment of the entire var with a =
loop that
appends each character one at a time using SUBSTR(hold, pos, 1) looping =
on pos
from 1 to length(rtrim(hold)). It fails with the same -661 error =
on
assigning the first character, the 'h' from 'http:' at the start of the
URL. <br>
<br>
I had this the other day (same function, different assignment).
Converting several hard coded SQL statements into dynamic ones got me =
past
this, now its back. I'll re****t this one in the AM, but it would =
be good
if someone else has seen it before.<br>
<br>
-- <br>
Art S. Kagel<br>
Oninit (<a href=3D"http://www.oninit.com">www.oninit.com</a>)<br>
IIUG Board of Directors (<a =
href=3D"mailto:art@[EMAIL PROTECTED]
">art@[EMAIL PROTECTED]
>)<br>
<br>
Disclaimer: Please keep in mind that my own opinions are my own opinions =
and do
not reflect on my employer, Oninit, the IIUG, nor any other organization =
with
which I am associated either explicitly or implicitly. Neither do those
opinions reflect those of other individuals affiliated with any entity =
with
which I am affiliated nor those of the entities =
themselves.<o:p></o:p></span></font></p>
</div>
</body>
</html>
------_=_NextPart_001_01C8D853.27E2FD96--


|