[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Calling a DB2 Stored Procedure in SQR
Hi all,
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