Elementary SAS and Format Questions
Click on the answer you think is most nearly correct.
1. Which of the following statements is not true:
SAS statements must start with a letter. SAS names must not contain any embedded blanks. SAS names must be six characters or less. SAS names may contain numbers after the first letter. SAS names do not have to be logical (they do not have to make sense).
2. In SAS a VALUE statement is always present when using:
PROC FREQ PROC FORMAT a PRINT statement a LABEL statement PROC SORT
3. Which of the following statements is not true:
You can associate formats with several variables in one FORMAT statement. In the FORMAT statement in the DATA step, the period immediately following the format name is required. If a format contains letters or blanks, you must enclose it in single quotes. A FORMAT statement is used whenever you want to label your variable names. A FORMAT must be 40 characters or less including the blanks.
4. A double-at sign: @@ on a SAS INPUT statement means:
The data are to be read as character data instead of numeric data. The data follow immediately in the SAS code instead of being read from a file. Each time SAS finishes loading values for the variable list it should look for the next observation on the same line instead of automatically dropping to the next line of input data. The data to be processed will be all numeric data with no special characters or letters. SAS should read the data alternately from two input data sets.
5. An ampersand: & on a SAS INPUT statement means:
Include single blanks in a data stream (such as a city name or street address) as part of the same variable but treat more than one blank as a delimiter separating the variables. The INPUT statement is continued on the next line. When SAS finishes reading in one data file, it should go to a second file for the remainder of the data. A symbolic variable is to be substituted for the &. The data to be processed should be treated as character rather than numeric data.