[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Syntax for Calling a DB2 Stored Procedure in SQR
- Subject: Syntax for Calling a DB2 Stored Procedure in SQR
- From: "Appala A. Naidu" <appala.a.naidu@MAIL.SPRINT.COM>
- Date: Wed, 24 Apr 2002 13:38:32 -0500
Hi all,
We use SQR for PeopleSoft/8.15/Sun/SunOS 5.6/DB2 7.1.0/Aug 06
2001.
How do I call a DB2 Stored Procedure in SQR ? Here is the code I
used to call the Procedure 'PRC-GET-UNIT-PRICE'
and I am getting sysntax errors.
Any help is appreciated.
!----------------------------------------------------------------------!
! Procedure: execute-price-procedure !
! Descr: This routine will call the procedure !
!----------------------------------------------------------------------!
begin-procedure execute-price-procedure
begin-sql
begin
PRC-GET-UNIT-PRICE('SNS01', '015583', '3140017500', 'DROP', '1', 'SO',
'04/18/2002', $o_return_code, $o_return_msg, $o_price_set
_id, #o_list_price, #o_unit_price);;
end;;
end-sql
show '$o_return_code: ' $o_return_code
show '$o_return_msg : ' $o_return_msg
show '#o_list_price : ' #o_list_price
show '#o_unit_price : ' #o_unit_price
end-procedure
sqr price.sqr DB2PSDEV/psdev/psdev DB2PSDEV
-I/snsbatch/psoft/edi/db2psdev/scripts/,/psoft/app/u01/db2psdev/user/sqr
/,/psoft/app/u01/db2psdev/sqr/ -ZIF/psoft/app/u01/db2psdev/sqr/pssqr.unx
price.sqr
SQR for PeopleSoft V8.15
(SQR 5528) DB2 SQL PREPARE/DECLARE error -104 in cursor 2:
SQL0104N An unexpected token "begin PRC-GET" was found following
"BEGIN-OF-STATEMENT". Expected tokens may include: "<values>".
SQLSTATE=42601
SQL: begin PRC-GET-UNIT-PRICE('SNS01', '015583', '3140017500', 'DROP',
'1', 'SO', '04/18/2002', ?, ?, ?, ?, ?);
Error on line 90:
(SQR 3716) Error in SQL statement.
(SQR 5528) DB2 SQL PREPARE/DECLARE error -104 in cursor 3:
SQL0104N An unexpected token ";" was found following "end".
Expected tokens
may include: "END-OF-STATEMENT". SQLSTATE=42601
SQL: end;
Error on line 91:
(SQR 3716) Error in SQL statement.
Thanks
A.A.Naidu
Sprint North Supply
Ph:(913) 791 7000 X 8629
Email: appala.naidu@mail.sprint.com