Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (430)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
SAS DATA Statement
What is the SAS DATA Statement?
✍: FYIcenter.com
DATA Statement defines a single data set from different types of data sources.
1. Using DATALINES statements to provide data - If you want to provide data inside the SAS program, you can use a DATALINES statement as shown in the following examples:
DATA Club; /* "Club" specifies the data set name */ /* "INPUT ..." specifies columns and their types/sizes */ /* Column followed by "$" specifies "String" type */ INPUT Id 1-4 Name $ 6-22 Weight 24-25; /* "DATALINES" is followed by actual data lines */ DATALINES; 1023 David Shaw 77 1049 Amelia Serrano 72 1219 Alan Nance 83 1246 Ravi Sinha 66 1078 Ashley McKnight 62 ;
2. Using loop logics to generate data - If you want to generate data from the SAS program, you can use some loop logic as shown in the following examples:
DATA Sample; /* "Sample" specifies the data set name */
Weight = 0; /* Specifies a new variable */
DO Id = 1 to 6; /* Repeat a logic 6 times */
Weight = RAND('UNIFORM', 60, 90);
OUTPUT; /* Generate a row of data for all variables */
END;
2021-06-19, 2422🔥, 0💬
Popular Posts:
Why am I getting the "Spawn Failed: Server at http://127.0.0.1:47353/u ser/fyicenter/didn't respond ...
How to Uninstall Skype Meetings App on Windows? I don't need it anymore. You can following this tuto...
What is the difference between a Web page and a Single File Web Page? Word supports 2 Web page forma...
How to add or change the footer on a layout in PowerPoint? I want my slide footers to have the same ...
Why I am getting the "Account Frozen" message when login to OneDrive? If you have not used your free...