BookmarkSubscribeRSS Feed
ImPrem
Obsidian | Level 7

Hi all,

 

Kindly help me out to clear my below mentioned doubts: 

 

Please explain the same with code and examples. 

 

1. How to create sas library

       a. Manually 

       b. Through SAS code

 

2. Create Formats using Proc Format  & How to view the existing formats. 

 

Thank you! 

 

     

8 REPLIES 8
PeterClemmensen
Tourmaline | Level 20

1. How to create sas library

       a. Manually 

             Right click the explorer window --> New --> Library

 

       b. Through SAS code

            %let path = your_path_goes_here;

      libname mylib "&path";

 

2. Create Formats using Proc Format  & How to view the existing formats. 

 

            http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a002473481.htm

 

ImPrem
Obsidian | Level 7

Im a beginner for Base SAS. 

 

a. Manally 

 

Its shows "Name, Engine, Path & Options". Don't have any clue, what to do with that. 

 

As well as i don't know the default library path.... 😞 

 

b. Through SAS Code.

 

 

%let path = your_path_goes_here;
      libname mylib "&path"

 

Just started learning Base SAS, i think, its "Macro". I'm not yet started to learn Macro. But, thanks.

 

Can you give me some simple example with "Libname Statement" or any other way to do the same. 

 

2. Create Formats using Proc Format  & How to view the existing formats. 

 

How i will save it in library & view the format using "fmtlib"

 

Example:

proc format ;

value $response 

'Y'='Yes'

'N'='No'

run;

 

Please help me out. 😞 

 

ImPrem
Obsidian | Level 7

Yes.

 

SAS files are stored in SAS library. 

 

In simple way:

 

SAS Library- Folder

SAS Files (SAS Data Set) - Files

 

Please correct me, if i'm wrong! 

 

Thanks!! 

Reeza
Super User

So when setting up library all you need is the path. The libname statement from @PeterClemmensen should be enough of a hint.

Otheriwse, see the YouTube videos on 

support.sas.com/training/tutorial

 

They have videos for all of your questions above. 

ImPrem
Obsidian | Level 7

@Reeza: Thanks & supporting urls/links will be much appreciated!! 

Reeza
Super User

@ImPrem wrote:

@Reeza: Thanks & supporting urls/links will be much appreciated!! 


The link is in the post. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 975 views
  • 4 likes
  • 4 in conversation