Illegal variable in a Stored Procedure Stage???

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
jshurak
Participant
Posts: 74
Joined: Mon Jan 09, 2006 12:39 pm

Illegal variable in a Stored Procedure Stage???

Post by jshurak »

I'm trying to use the stored procedure stage to kick off....a stored procedure. It's aborting returning the following error message:

Code: Select all

LOAD_ACC_HIST_CHMX_STP..CREATE_EXTERNAL_TABLE: ORA-01036: illegal variable name/number
I can kick off the exact statement in SQL*Plus and it runs without errors. The statement is:

Code: Select all

BEGIN CREATE_DDL_XT_ACC_HIST_CHMX('#MMYY#'); END;
The MMYY being the variable. I'm not sure what's going on here. Does anyone have any ideas?

Please let me know if I'm providing enough information.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

This is how I am calling a SP successfully:

Send the parameter down the link to the Stored Procedure stage. My generated code is:

Code: Select all

BEGIN #$DW_SCHEMA#DMR_PKG_LD_PREMIER.PRC_CALC_DAILY_DISC(:1); END;
The value you send down the input link becomes the :1 in the stored procedure call. I actually read this value from a text file. The text file is written from a transformer once all the records have been committed.

Hope this helps,
John
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

What is the sql data type of your variable MMDD?
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is the data type of your stored procedure argument? If it's not a string, then the quote characters may be causing the error. You also need to investigate the CREATE EXTERNAL TABLE statement within the stored procedure, since it is this that is throwing the error.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply