10-23-2016 02:38 PM
I am having trouble saving a permanent file. I have imported the file from spss, which seemed to have worked (all variables and observations were located in the temporary 'work' folder). However when I used the syntax below to save the file permanently into another folder on my desktop, I cannot open the file again after I exit SAS. The following is the error message:
Unable to open the table TMP1.ABEY. TMP1.abey cannot be opened.
It looks like it's saving properly in the folder (I see the SAS file in the folder), it just doesn't open. I've also tried different ways of opening the file- i.e.- double clicking on the dataset icon and trying to open the file directly from SAS.
10-23-2016 03:15 PM
I see one susspicios line.
while libname is defined as:
10-23-2016 05:02 PM
You already imported your file into a SAS dataset. If you want to save the dataset, do
data xyz.eating; set work.eating; run;
If you assign the libname first, you can do the import immediately to library xyz.
Although I would not have a SAS library where non-SAS files are stored.
10-24-2016 10:43 AM
Thank you both!
Kurt, I followed your suggestion, while it opened initially, after I close SAS and try to open the same file again, I get the same error message:
Unable to open the table TMP1.eating. TMP1.eating cannot be opened.
The log states: "Format GMFCS not found or couldn't be loaded for variable gmfcs." This is stated for all my variables in the dataset.
Still not sure what I'm doing wrong!
10-24-2016 11:02 AM
Make sure that library tmp1 is assigned correctly.
For the format, make sure that it is created in a permanent location (not WORK!) and that the fmtsearch system option points to that location.
10-24-2016 11:13 AM
How do I assign tmp1 outside of the temporary 'work' folder? When i save it, it is saved onto a folder on my desktop, so I assume it is in a permanent location since I assign the libname in that location.
Thanks for you help and patience. I am really new to SAS!
10-24-2016 04:17 PM
Any WORK library is canceled when you exit SAS session .
To make a permanent library you need define:
LIBNAME my_lib 'C:/ ...'; /* on WINDOWS - choose library reference name and path */
LIBNAME my_lib '/home/ ...'; /* on unix/linux - choose library reference name and path */
then create your permanent dataset by:
DATA my_lib.my_data ;