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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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