RE: SPL Bug?
Posted in 2008
I've gotten strange errors before if I assign a char value to ''. I've always used a blank space, ' '. HTH. Thank you, Jim Goldrick Judson University 1151 North State Street Elgin, Illinois 60123 573-332-7739 http://www.judsonu.edu jgoldrick@judsonu.edu ________________________________ From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of Art Kagel Sent: Thursday, June 26, 2008 10:15 PM To: informix-list@iiug.org Subject: SPL Bug? Version: IDS 11.50.UC1X2 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 = ''; LOOP FETCH acurs INTO hold; LET final = 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. 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 report this one in the AM, but it would be good if someone else has seen it before. -- Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) 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.