Note: Data set block start with data key board and requires the name of the SAS file.
It is accessing statement, it accept data from internal files or external files.
It is a reading and loading statement in SAS file with variables.
These 2 statements are used to indicate the internal data. Note: Data set block closed with ; (or) run statement. Each and every SAS statement ends with ; SAS coding can be written in mixed case. To run the SAS file use F3 (or) F8 Ex: 100 kumar 34 black 101 kiran 89 white Delimiter: In raw data, data values are represented by any one special character. This special character is called delimiter. Default delimiter in SAS is space.
These core tutorials will help you to learn the Rules for SAS file name and variable name. For an in-depth understanding and practical experience, explore SAS Training Material.
Ex: data demo If use the single level of data set name, the data set default stores in work library.
Using 2 levels of data set name, we can store data set in requirwd name. Ex: Data sasuser. demo; TE: if we write single level of data set name SAS fault convert into 2 levels of data set name.
It is a storage place for SAS files.
It stores the data in variables and observation format.
Character
Numeric: +And -, decimal (or) E for scientific notation. Character: Numerals, letters or special characters($ or!) up to 32,767 characters long Libraries are 3 types
Work: Default destination of SAS file is work library. If we store any data set in work library, it is available at the end of SAS session. Work is temporary storage place for SAS file. SAS user and SAS help: Both are the permanent storage place for SAS files, But in SAS user only. user specified files are available , but in SAS help users specified file and system (SAS) specified files are also available. File: This concept is used to create a shortcut for external files from outside of SAS environment to SAS environment. Favorites and folders: This concept is used to crate a short cut for folders. Result window: It is used to manage a SAS application result. In SAS, output window is managed by a result window. SAS/BASE This is one of the modules in base SAS tool. It is used to create a SAS file(SAS dataset) SAS file requirements:
Raw data: It is 2 types
Internal data: If raw data is available in SAS environment (editor window). This raw data is called internal data. External data: It is available in outside of the SAS environment or external files like txt, excel, oracle…. Length statement: Using length statement, we can increase the storage for character variable. We can increase the storage capacity up to 256 characters. Number storage: SAS system default store upto 12 numbers. Numeric value grater than 12 numbers stores in scientific format. We can convert scientific format into normal format using format statement. Ex: Data sasuser.demo; Infile cards; Length name $ 12; Input pid age name $ race $ Height; Cards; 123 34 kiran rao Asian 5.6 201 59 pavan kumar Africa 3.4 202 23 lava kumar Asian 4.5
Some times in raw data, data values available with variables names. In this case, we can use named input method. Ex: Data demo 1; Infile cards; Length name $13; Input pid = age = name = $; Cards; Pid = 123 age =34 name kiran rao Pid =201 age=59 name= pavan kumar Pid =202 age =23 name = lava kumar ; Proc print data = demo1; Run;
In raw data, data values are available in specific columns. Procedure block: Using procedure block, we can analysis and reporting. It starts with PROC keyword and requires procedure options. It is closed with run or quit statement. Note: Default procedure block generate in output window Ex: Data sasuser.demo; Infile cards; Input pid age color $ race $ Height weight; Cards; 200 34 white Asian 5.6 78 201 59 black Afirica 3.4 45 202 23 white Asian 4.5 56 ; Proc print data = sasuser demo; Run;
You liked the article?
Like : 0
Vote for difficulty
Current difficulty (Avg): Medium
1/15
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.
Stay Updated
Get stories of change makers and innovators from the startup ecosystem in your inbox