[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

[sqr-users] How to assign variables from one procedure to other




Hi,
 
How to assign variable to procedures
===========================
 
begin-program
alter-printer point-size=8 pitch=15
 do main
! do scnd_proc(&cust_num)
end-program
 
Begin-Procedure first_proc
begin-select 
cust_num &cust_num (1,5)
 do scnd_proc(&cust_num)
cust_det (1,10)
from customers
end-select
end-procedure
 
Begin-Procedure scnd_proc(#cust_num)
begin-select 
a.amount (1,20)
from payments a
where a.cust_num = #cust_num
end-select
end-procedure
 
Note: If i use cust_num value hard coded in the scnd_proc the program works 
fine but if i use variable i get the below error
I tried in several ways no luck pls help!
 
Error on line 75:   (SQR 2002) DO arguments do not match procedure's.
Errors were found in the program file.
 
Thanks,
NG
_________________________________________________________________
Get thousands of games on your PC, your mobile phone, and the web with Windows®.
http://clk.atdmt.com/MRT/go/108588800/direct/01/

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users