Question-106: What is the basic principal of the CAS actions?

Answer: The principle is to summarize and analyze large data volumes in the in-memory tables in the CAS server. The smaller, summarized results, are transferred from the server to the SAS client. The procedure then post-processes the summarized results to produce additional statistics, Output Delivery System (ODS) objects, and so on.

 

Question-107: Can you give example of the base procedure which uses the CAS actions

Answer: There are quite a few such procedure please some of them below

  • APPEND
  • CONTENTS
  • COPY
  • TABULATE etc.

 

Question-108: What is the difference between INPUT and INFILE statement?

Answer: INFILE statement you can use to identify an external file to be read with an INPUT statement.

With the INFILE statement you provide the location of the external file and the type of the file like csv, text etc. And in the INPUT statement you are providing list of fields to be read in.

 

Question-109: 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-110: 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.