BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
scottyniven
Calcite | Level 5
libname perm 'C:\Users\Eden\OneDrive\Documents';
data perm.fungal;
infile 'C:\Users\Eden\OneDrive\Documents\fungal.txt' firstobs=2
input patno treat $ age sex $ severity clears;
run;

This, below is the syntax I'm getting...

1    libname perm 'C:\Users\Eden\OneDrive\Documents';
NOTE: Libref PERM was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\Users\Eden\OneDrive\Documents
2    data perm.fungal;
3    infile 'C:\Users\Eden\OneDrive\Documents\fungal.txt' firstobs=2
4    input patno treat $ age sex $ severity clears;
     -----
     23
ERROR 23-2: Invalid option name INPUT.

4  ! input patno treat $ age sex $ severity clears;
           -----
           23
ERROR 23-2: Invalid option name PATNO.

4  ! input patno treat $ age sex $ severity clears;
                 -----
                 23
ERROR 23-2: Invalid option name TREAT.

4  ! input patno treat $ age sex $ severity clears;
                       -         -
                       23        23
ERROR 23-2: Invalid option name $.

4  ! input patno treat $ age sex $ severity clears;
                         ---
                         23
ERROR 23-2: Invalid option name AGE.

4  ! input patno treat $ age sex $ severity clears;
                             ---
                             23
ERROR 23-2: Invalid option name SEX.

4  ! input patno treat $ age sex $ severity clears;
                                   --------
                                   23
ERROR 23-2: Invalid option name SEVERITY.

4  ! input patno treat $ age sex $ severity clears;
                                            ------
                                            23
ERROR 23-2: Invalid option name CLEARS.

5    run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set PERM.FUNGAL may be incomplete.  When this step was stopped there were 0
         observations and 0 variables.
WARNING: Data set PERM.FUNGAL was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      cpu time            0.01 seconds

Help would be appreciated

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@scottyniven wrote:

Hi guy, thanks... however now when I put the semicolon Im still having this issue physical file does not exist when I know its in my dcuments...


SHOW the log. Copy the text from the log, open a text box on the forum with the </> icon and paste the text.

 

That we we know what you actually submitted. Maybe you "put the semicolon" in the wrong place. Maybe you mistyped an used a colon.

 

Another thing that you really want to verify is that the file name is correct. If you misspell the name or extension then the file does not exist because you gave SAS the wrong name. Using Windows explorer I often highlight the file and copy the text as I am too lazy to retype if not needed, especially the paths.

View solution in original post

7 REPLIES 7
scottyniven
Calcite | Level 5

scottyniven_0-1657927200584.png

This is the dataset I am attempting to import. I believe that I have put the $'s in the right place though...

SASKiwi
PROC Star

Did you not see the answer in your previous post? Your INFILE statement is missing a semicolon.

Patrick
Opal | Level 21

If you get such "weird" errors where SAS calls a statement or function something else (like option here) always investigate if there is a semicolon missing or something wrong with quoting.

Patrick_1-1657943660035.png

 

 

scottyniven
Calcite | Level 5

Hi guy, thanks... however now when I put the semicolon Im still having this issue physical file does not exist when I know its in my dcuments...

Patrick
Opal | Level 21

Patrick_0-1657960085066.png

The successful libname statement tells us that the path to the Documents folder exists and is valid.

If you get a file does not exist error then you've either misspelled the file name or it's in a different folder or (unlikely) the user under which you execute SAS doesn't have sufficient access so SAS can't "see" the file.

scottyniven
Calcite | Level 5

How would I go about giving permission to sas to access the file?

ballardw
Super User

@scottyniven wrote:

Hi guy, thanks... however now when I put the semicolon Im still having this issue physical file does not exist when I know its in my dcuments...


SHOW the log. Copy the text from the log, open a text box on the forum with the </> icon and paste the text.

 

That we we know what you actually submitted. Maybe you "put the semicolon" in the wrong place. Maybe you mistyped an used a colon.

 

Another thing that you really want to verify is that the file name is correct. If you misspell the name or extension then the file does not exist because you gave SAS the wrong name. Using Windows explorer I often highlight the file and copy the text as I am too lazy to retype if not needed, especially the paths.

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!
Autotuning Deep Learning Models Using SAS

Follow along as SAS’ Robert Blanchard explains three aspects of autotuning in a deep learning context: globalized search, localized search and an in parallel method using SAS.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 7 replies
  • 2037 views
  • 7 likes
  • 4 in conversation