thanks rosh but my problem is that i am receiving a compiler error when i put the output phrase
Main Topics
Browse All Topicsi am trying to execute the following lines of code
declare ws_get_arithm procedure for dbo.sp_get_arithm
execute ws_get_arithm
@scr_flag = '01',
@scr_etos=2009,
@scr_seira='01',
@scr_parast='01',
@scr_aa =:xx output;
if SQLCA.SQLCode <> 0 then
messagebox("Sql errorerror",SQLCA.SQLerrte
end if
commit;
and i am receiving the following error during compilation
database c0038:
sqlstate=37000,
microsoft odbc sql server driver (sql server)
cannot use the output option when passing a constant to a stored procedure
i am using pb 11.5 and sql server 2000
attached you may find the table that is being used (arithm.txt) as well the stored procedure code (sp_get_arithm.txt)
any ideas?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: diasroshanPosted on 2009-10-06 at 00:25:03ID: 25502504
Hi,
the below is a sample code for calling a procedure,
integer ll_check
DECLARE ap_checking_plan_pb PROCEDURE FOR ap_checking_plan
@fcode = :fcode, @dcode = :dcode ,&
@process_nbr = :as_process, @check = :ll_check OUTPUT
USING SQLCA;
IF SQLCA.SQLCode <> 0 THEN
MessageBox ( "Error", "DECLARE failed" )
RETURN -1
END IF
EXECUTE ap_checking_plan_pb;
DO WHILE SQLCA.SQLCODE = 0
FETCH ap_proc_pb
INTO :ll_check
LOOP
IF ( SQLCA.SQLCode <> 0 ) and ( SQLCA.SQLCode <> 100 ) THEN
MessageBox ( "Error", "EXECUTE failed" )
RETURN -1
END IF
Return ll_check
//Code ends here....
I suggest u pass values to ur procedure as variables,
String ls_flag, ls_seira, ls_parast
Long ll_etos, xx
ls_flag = '01'
ll_etos = 2009
ls_seira = '01'
ls_parast = '01'
declare ws_get_arithm procedure for dbo.sp_get_arithm
execute ws_get_arithm
@scr_flag = :ls_flag,
@scr_etos= :ll_etos,
@scr_seira=:ls_seira,
@scr_parast=:ls_parast,
@scr_aa =:xx output;
Cheers,
Rosh