Re: Compiling 4GL code in RDS 6.00 is not like RDS 4.00
Posted in 1998
In article <6bcfoq$nel$1@news.xmission.com>, Joseph Cullipher
<joseph@cannonexpress.com> writes
>
>I seem to remember a bug with the 6.00 version of 4GL that would give
>this error on a declare statement after an into temp statement. I just
>rearrianged my code to fix the problem until I got an upgrade. I believe
>this problem is fixed in 6.02.
>HTH
>
Latest is 6.05 !!
PS You will find some other code does not work:-
DECLARE QC1 CURSOR FOR SELECT..FOR UPDATE
OPEN CURSOR QC1
FETCH CURSOR QC1 INTO..
LET my_str = "UPDATE ..WHERE CURRENT OF QC1"
PREPARE P1 FROM my_str
EXECUTE P1 USING...
This will fail are under 6.x cursor names are 'mangled' to
make them all global.
You need to use
LET my_str = "UPDATE ..WHERE CURRENT OF ", CURSOR_NAME("QC1")
PREPARE P1 FROM my_str
EXECUTE P1 USING...
Unfortunately the CURSOR_NAME() function does not exist in 6.00!!!
It was a logged as bug in 6.00 and the CURSOR_NAME() function was
introduced in 6.01.
>Joseph
>
>-------------------------------------------------------------------------
>Joseph Cullipher <joseph@cannonexpress.com> Standard Disclaimers Apply
>-------------------------------------------------------------------------
>
>On Thu, 5 Feb 1998, Anatoly Yu. Nelyubin wrote:
>
>> Hello !
>>
>> I think about upgrade from 4GL RDS 4.x to 4GL 6.00 (and about new
>> server).
>>
>> Now i have many application, which was compiled in 4GL correctly, but
>> i can not compile them in the RDS 6.0
>> For example, i can not compile this code:
>>
>> DROP TABLE temp_1
>> LET wherePart = shift1(wherePart)>>
>> SELECT z.code,z.zname,m.maska,l.tarif,u.name,g.gname,
>> s.servname, l.date_end
>> FROM zone_fn z,OUTER mask_fn m,OUTER(tar_fn l,unit u,grp_conn g,service
>> s)
>> WHERE z.code=m.code_zone
>> AND z.code=l.code_zone
>> AND u.code=l.code_unit
>> AND g.code=l.code_grp
>> AND s.code=l.code_serv
>> INTO TEMP temp_1>>
>> LET stText =
>> 'SELECT * FROM temp_1 WHERE ',wherePart CLIPPED, ' ORDER BY ',
>> wherePart1 CLIPPED
>>
>> PREPARE stId1 FROM stText
>> DECLARE c1 CURSOR FOR stId1
>> |
>> | CURSOR not on SELECT statement.
>> | See error number -363.
>>
>>
>> But when i comment this SQL operator
>>
>> SELECT z.code,z.zname,m.maska,l.tarif,u.name,g.gname,
>> s.servname, l.date_end
>> FROM zone_fn z,OUTER mask_fn m,OUTER(tar_fn l,unit u,grp_conn g,service
>> s)
>> WHERE z.code=m.code_zone
>> AND z.code=l.code_zone
>> AND u.code=l.code_unit
>> AND g.code=l.code_grp
>> AND s.code=l.code_serv
>> INTO TEMP temp_1>>
>> all work correctly
>>
>> Thank's for any response
>>
>
--
David Williams
Maintainer of the Informix FAQ
Primary site (Beta Version) http://www.smooth1.demon.co.uk
Official site http://www.iiug.org/techinfo/faq/faq_top.html
I see you standin', Standin' on your own, It's such a lonely place for you, For
you to be If you need a shoulder, Or if you need a friend, I'll be here
standing, Until the bitter end...
So don't chastise me Or think I, I mean you harm...
All I ever wanted Was for you To know that I care