Start a new topic

informix stored procedure - 'Cannot parse source code for' ERROR

[This topic is migrated from our old forums. The original author name has been removed]

Hi @ all, I'm using DBvis 6.5 connecting to our Informix DB via Informix Dynamic Server 10.00.UC6 IBM Informix JDBC Driver for IBM Informix Dynamic Server 3.00.JC3 Some stored procedures (Functions) cannot be parsed correctly (they're in a correct syntax and can be executed e.g. in informix's SQL Editor without any error) - see following ERROR +An error occurred while executing the database request for:+ +Informix Dynamic Server+ +10.00.UC6+ +IBM Informix JDBC Driver for IBM Informix Dynamic Server+ +3.00.JC3+ +Short message:+ +Cannot parse source code for 'parse_test_error':+ +create procedure parse_test_error(p_monthend_date date default today) returning int+ +set debug file to './parse_test_error.trace';+ +trace off;+ +trace 'p_monthend_date = '||p_monthend_date;+ +return 0;+ +end procedure+ +document+ +"USAGE (e.g.):",+ +" execute procedure parse_test_error(",+ +" '30.10.2008' -- Date, which will be traced",+ +" );"+ +The command that caused the problem:+ +Could not read FUNCTION: parse_test_error+ +Long Message:+ +Cannot parse source code for 'parse_test_error':+ +create procedure parse_test_error(p_monthend_date date default today) returning int+ +set debug file to './parse_test_error.trace';+ +trace off;+ +trace 'p_monthend_date = '||p_monthend_date;+ +return 0;+ +end procedure+ +document+ +"USAGE (e.g.):",+ +" execute procedure parse_test_error(",+ +" '30.10.2008' -- Date, which will be traced",+ +" );"+ +Details:+ +Type: com.onseven.dbvis.G.B.L+ +System Information:+ +Product: DbVisualizer Personal 6.5+ +Build: #1339 (2008/10/23 11:47)+ +Java VM: Java HotSpot(TM) Client VM+ +Java Version: 1.6.0_05+ +Java Vendor: Sun Microsystems Inc.+ +OS Name: Windows 2000+ +OS Arch: x86+ +OS Version: 5.0+ Below you can find above stored procedure for testing: -- +first drop this procedure+ +drop procedure parse_test_error;+ -- +create procedure+ +create procedure parse_test_error(p_monthend_date date default today) returning int;+ +-- set debug-file name+ +set debug file to './parse_test_error.trace';+ +trace off;+ -- +just do something+ +trace 'p_monthend_date = '||p_monthend_date;+ -- +execution terminated successfully+ +return 0;+ +end procedure+ +document+ +"USAGE (e.g.):",+ +" execute procedure parse_test_error(",+ +" '30.10.2008' -- Date, which will be traced",+ +" );";+ +grant execute on parse_test_error to public;+ -- +execute procedure+ +execute procedure parse_test_error();+ Are there any specifics while writing/formatting stored procedures, so that they can be paresed correctly? Thanks Markus Lucassen Edited by: lulu on 06.11.2008 16:30

[This reply is migrated from our old forums.]

Re: informix stored procedure - 'Cannot parse source code for' ERROR
Hi Markus, Thanks for the detailed report. It helped me greatly when analyzing this. It turns out that this happens when a "function" (a routine with a "returns clause") is created with a CREATE PROCEDURE statement, as in your example. Apparently Informix accept this syntax for backward compatibility but classifies the result as a FUNCTION instead of a PROCEDURE. A fix to handle this case will be included in the next release, expected to be available within a week or so. Best Regards, Hans
[This reply is migrated from our old forums.]

Re: informix stored procedure - 'Cannot parse source code for' ERROR
Hi, Just to inform you that DbVisualizer 6.5.1 is now available with a fix for this issue. Best Regards Roger