Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
48 views

SAS Programming Class Notes: What Is Dataset?

A dataset in SAS is a table that stores data. To create a dataset, use the DATA statement followed by the dataset name, input statement with variable names separated by spaces, and a datalines statement containing the data values. The log provides information about running the SAS program rather than the output tab. Temporary libraries in SAS store datasets that only exist for the current SAS session.

Uploaded by

Subhadip Sinha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

SAS Programming Class Notes: What Is Dataset?

A dataset in SAS is a table that stores data. To create a dataset, use the DATA statement followed by the dataset name, input statement with variable names separated by spaces, and a datalines statement containing the data values. The log provides information about running the SAS program rather than the output tab. Temporary libraries in SAS store datasets that only exist for the current SAS session.

Uploaded by

Subhadip Sinha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SAS Programming Class Notes

What is dataset?

A dataset in SAS is nothing but a table in general terminology

For comments in SAS:

Use “/*” (Multiple Line Comment) or “*” (single line comment) or ctrl + / creates a comment in SAS

*Creating a Dataset*

1.Start with the keyword DATA and then give the name of the data set

* Separate variable names with spaces in the input statement*

*Follow the character variable name with a $ sign*

*After datalines – whatever I write is the input data*

*Column Names are called variables in SAS*

*To run a SAS Program click the Run button or Press F3 Command*

data CLASS; * creating a dataset with the name class*

input name $ class rollno grade department $; * creating input statement with selected variable *
*$ represents a variable data type* *Only Name and
Department is considered as Character others are
numeric data type*

datalines;

John 1001 14 ECE * The space denotes which value is assigned to


which variable

Rob 1002 14 Elec

Tom 1005 14 Mech

Run;

The highlighted part is the code that would create a dataset in SAS with the information provided
after the data lines command

AFTER RUNING THE CODE GO TO LOG ALWAYS INSTEAD OF THE OUTPUT OR RESULT TAB

What is a temporary library?

You might also like