35). What is the main difference between rename and label?

1. Label is global and rename is local i.e., label statement can be used either in proc or data step where as rename should be used only in data step.

2.If we rename a variable, old name will be lost but if we label a variable its short name (old name) exists along with its descriptive name.

36). What is Enterprise Guide? What is the use of it?

It is an approach to import text files with SAS (It comes free with Base SAS version 9.0)

37). What other SAS features do you use for error trapping and data validation? What are the validation tools in SAS?

For dataset: Data set name/debug
Data set: name/stmtchk
For macros: Options:mprint mlogic symbolgen.

38). How can you put a “trace” in your program?

ODS Trace ON, ODS Trace OFF the trace records.

39). How would you code a merge that will keep only the observations that have matches from both data sets?

Using “IN” variable option. Look at the following example.
data three;
merge one(in=x) two(in=y);
by id;
if x=1 and y=1;

data three;
merge one(in=x) two(in=y);
by id;
if x and y;

40). What are input dataset and output dataset options?

Input data set options are obs, firstobs, where, in output data set options compress, reuse.Both input and output dataset options include keep, drop, rename, obs, first obs.

41). How can u create zero observation dataset?

Creating a data set by using the like clause.
ex: proc sql;
create table latha.emp like oracle.emp;
In this the like clause triggers the existing table structure to be copied to the new table. using this method result in the creation of an empty table.

42). Have you ever-linked SAS code, If so, describe the link and any required statements used to either process the code or the step itself?

In the editor window we write
%include ‘path of the sas file’;

if it is with non-windowing environment no need to give run statement.

43). How can u import .CSV file in to SAS? tell Syntax?

To create CSV file, we have to open notepad, then, declare the variables.

proc import datafile=’E:age.csv’out=sarath
proc print data=sarath;

44). What is the use of Proc SQl?

PROC SQL is a powerful tool in SAS, which combines the functionality of data and proc steps. PROC SQL can sort, summarize, subset, join (merge), and concatenate datasets, create new variables, and print the results or create a new dataset all in one step! PROC SQL uses fewer resources when compard to that of data and proc steps. To join files in PROC SQL it does not require to sort the data prior to merging, which is must, is data merge.

45). What is SAS GRAPH?

SAS/GRAPH software creates and delivers accurate, high-impact visuals that enable decision makers to gain a quick understanding of critical business issues.

46). Why is a STOP statement needed for the point=option on a SET statement?

When you use the POINT= option, you must include a STOP statement to stop DATA step processing, programming logic that checks for an invalid value of the POINT= variable, or Both. Because POINT= reads only those observations that are specified in the DO statement, SAScannot read an end-of-file indicator as it would if the file were being read sequentially. Because reading an end-of-file indicator ends a DATA step automatically, failure to substitute another means of ending the DATA step when you use POINT= can cause the DATA step to go into a continuous loop.

47). What is the difference between nodup and nodupkey options?

The NODUP option checks for and eliminates duplicate observations. The NODUPKEY option checks for and eliminates duplicate observations by variable values.

48). What is the difference between nodup and nodupkey options? 

NODUP compares all the variables in our dataset while NODUPKEY compares just the BY variables.

49). What is the difference between compiler and interpreter? Give any one example (software product) that act as an interpreter?

Both are similar as they achieve similar purposes, but inherently different as to how they achieve that purpose. The interpreter translates instructions one at a time, and then executes those instructions immediately. Compiled code takes programs (source) written in SAS programming language, and then ultimately translates it into object code or machine language. Compiled code does the work much more efficiently, because it produces a complete machine language program, which can then be executed.

50). Code the table’s statement for a single level frequency?

Proc freq data=lib.dataset;
table var; *here you can mention single variable of multiple variables seperated by space to get single frequency;