Page 1 of 1

execute oracle procedure in routines

Posted: Wed Feb 02, 2011 1:57 pm
by dsisbank
Hi,
I have a routine to insert job info into database for logging. I generated below statement.
"echo EXEC SP_DSJOB_STATUS_BEFORE ( '10084', 'SifreTesti2', '', '9', '2011-02-02 16:45:03','--UNKNOWN--','19000101_000000','','' ); |sqlplus -S USER_1/PASS1234@TNS_NAMES "

OS of DataStage is windows and OS of Oracle is UNIX.

When i execute statement on prompt screen, it works fine but DataStage gave me below error. (Call DSExecute("DOS", command, Output, ReturnCode))

ORA-01741:


how can i solve this problem.

Posted: Wed Feb 02, 2011 2:26 pm
by chulett
Did you look up what a "ORA-01741" means?

Posted: Wed Feb 02, 2011 2:36 pm
by dsisbank
Of course I looked up. I tried so much.
when I send to statement included inverted comma, DataStage deleted inverted comma in my statement.
I used double inverted comma but it hasn't solved yet.
This statements work in our ex-company. I changed some code.
OS of ex-company's DataStage server is UNIX.

Posted: Wed Feb 02, 2011 2:53 pm
by asorrell
ORA-01741: illegal zero-length identifier

Cause: An attempt was made to use two double quotes ("") as an identifier. An identifier must be at least one character long.

Action: Insert at least one character between the double quotes in the identifier. If a blank identifier is required, specify a blank space between the double quotes (" ").

It sounds like the execution of the command from DataStage might be stripping out a layer of quotes before execution. I don't have a Windows system to work with, but I would try playing around with adding additional or different types of quotes.

Also - to pin down what the problem is, start with a very simple version and see if you can get that to work. Then keep adding elements until it breaks and you know what is causing the problem.

One last thing - you mentioned "inverted commas" - if I remember correctly you cannot use the fancy "open / close quote" curly quotes - like the ones Word wants to use. It has to be the plain 'single tic' or "double tic" quotes like what you see displayed here on the web. If you are using Word or WordPad to construct your statements and then pasting it into DataStage that could be a problem. Use Notepad instead.