5 Replies - 561 Views - Last Post: 30 November 2018 - 09:55 AM Rate Topic: -----

#1 wtp   User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 338
  • Joined: 08-December 11

DB2 - Trying to call SP and get results. Getting SQLCODE=-104

Posted 29 November 2018 - 04:25 PM

I'm using Oracle SQL Developer IDE (DB2 database). I right-clicked on the DB and clicked "Open SQL Worksheet". I verified the SP is in a schema under this DB. I then put the below code in the Worksheet and "Run Script". Also tried this below my "CREATE OR REPLACE PROCEDURE" script, same result.

DECLARE
out1 VARCHAR(40);
out2 VARCHAR(40);
out3 CHARACTER(1);
out4 VARCHAR(40); 

BEGIN
CALL MYSCHEMA.SP_DOSOMETHING('input1', 'input2',out1, out2, out3, out4 );  
END;


The SP has 2 IN and 4 OUT parameters as those types. It does a simple select getting the 4 out values, by using the 2 IN values in the WHERE.

The only information I could find on this error is:
104	Monitor missing	The requested monitor is not present

But my computer has a monitor. I'm looking at it right now. But seriously what is a monitor in this context?

What am I doing wrong how can I call this procedure and get the OUT values, or what additional info do I need?

Is This A Good Question/Topic? 0
  • +

Replies To: DB2 - Trying to call SP and get results. Getting SQLCODE=-104

#2 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6813
  • View blog
  • Posts: 28,190
  • Joined: 12-December 12

Re: DB2 - Trying to call SP and get results. Getting SQLCODE=-104

Posted 30 November 2018 - 02:23 AM

I found this about an illegal symbol, token.

It might be an error in the sp's syntax. Create an extremely simple version and try and execute it with your code above.
Was This Post Helpful? 1
  • +
  • -

#3 Sheepings   User is offline

  • D.I.C Lover
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,260
  • Joined: 05-December 13

Re: DB2 - Trying to call SP and get results. Getting SQLCODE=-104

Posted 30 November 2018 - 08:32 AM

Hay there, do you have an error log? if so, post a snipped here during the timeframe in which failure occurs.

I too find it hard to find anything relative to what you posted, but I would imagine Andrewsw might be onto a possible cause?

Did you resolve it yet
Was This Post Helpful? 1
  • +
  • -

#4 wtp   User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 338
  • Joined: 08-December 11

Re: DB2 - Trying to call SP and get results. Getting SQLCODE=-104

Posted 30 November 2018 - 09:12 AM

I still have this issue. I think the SP should be ok because I know someone was running it (no longer with our company). I didn't know there was logs. I;m looking for them now
Was This Post Helpful? 0
  • +
  • -

#5 Sheepings   User is offline

  • D.I.C Lover
  • member icon

Reputation: 224
  • View blog
  • Posts: 1,260
  • Joined: 05-December 13

Re: DB2 - Trying to call SP and get results. Getting SQLCODE=-104

Posted 30 November 2018 - 09:35 AM

Well I'm not well up on the Oracle DB stuff as much as I am with other DB types. And I know andrewsw, knows more about Oracle than I do. So maybe he can clarify error reporting for you?

As far as I am aware, their needs to be a trace file for all errors? From what I read, most people have their errors setup in a error table on their database.

You can search it up though. I'm betting a log report will show a lot more on what's going on.
Was This Post Helpful? 0
  • +
  • -

#6 wtp   User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 338
  • Joined: 08-December 11

Re: DB2 - Trying to call SP and get results. Getting SQLCODE=-104

Posted 30 November 2018 - 09:55 AM

Figured it out, probably should of posted the SP.

DECLARE
myvar mydb.mycolumn%TYPE;


This is how it defined the types in the SP, and what I had to put in the DECLARE variables instead of VARCHAR:
mydb.mycolumn%TYPE;
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1