execute oracle procedure in routines

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
dsisbank
Premium Member
Premium Member
Posts: 50
Joined: Fri Aug 11, 2006 4:53 am

execute oracle procedure in routines

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you look up what a "ORA-01741" means?
-craig

"You can never have too many knives" -- Logan Nine Fingers
dsisbank
Premium Member
Premium Member
Posts: 50
Joined: Fri Aug 11, 2006 4:53 am

Post 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.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post 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.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
Post Reply