Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append file using %include but variables not visible

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all,
Need your help on this.

File: passwd.sas
----------------
%global ora_userid;
%global ora_pwd;
%macro get_user_info;
%let ora_userid= ;
%let ora_pwd= ;
%window Oracle_user_info color=white
#5 @10 'UserId:' attr=highlight
#5 @20 ora_userid 30 REQUIRED=YES
#10 @10 'Password:' attr=highlight
#10 @20 ora_pwd 30 REQUIRED=YES DISPLAY=NO;
%display Oracle_user_info bell ;
%mend get_user_info;
%get_user_info;
run;

%syslput uid=&ora_userid;
%syslput pwd=&ora_pwd;

File: test.sas
--------------
%include 'passwd.sas'

%put &uid &pwd;

When I run test.sas I get the error

WARNING: Apparent symbolic reference UID not resolved.
WARNING: Apparent symbolic reference PWD not resolved.

What am I doing wrong?

Thanks,
John
 
I tried running your code "as is" and got the same error message. When I added the file path to the %include statement, the code seemed to run fine. Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top