Question-36: In the SAS dataset we know rows are called observation and column name are variables, but what are those in raw file?
Answer: In the raw file we can say each observation is equivalent to the records and each column name is known as field. As you can see in below Raw data first line represent all the fields and 5 records, each data value is separated by “~”
Question-37: What happen if some records do not have a value for every fields?
Answer: When Raw data is converted into SAS Data set and if any data value is missing then it can be either represent by blank space or by the period (“.”). If missing data value is numeric type then it would be shown as period and if missing data value is character type then it is shown as “ “ blank space.
Question-38: What is permanent and temporary dataset?
Answer: Any dataset which is created under the Work data library then it is temporary and as soon as you close your session these data would be deleted. And permanent dataset are those dataset which remain persisted even you close your session and re-open it. Any dataset you would be creating other than Work data library are permanent dataset.
Question-39: How do you specify in which data library the data should be created?
Answer: You can specify dataset using two names separated bt “.” Period. Where the name before the period is data library name and after the period is dataset name. Let see the example “he_sas.he_learner”. Here, he_sas is a data library name and he_learner is a dataset name. Another example is “Work.he_data” . In this case he_data is created in the work data library, hence this “he_data” is a temporary dataset and would be deleted as soon as session is closed. If you create a dataset without the library name e.g. “data he_data” then it is always temporary and would be created in the work data library.
Question-40: What is the use of LIBNAME SAS statement?
Answer: You can use the LIBNAME to assign a libref (library reference) to a SAS data library for example below
libname he_sas 'C:\Users\HadoopExam\he_sasdata';
As you can see “libname” is a keyword, “he_sas” is a libref and 'C:\Users\HadoopExam\he_sasdata' is physical path for the data library where the actual data would be stored. Here, libref (he_sas) is a logical name to refer the data stored in the directory/folder specified.