Question-: Please show me an example, how do you create a SAS Data set?
Answer: To create a SAS Dataset we need to write a program. Let’s see from the below pseudo code. data he_learner; input ID 1-4 Name $ 6-12 CourseName $ 13-18 Fee $; datalines; 1001 Amit Hadoop 8000 1002 Rakesh SAS 7000 ; run; The entire program above represents a SAS Data step. Which is creating the new Data set named “he_learner� using the data provided below datalines.
Question-: Please tell me what all common elements you know about the Base SAS programming?
Answer: Common programming elements in the SAS Base are statements, expressions, functions, call routines, options, formats, and informats.
Question-: What all are the basic rules for SAS statements?
Answer: Lets see the few rules below - SAS statement would always end with the semicolon. - SAS statement can be written using lowercase, uppercase or mixture of two. - You can write more than one statement in a single line. - It is not necessary that your SAS statement can start from the first column of the line. - Your SAS statement can be written in more than one line, as soon as it found semicolon then statement ends.
Question-: What all are the rules for the SAS names?
Answer: SAS could have various names like - Name of the variable - Name of the Data sets So, each name in the SAS has to follow some rules which are as below. - Name must have length between 1 to 32 character. - Name’s first character can be either “_� underscore or any other letter. - From2nd character to 32, you can even have the number e.g. “_he_2_data� - You can not have blank in the names.