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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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