BookmarkSubscribeRSS Feed
renanm
Obsidian | Level 7

Hello, 

 

I'm trying to set up a password file in a folder in the server so that I don't have to reference my log-in credentials directly in the query 

when connecting to Teradata. 

 

Here's what I've done:

1)  Saved a file named login.sas in a folder in the server with the following details:

%let tduser='myusername'
%let tdpass='mypassword'

 

2) Reference the file with a %include statement in my SAS program as follows:

%include "/intl/ipath/foldername/foldername/login.sas";

 

3) Run a query to connect to Teradata as follows:

 

Proc SQL;
Connect To teradata (server=edw user=&tduser password=&tdpass mode=teradata connection=global);
create table CUSTBASE as
select * from connection to teradata
(

select distinct....

 

4) I get an ERROR and a WARNING as follows:

 

%include "/intl/ipath/foldername/foldername/login.sas";
ERROR: Open code statement recursion detected.

 

28 Connect To teradata (server=edw user=&tduser password=&tdpass mode=teradata connection=global);
WARNING: Apparent symbolic reference TDPASS not resolved.
WARNING: Apparent symbolic reference TDPASS not resolved.

 

Any help on how to resolve this would be greatly appreciated. 

 

Thanks !

2 REPLIES 2
Astounding
PROC Star

%LET statements (each of them) require a semicolon to end the statement.

 

Add them and that should take care of the problem.

renanm
Obsidian | Level 7

Thank you very much @Astounding ! Much appreciated. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1732 views
  • 2 likes
  • 2 in conversation