Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

calling DB2 stored procedure from query tool

Posted on 2012-03-26
2
Medium Priority
?
1,699 Views
Last Modified: 2012-03-30
Hello Experts,

i am trying to call DB2 stored procedure from a query tool - sqldbx...

1 input parameter and all others are output parameters..

i am getting some error:

here is my code:


DECLARE @AD_USR_ID VARCHAR(64)
DECLARE @LAST_NAME VARCHAR(64)
DECLARE @FIRST_NAME VARCHAR(64)
DECLARE @MI CHAR(1)
DECLARE @EMP_UNIQ_ID DECIMAL(10,2)
DECLARE @JOBCODE CHAR(6)
DECLARE      @LOCATION CHAR(4)
DECLARE      @PYRAMID CHAR(2)
DECLARE      @SUPERVISOR DECIMAL(10,2)
DECLARE      @WORK_PHONE_NUM VARCHAR(15)
DECLARE      @CELL_PHONE_NUM VARCHAR(15)
DECLARE      @HOME_PHONE_NUM VARCHAR(15)
DECLARE      @EMAIL_ADDRESS VARCHAR(64)
DECLARE      @RETCODE INTEGER
DECLARE      @RETMSG CHAR(32)

SET @AD_USR_ID = 'ISPA4'

EXEC('CALL MRSSI.DP001SP(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)',
@AD_USR_ID, @LAST_NAME output, @FIRST_NAME output, @MI output, @EMP_UNIQ_ID output,
@JOBCODE output, @LOCATION output, @PYRAMID output, @SUPERVISOR output,
@WORK_PHONE_NUM output, @CELL_PHONE_NUM output,
@HOME_PHONE_NUM output, @EMAIL_ADDRESS output, @RETCODE output, @RETMSG output)
at TEST

SELECT Lastname = @LAST_NAME, FirstName = @FIRST_NAME


------------------------------

 SQL0104N  An unexpected token "VARCHAR" was found following "VARCHAR".  Expected tokens may include:  "TABLE STATEMENT , . SCROLL INSENSITIVE SENSITIVE ASENSITIVE N".  SQLSTATE=42601



what i am missing...

Thanks
0
Comment
Question by:mani_sai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 1500 total points
ID: 37767463
that all depends on the client tool which you use, that apperantley does not support this kind of operation
try downloading ibm data studio and do it through there
http://www.ibm.com/developerworks/downloads/im/data/
0
 
LVL 8

Author Closing Comment

by:mani_sai
ID: 37788378
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question