DATA Step, Macro, Functions and more

Importing a comma delimited txt file

Accepted Solution Solved
Reply
Contributor
Posts: 22
Accepted Solution

Importing a comma delimited txt file

I am trying to import this data set into SAS University Edition, but I am getting an error that suggests that my file isn't saved in myfolders folder, even though it is saved there under the same name. This is the error: 

 

ERROR: Physical file does not exist, /folders/myfolders/2017NBADraft2.csv.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DRAFT may be incomplete. When this step was stopped there were 0 observations and 10 variables.
WARNING: Data set WORK.DRAFT was not replaced because this step was stopped.

 

and this is my code: 

 

DATA work.draft;
INFILE "/folders/myfolders/2017NBADraft2.csv"
DLM=',' FIRSTOBS=2 DSD MISSOVER;
INPUT LastName $ FirstName $ Team $ Position $ Birthdate :ANYDTDTE10. Height Wingspan Weight College $ Year $;
RUN;

 


Accepted Solutions
Solution
‎03-28-2018 09:13 PM
Super User
Posts: 22,874

Re: Importing a comma delimited txt file

Go to Servers Files Folders pane. 

Find your file

Right click>Properties

Copy the path

 

Use that in your infile statement.

 


@Miah wrote:

I am trying to import this data set into SAS University Edition, but I am getting an error that suggests that my file isn't saved in myfolders folder, even though it is saved there under the same name. This is the error: 

 

ERROR: Physical file does not exist, /folders/myfolders/2017NBADraft2.csv.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DRAFT may be incomplete. When this step was stopped there were 0 observations and 10 variables.
WARNING: Data set WORK.DRAFT was not replaced because this step was stopped.

 

and this is my code: 

 

DATA work.draft;
INFILE "/folders/myfolders/2017NBADraft2.csv"
DLM=',' FIRSTOBS=2 DSD MISSOVER;
INPUT LastName $ FirstName $ Team $ Position $ Birthdate :ANYDTDTE10. Height Wingspan Weight College $ Year $;
RUN;

 



@Miah wrote:

I am trying to import this data set into SAS University Edition, but I am getting an error that suggests that my file isn't saved in myfolders folder, even though it is saved there under the same name. This is the error: 

 

ERROR: Physical file does not exist, /folders/myfolders/2017NBADraft2.csv.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DRAFT may be incomplete. When this step was stopped there were 0 observations and 10 variables.
WARNING: Data set WORK.DRAFT was not replaced because this step was stopped.

 

and this is my code: 

 

DATA work.draft;
INFILE "/folders/myfolders/2017NBADraft2.csv"
DLM=',' FIRSTOBS=2 DSD MISSOVER;
INPUT LastName $ FirstName $ Team $ Position $ Birthdate :ANYDTDTE10. Height Wingspan Weight College $ Year $;
RUN;

 


 

View solution in original post


All Replies
Super User
Posts: 13,084

Re: Importing a comma delimited txt file

Make sure the case is the same in the code and the way the file appears to the file system in the virtual box.

 

Also if you didn't change the file extension to .txt from .csv to post the example on the forum then you didn't use the correct file name in the infile statement.

Solution
‎03-28-2018 09:13 PM
Super User
Posts: 22,874

Re: Importing a comma delimited txt file

Go to Servers Files Folders pane. 

Find your file

Right click>Properties

Copy the path

 

Use that in your infile statement.

 


@Miah wrote:

I am trying to import this data set into SAS University Edition, but I am getting an error that suggests that my file isn't saved in myfolders folder, even though it is saved there under the same name. This is the error: 

 

ERROR: Physical file does not exist, /folders/myfolders/2017NBADraft2.csv.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DRAFT may be incomplete. When this step was stopped there were 0 observations and 10 variables.
WARNING: Data set WORK.DRAFT was not replaced because this step was stopped.

 

and this is my code: 

 

DATA work.draft;
INFILE "/folders/myfolders/2017NBADraft2.csv"
DLM=',' FIRSTOBS=2 DSD MISSOVER;
INPUT LastName $ FirstName $ Team $ Position $ Birthdate :ANYDTDTE10. Height Wingspan Weight College $ Year $;
RUN;

 



@Miah wrote:

I am trying to import this data set into SAS University Edition, but I am getting an error that suggests that my file isn't saved in myfolders folder, even though it is saved there under the same name. This is the error: 

 

ERROR: Physical file does not exist, /folders/myfolders/2017NBADraft2.csv.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.DRAFT may be incomplete. When this step was stopped there were 0 observations and 10 variables.
WARNING: Data set WORK.DRAFT was not replaced because this step was stopped.

 

and this is my code: 

 

DATA work.draft;
INFILE "/folders/myfolders/2017NBADraft2.csv"
DLM=',' FIRSTOBS=2 DSD MISSOVER;
INPUT LastName $ FirstName $ Team $ Position $ Birthdate :ANYDTDTE10. Height Wingspan Weight College $ Year $;
RUN;

 


 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 84 views
  • 2 likes
  • 3 in conversation