Question-: What is the difference between FILENAME and INFILE?
Answer: Using the FILENAME we can create a fileref which is used to locate the external file and then in the INFILE statement we can use this fileref to refer that external file.
Question-: Can you explain all the below 4 INFILE options?
FLOWOVER, MISSOVER, STOPOVER, TRUNCOVER
Answer: INFILE has various options to read the INFILE data and how to take care when the field size is not as expected. - FLOWOVER: This is a default behavior in this case SAS DATA step simply reads the next record into the input buffer, attempting to find values assign to the rest of the variable names in the INPUT statement. If you don’t want SAS to move on to a new row if there are not enough data in the current row, you need to use one of the other INFILE option. - MISSOVER: this option prevents the DATA step from going to next line if it does not find values in the current record for all the variables in the input statement. And for all the incomplete data a missing value would be assigned. - STOPOVER: causes the DATA step to stop processing if an INPUT statement reaches the end of the current record without finding values for all variables in the statement. If your data should be complete and the process should not continue if the data are incomplete this is a good option. - TRUNCOVER: causes the DATA step to assign the raw data value to the variable even if the value is shorter than expected by the INPUT statement. If, when the DATA step encounters the end of an input record, there are variables without values, the variables are assigned missing values for that observation.
Question-: What is the use of “@@� at the end of input statement?
Answer: Using the DOUBLE training sign in the INPUT statement, utile all the fields in the record is processed it holds the current record for the execution of the next INPUT statement, as you can see in the below example where “Hadoop 8000 Spark 8500 SAS 9000� holds 6 fields which can be converted into 3 records having two fields for each record.
Question-: What all are the by default statistics can be produced by the MEANS proc in SAS?
Answer: SAS can produce N, MIN, MAX, MEAN and STD DEV can be produced.