Write and run SAS programs in your web browser

HELP! SAS does not create new table dataset in library because it isn't recognizing code

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

HELP! SAS does not create new table dataset in library because it isn't recognizing code

[ Edited ]

 

Hi there,

 

I have a question. I am a new user and just wanting to start working with my data, but I'm getting stuck on the first step. Although I can import the data from my desktop to SAS "Server Files and Folders", it doesn't recognize the dataset "test", and does not create a new table in the "WORK" Library despite specifying that it should be put there. What is the issue? Could it be the folder on my personal computer? Or is it the folder in "Server Files and Folders"? It doesn't look like there's an issue with the code (see below). Any help would be phenomenal.

 

options linesize = 80 pagesize = 56 nodate;
FILENAME REFFILE '/home/xshinbrot0/sasuser.v94/test.csv';
PROC IMPORT DATAFILE=REFFILE
    DBMS=CSV
    OUT=WORK.test;
    GETNAMES=YES;
RUN;
PROC CONTENTS DATA=WORK.test;
Run;

 

This is the error code it produced, basically saying it doesn't exist.

    OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 59         
 60         options linesize = 80 pagesize = 56 nodate;
 61         FILENAME REFFILE '/home/xshinbrot0/sasuser.v94/test.csv';
 62         PROC IMPORT DATAFILE=REFFILE
 63         DBMS=CSV;
 ERROR: Output SAS data set must be provided.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              36.65k
       OS Memory           33444.00k
       Timestamp           06/14/2017 04:53:04 PM
       Step Count                        196  Switch Count  24
       Page Faults                       0
       Page Reclaims                     9
       Page Swaps                        0
       Voluntary Context Switches        40
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           0
       
 64         OUT=WORK.test;
 65         GETNAMES=YES;
 66         RUN;
 
 
 67         PROC CONTENTS DATA=WORK.test;
 ERROR: File WORK.TEST.DATA does not exist.
 68         Run;
 
 NOTE: Statements not processed because of errors noted above.
 NOTE: PROCEDURE CONTENTS used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              324.28k
       OS Memory           33704.00k
       Timestamp           06/14/2017 04:53:04 PM
       Step Count                        197  Switch Count  26
       Page Faults                       0
       Page Reclaims                     12
       Page Swaps                        0
       Voluntary Context Switches        48
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 NOTE: The SAS System stopped processing this step because of errors.
 69         
 70         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 82         

 
User: xshinbrot0
Option Values

Accepted Solutions
Solution
Tuesday
Grand Advisor
Posts: 10,043

Re: HELP! SAS does not create new table dataset in library because it isn't recognizing code

It is not the same error. It is completely different:

 

Please read the highlighted text below:

NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update
mode. Temporary parameter values will be saved to WORK.PARMS.PARMS.SLIST.
Unable to sample external file, no data in first 5 records.

 

Proc import, since it is a GUESSING procedure quits when there is not data in the first five rows unless told otherwise.

You can specify a DATAROW statement to specify which line in the file the actual data starts. You will have to open the file and determine that.

 

You may have issues with your variable names with that many blank rows.

View solution in original post


All Replies
Grand Advisor
Posts: 10,043

Re: HELP! SAS does not create new table dataset in library because it isn't recognizing code

Please the log result including the submitted statements starting with the filename statement and any messages. Paste Log results into a codebox opened with the forum {i} menu icon to preserve formatting. The main window will reformat the results and sometimes the diagnositics present in the log are positionally important.

New Contributor
Posts: 3

Re: HELP! SAS does not create new table dataset in library because it isn't recognizing code

Edited for the log code
Grand Advisor
Posts: 10,043

Re: HELP! SAS does not create new table dataset in library because it isn't recognizing code

ERROR: Output SAS data set must be provided.

 

You have ; in the middle of the proc statement. There cannot be a ; before the OUT part of proc import.

Which means the code you sumitted is not the same as the code in your question.

You submitted:

FILENAME REFFILE '/home/xshinbrot0/sasuser.v94/test.csv';
 62         PROC IMPORT DATAFILE=REFFILE
 63         DBMS=CSV;

remove the ; after  dbms=csv.

 

New Contributor
Posts: 3

Re: HELP! SAS does not create new table dataset in library because it isn't recognizing code

Thank you for your response. Unfortunately it provides the same results.

 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 59         
 60         options linesize = 80 pagesize = 56 nodate;
 61         FILENAME REFFILE '/home/xshinbrot0/sasuser.v94/test.csv';
 62         PROC IMPORT DATAFILE=REFFILE
 63         DBMS=CSV
 64         OUT=WORK.test;
 65         GETNAMES=YES;
 66         RUN;
 
 NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update 
 mode. Temporary parameter values will be saved to WORK.PARMS.PARMS.SLIST.
 Unable to sample external file, no data in first 5 records.
 ERROR: Import unsuccessful.  See SAS Log for details.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE IMPORT used (Total process time):
       real time           0.03 seconds
       user cpu time       0.02 seconds
       system cpu time     0.01 seconds
       memory              9467.25k
       OS Memory           33820.00k
       Timestamp           06/14/2017 07:05:43 PM
       Step Count                        4  Switch Count  46
       Page Faults                       0
       Page Reclaims                     2950
       Page Swaps                        0
       Voluntary Context Switches        159
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           72
       
 
 
 67         PROC CONTENTS DATA=WORK.test;
 ERROR: File WORK.TEST.DATA does not exist.
 68         Run;
 
 NOTE: Statements not processed because of errors noted above.
 NOTE: PROCEDURE CONTENTS used (Total process time):
       real time           0.00 seconds
       user cpu time       0.00 seconds
       system cpu time     0.00 seconds
       memory              330.43k
       OS Memory           29096.00k
       Timestamp           06/14/2017 07:05:43 PM
       Step Count                        5  Switch Count  26
       Page Faults                       0
       Page Reclaims                     59
       Page Swaps                        0
       Voluntary Context Switches        48
       Involuntary Context Switches      0
       Block Input Operations            0
       Block Output Operations           8
       
 NOTE: The SAS System stopped processing this step because of errors.
 69         
 70         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 82         
Solution
Tuesday
Grand Advisor
Posts: 10,043

Re: HELP! SAS does not create new table dataset in library because it isn't recognizing code

It is not the same error. It is completely different:

 

Please read the highlighted text below:

NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update
mode. Temporary parameter values will be saved to WORK.PARMS.PARMS.SLIST.
Unable to sample external file, no data in first 5 records.

 

Proc import, since it is a GUESSING procedure quits when there is not data in the first five rows unless told otherwise.

You can specify a DATAROW statement to specify which line in the file the actual data starts. You will have to open the file and determine that.

 

You may have issues with your variable names with that many blank rows.

☑ This topic is SOLVED.

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

Discussion stats
  • 5 replies
  • 73 views
  • 0 likes
  • 2 in conversation