- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to create a library without using libname statement in sas and also without using the options in menu bar ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @rohithverma
What is the purpose of the question? For example, do you want to call macros automatically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Do you mind using libname() function in data step ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Assigning SAS Libraries Using Environment Variables:
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If the organisation who interviewed you use SAS on the Mainframe then allocating a library through JCL (Job Control Language) might also be an option.
Amir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Amir wrote:
If the organisation who interviewed you use SAS on the Mainframe then allocating a library through JCL (Job Control Language) might also be an option.
Amir.
Which is basically the mainframe version of using environment variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Kurt_Bremser wrote:
@Amir wrote:
If the organisation who interviewed you use SAS on the Mainframe then allocating a library through JCL (Job Control Language) might also be an option.
Amir.
Which is basically the mainframe version of using environment variables.
Yes, but you have it backwards. I am sure that SAS's support of environment variables in other operating systems was created to mimic how they used DDnames on IBM mainframes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Absolutely. Mainframe SAS predates everything else, and the direct use of DD's in code (COBOL, PL/1) is standard on a MF.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@rohithverma wrote:
I just want to know is there any way of creating a library without using LIBNAME statement as I have faced this question in one my interview recently. Thank you
One way that is not really recommended but will work in SAS Foundation at least if your operating system has the correct associations for the SAS files: Double click to open a dataset file from something like the Windows Explorer or similar tool. SAS will create a library such as TMP1, the digit will likely increment if done to sets in different locations, to display the data set.
You may find this also happens when downloading a data set from the web depending on your browser or the source (like this forum).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You could consider using the libname() function (not statement) as detailed in the documentation:
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212079.htm
Kind regards,
Amir.