- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I started SAS SQL 1: Essentials course. Tried to set up the data following the instructions given for SAS EG. Just realized that when I run 1_setupEG, required data get created in SQ library. After I run 2_setupEG and 3_setupEG that SQ library disappears.
Hence when doing activities and other tasks I have to change the data source location from SQ.SAS_data_table to WORK.SAS_data_table in every program template that is provided. It is not a hard task, but wondering why this happens?
Any insight is highly appreciated.
Thanks
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
Like Tom mentioned in his response, it sounds like you need to submit a LIBNAME statement to set up the libref for the SQ library. This needs to be done for each SAS session when you need to use the data in the SQ library. Depending on where you stored your data, the syntax would be:
LIBNAME SQ "location-where-data-is-stored";
Hope that helps,
Rebecca
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The LIBNAME statement in SAS is used to define a name to use in your code to reference the datasets in a library. You can call this name the LIBREF. The LIBREF is your link between how you referencing the dataset and where the dataset are stored. If you ran the setup program properly then the dataset(s) should exist in the "library". There should be one physical file with an extension of .sas7bdat for each dataset in the "library" in the directory that was pointed to by the SQ libref. You should be able to look for the file(s) and check if they were created.
You normally have to define your librefs for each SAS session. If you are have having trouble accessing them later then perhaps you have not re-defined the SQ libref by running the LIBNAME statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
Like Tom mentioned in his response, it sounds like you need to submit a LIBNAME statement to set up the libref for the SQ library. This needs to be done for each SAS session when you need to use the data in the SQ library. Depending on where you stored your data, the syntax would be:
LIBNAME SQ "location-where-data-is-stored";
Hope that helps,
Rebecca