BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MaryA_Marion
Lapis Lazuli | Level 10

Hello,

I think I have control of data import and then as now I find I do not know it as well as I would like.

The enclosed snapshot shows the location of the input file.

 

The log is given below:

75         *classes.txt is in myfolders in SAS STUDIO;
 76         filename gpa "/folders/myfolders/classes2.txt";
 78         options linesize=140 pagesize=5000;
 84         data gpa; infile gpa delimiter=';' truncover dsd;
 92         input
 . . .
 106        run;
 
 ERROR: Physical file does not exist, /folders/myfolders/classes2.txt.
 NOTE: The SAS System stopped processing this step because of errors.
 WARNING: The data set WORK.GPA may be incomplete.  When this step was stopped there were 0 observations and 12 variables.
 WARNING: Data set WORK.GPA was not replaced because this step was stopped.

How to fix?  Thanks.

MM

 

1 ACCEPTED SOLUTION

Accepted Solutions
mkeintz
PROC Star

The PDF you posted shows classes2.txt to be a file in your home directory, which commonly can be represented by a tilde (~).

 

So try changing 

filename gpa "/folders/myfolders/classes2.txt";

to

filename gpa "~/classes2.txt";

Your home directory, in absolute terms, is probably something like   /home/odaws01-usw2, which (if correct) would require you to use

filename gpa "/home/odaws01-usw2/classes2.txt";

It's a lot easier to use the ~ symbol.

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

View solution in original post

1 REPLY 1
mkeintz
PROC Star

The PDF you posted shows classes2.txt to be a file in your home directory, which commonly can be represented by a tilde (~).

 

So try changing 

filename gpa "/folders/myfolders/classes2.txt";

to

filename gpa "~/classes2.txt";

Your home directory, in absolute terms, is probably something like   /home/odaws01-usw2, which (if correct) would require you to use

filename gpa "/home/odaws01-usw2/classes2.txt";

It's a lot easier to use the ~ symbol.

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 518 views
  • 1 like
  • 2 in conversation