BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dllfrancelino
Fluorite | Level 6

Dear all,

 

I'm trying to import a txt file with this code.

 

%let ex = 201806
proc import datafile = '\\10.39.114.71\Controladoria$\PLANNING\BASE_PORTFOLIO\BS_PORT_&EX..txt'
out= BS_PORT.BS_PORT_&EX.
dbms=dlm replace;
delimiter= '09'x;
run;

 

And it's not running, as you can see on the log below.

What am I doing wrong?

Thanks a lot!

 

25         proc import datafile = '\\10.39.114.71\Controladoria$\PLANNING\BASE_PORTFOLIO\BS_PORT_&&EX..txt'
26         out= BS_PORT.BS_PORT_&&EX.
WARNING: Apparent symbolic reference EX not resolved.
WARNING: Apparent symbolic reference EX not resolved.
NOTE 138-205: Line generated by the macro variable "SASWORKLOCATION".
26          BS_PORT.BS_PORT_&EX.
                            _
                            22
ERROR 22-322: Syntax error, expecting one of the following: ;, (, DATAFILE, DATATABLE, DBMS, DEBUG, FILE, OUT, REPLACE, TABLE,
              _DEBUG_.  

NOTE: Line generated by the macro variable "SASWORKLOCATION".
26          BS_PORT.BS_PORT_&EX.
                            _
                            200
ERROR 200-322: The symbol is not recognized and will be ignored.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You need double quotes instead of single quotes.

 


@dllfrancelino wrote:

Dear all,

 

I'm trying to import a txt file with this code.

 

%let ex = 201806
proc import datafile = '\\10.39.114.71\Controladoria$\PLANNING\BASE_PORTFOLIO\BS_PORT_&EX..txt'
out= BS_PORT.BS_PORT_&EX.
dbms=dlm replace;
delimiter= '09'x;
run;

 

And it's not running, as you can see on the log below.

What am I doing wrong?

Thanks a lot!

 

25         proc import datafile = '\\10.39.114.71\Controladoria$\PLANNING\BASE_PORTFOLIO\BS_PORT_&&EX..txt'
26         out= BS_PORT.BS_PORT_&&EX.
WARNING: Apparent symbolic reference EX not resolved.
WARNING: Apparent symbolic reference EX not resolved.
NOTE 138-205: Line generated by the macro variable "SASWORKLOCATION".
26          BS_PORT.BS_PORT_&EX.
                            _
                            22
ERROR 22-322: Syntax error, expecting one of the following: ;, (, DATAFILE, DATATABLE, DBMS, DEBUG, FILE, OUT, REPLACE, TABLE,
              _DEBUG_.  

NOTE: Line generated by the macro variable "SASWORKLOCATION".
26          BS_PORT.BS_PORT_&EX.
                            _
                            200
ERROR 200-322: The symbol is not recognized and will be ignored.

 

 


 

View solution in original post

2 REPLIES 2
Reeza
Super User

You need double quotes instead of single quotes.

 


@dllfrancelino wrote:

Dear all,

 

I'm trying to import a txt file with this code.

 

%let ex = 201806
proc import datafile = '\\10.39.114.71\Controladoria$\PLANNING\BASE_PORTFOLIO\BS_PORT_&EX..txt'
out= BS_PORT.BS_PORT_&EX.
dbms=dlm replace;
delimiter= '09'x;
run;

 

And it's not running, as you can see on the log below.

What am I doing wrong?

Thanks a lot!

 

25         proc import datafile = '\\10.39.114.71\Controladoria$\PLANNING\BASE_PORTFOLIO\BS_PORT_&&EX..txt'
26         out= BS_PORT.BS_PORT_&&EX.
WARNING: Apparent symbolic reference EX not resolved.
WARNING: Apparent symbolic reference EX not resolved.
NOTE 138-205: Line generated by the macro variable "SASWORKLOCATION".
26          BS_PORT.BS_PORT_&EX.
                            _
                            22
ERROR 22-322: Syntax error, expecting one of the following: ;, (, DATAFILE, DATATABLE, DBMS, DEBUG, FILE, OUT, REPLACE, TABLE,
              _DEBUG_.  

NOTE: Line generated by the macro variable "SASWORKLOCATION".
26          BS_PORT.BS_PORT_&EX.
                            _
                            200
ERROR 200-322: The symbol is not recognized and will be ignored.

 

 


 

dllfrancelino
Fluorite | Level 6

It worked!!! Thank you very much!!! Smiley Happy

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1453 views
  • 2 likes
  • 2 in conversation