If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Informix store procedure (version 5)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-22-04, 22:29
muiee80 muiee80 is offline
Registered User
 
Join Date: Dec 2003
Posts: 7
Informix store procedure (version 5)

Hey all,

currently i have one problem, i had write one store procedure, but when i try to create this procedure, it always end up with syntax error. It only happen when i create it using informix version 5.

CREATE PROCEDURE a_agent_proc(p_branch CHAR(3),p_intm_srl INT, p_mod CHAR(3))

DEFINE t_count INT;
# ^
# 201: A syntax error has occurred.
#
DEFINE t_agent CHAR(15);
DEFINE t_comp_code CHAR(6);
DEFINE t_branch CHAR(10);
DEFINE t_name CHAR(25);
DEFINE t_stat CHAR(1);

LET t_comp_code = "33";
LET t_agent = TRIM(p_branch)||LPAD(p_intm_srl,7,"0");
LET t_count = 0;
.....
......
........

This procedure i used to create using informix version 7, and it works. Thats why i suspect is informix version issue. Can somebody help me on this??

Thanks
Reply With Quote
  #2 (permalink)  
Old 11-23-04, 03:10
nog nog is offline
Registered User
 
Join Date: Nov 2004
Posts: 26
are you using isql or dbaccess?

I know isql doesn't recognise the create procedure syntax. (not on the version I'm using anyway)

Does v5 even support SPL?
Reply With Quote
  #3 (permalink)  
Old 11-23-04, 06:31
muiee80 muiee80 is offline
Registered User
 
Join Date: Dec 2003
Posts: 7
store procedure version 5

Hey, i had successful create the procedure under informix version 5, just must using informix super user to do that.

but i face another problems, the informix build-in function TRIM() and LPAD()
are not recogniced by informix version 5, do informix have another build in function to trim off the space for character and format the numeric which informix version 5 understand??

really need anyone help, thanks
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On