Question-126: When you submit the SAS program and you get the error message like “A Quoted String has become too long or that the statement is ambiguous” what does that mean?

Answer: It means you have unbalanced quotation marks in your SAS program which you need to correct and resubmit the program.

 

Question-127: Is that true when SAS program has syntax error, it would be compiled but execution fails?

Answer: No, whenever syntax error happens program would not compile because before compiling the program checks the syntax and if these are not correct program will not compile and give error. Syntax errors occur because program does not follow the SAS Base programming rules correctly.

 

Question-128: If you have used invalid option in the SAS statement SAS program will ignore that?

Answer: No, whenever you have wrong option used with the SAS program then SAS program would identify that wrong option and notifies via error message that you have provided invalid option. In this case we need to recall the SAS program, remove or correct the invalid option and resubmit the program.

 

Question-129: What is the difference between PUTLOG and PUT statement?

Answer: We can use PUTLOG and PUT statement to help and identify the errors and print the messages in the logs. We can use the PUTLOG statement in a DATA step to write messages to the SAS log to help identify logic errors. And also use temporary variables in the PUTLOG to assist in debugging. And using the PUT statement to examine variables and print your own message to the SAS log.

 

Question-130: In the PROC PRINT report, how can you use data value as an observation column?

Answer: If you don’t provide any variable then by default OBS column would be generated and produce as first column. But if you don’t want OBS as a first column and some other variable from the DATASET as an ID or OBS column then use the ID option and then variable name as below.

 

proc print data=he_sas.he_data;

                Id courseName;

run;

In this case courseName would be the first column in the report instead of OBS column.