BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
BlayLay
Obsidian | Level 7

Hi Everyone,

 

I've been running a weekly import program, that is pulling a csv file off of a shared server. Friday the program ran fine, however, when I tried to run it this morning I received the following error that provides little-to-no explanation that I can understand. 

 

 NOTE: Unable to open parameter catalog: SASUSER.PARMS.PARMS.SLIST in update mode. Temporary parameter values will be saved to 
 WORK.PARMS.PARMS.SLIST.

I'm using a very basic PROC IMPORT command:

PROC IMPORT DATAFILE='/lre/te/crc_div/b123/MS Emp Tst/EmpPro_New.csv'
	DBMS=CSV REPLACE
	OUT=WORK.PERFORM (keep= 'Job ID'n 'Ref Number'n);
	GETNAMES=YES;
	GUESSINGROWS= 1700;
RUN;

I've seen in other posts where it provides a more detailed reason (ex: records missing or something), but this is literally the only message I receive. It does not appear to have any downstream impact, as all records seem to be read and imported, I just want to better understand/solve for the problem.

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

You can get the directory used by the libref SASUSER. Or the value of the option SASUSER. 

Also check the RSASUSER option, a value of NORSASUSE means you should be able to write to SASUSER.PARMS catalog.

%put SASUSER path = %sysfunc(pathname(sasuser));
%put SASUSER option = %sysfunc(getoption(sasuser));
%put RSASUSER option = %sysfunc(getoption(rsasuser));

The SASUSER.PARMS catalog should be a file named parms.sas7bcat in that directory.  I cannot think of anything useful that is stored in that catalog so you should be able to just remove it.  If you are worried about losing something useful you can rename the file instead, then you could rename it back to retrieve the old values.

View solution in original post

12 REPLIES 12
Kurt_Bremser
Super User

The ERROR has nothing to do with your PROC IMPORT. Most often it is caused by running more than one SAS session concurrently (as the first one locks the parameter file).

It could also be the result of a crashed session that left the file in a corrupted state. In this case, you need to retrieve the physical path of your SASUSER library and remove the file from there.

BlayLay
Obsidian | Level 7

Can you expand on how to "retrieve the physical path of your SASUSER library" and what file I am to remove?

And I don't believe I have more than one session open.

Tom
Super User Tom
Super User

You can get the directory used by the libref SASUSER. Or the value of the option SASUSER. 

Also check the RSASUSER option, a value of NORSASUSE means you should be able to write to SASUSER.PARMS catalog.

%put SASUSER path = %sysfunc(pathname(sasuser));
%put SASUSER option = %sysfunc(getoption(sasuser));
%put RSASUSER option = %sysfunc(getoption(rsasuser));

The SASUSER.PARMS catalog should be a file named parms.sas7bcat in that directory.  I cannot think of anything useful that is stored in that catalog so you should be able to just remove it.  If you are worried about losing something useful you can rename the file instead, then you could rename it back to retrieve the old values.

qwerty11
Fluorite | Level 6
worked for me, thank you!
szabeen929
Calcite | Level 5

This did not work. I am still having issues importing. Please see below

 

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.01 seconds
cpu time 0.02 seconds

 

szabeen929
Calcite | Level 5

running those lines gives me this ourpur

%put SASUSER path = %sysfunc(pathname(sasuser));
SASUSER path = /sasuser
85 %put SASUSER option = %sysfunc(getoption(sasuser));
SASUSER option = /sasuser
86 %put RSASUSER option = %sysfunc(getoption(rsasuser));
RSASUSER option = RSASUSER

 

However, I dont see any file here to remove at all. I clicked and double clicked on it and its empty. could you please advise

 

szabeen929
Calcite | Level 5
So what would be th way to import a file then? Please note that I'm using SAS Viya trial version and I'm trying to load a csv file from my laptop. Grateful if you advise.
Kurt_Bremser
Super User

You need to use another library for the dataset. Use SAS Studio to create a directory in your home directory, and define a LIBNAME for it. The complete path of a file or directory can be found by right-clicking on it in the navigaton window.

 

If something does not work, post the complete log (all code and messages) by copy/pasting the log text into a window opened with this button:

Bildschirmfoto 2020-04-07 um 08.32.59.jpg

Tom
Super User Tom
Super User

It is a bug in the PROC IMPORT code. It does not prevent it from working so I am not sure why it thinks it needs to issuer that note.   Internally the PROC is running some type of SCL program and generating that note when the SASUSER.PARMS catalog is readonly.  So either because you used the -RSASUSER option when you started SAS or you already had another SAS session running that had a lock on the libref and/or catalog.

 

You can eliminate the error by just writing your own data step to read the CSV file.  That will also give you more control over how the dataset is created.  For example you could use variable names that did not contain spaces in them.

kwyland1
Fluorite | Level 6

I would agree with Tom.  However, just to check I looked at my SASUSER library and there is no content.  So, still not sure why it would bark at my log.  I'm a huge believer in monitoring the log and I always attempt to clear anything out of the norm.  

Tom
Super User Tom
Super User

Then you might want to use a different method to convert CSV files into SAS datasets.

For example you could try this macro:

https://github.com/sasutils/macros/blob/master/csv2ds.sas

Differences from PROC IMPORT
- Supports header lines with more than 32,767 characters
- Supports ZIP and GZIP source files
- Generates unique variable names by adding numeric suffix
- Does not overestimate maxlength when longest value is quoted
- Does NOT force character type if all values are quoted
- Generates label when generated variable name is different than header
- Supports NAMEROW option
- Supports numeric fields with special missing values (MISSING statement)
- Does not attach unneeded informats or formats
- Allows overriding calculated metadata
- Allow using random sample of rows to guess metadata
- Generates more compact SAS code
- Generates analysis summary dataset and raw data view
- Saves generated SAS code to a file
- Forces DATE and DATETIME formats to show century
- Difference in generated V7 compatible variable names
  - Replaces adjacent non-valid characters with single underscore

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 12 replies
  • 18687 views
  • 1 like
  • 6 in conversation