DATA Step, Macro, Functions and more

How to create SAS Library, create Proc format & view the user defined formats?

Reply
Occasional Contributor
Posts: 15

How to create SAS Library, create Proc format & view the user defined formats?

[ Edited ]

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! 

 

     

PROC Star
Posts: 552

Re: How to create SAS Library, create Proc format & view the user defined formats?

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

 

Occasional Contributor
Posts: 15

Re: How to create SAS Library, create Proc format & view the user defined formats?

[ Edited ]

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.... Smiley Sad 

 

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. Smiley Sad 

 

Super User
Posts: 17,868

Re: How to create SAS Library, create Proc format & view the user defined formats?

Do you know what a SAS Library is? 

Occasional Contributor
Posts: 15

Re: How to create SAS Library, create Proc format & view the user defined formats?

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!! 

Super User
Posts: 17,868

Re: How to create SAS Library, create Proc format & view the user defined formats?

So when setting up library all you need is the path. The libname statement from @draycut 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. 

Occasional Contributor
Posts: 15

Re: How to create SAS Library, create Proc format & view the user defined formats?

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

Super User
Posts: 17,868

Re: How to create SAS Library, create Proc format & view the user defined formats?


ImPrem wrote:

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


The link is in the post. 

Super User
Posts: 5,260

Re: How to create SAS Library, create Proc format & view the user defined formats?

Ask a Question
Discussion stats
  • 8 replies
  • 149 views
  • 4 likes
  • 4 in conversation