As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

PROC DATASETS can be case sensitive

From sasCommunity
Jump to: navigation, search

When the source library does not use a native SAS engine, PROC DATASETS can be case sensitive.

Here is an example, using Excel as the source library. First create three data sets, one using proper case (initial cap only), one lower case, and one upper case.

 libname test excel 'c:\temp\test.xls';
 data test.Larry 
 something = 'Hello World';

Next, attempt to copy all three to the WORK library.

 proc datasets nolist;
 copy in=test out=work;
    select Larry Moe Curly;

Notice that only one of the three specified names provides a case-sensitive match. It is the only one which is copied. The log reports

ERROR: The file TEST.Moe (memtype=ALL) was not found, but appears on a SELECT statement.
ERROR: The file TEST.Curly (memtype=ALL) was not found, but appears on a SELECT statement.
NOTE: Statements not processed because of errors noted above.

The difficulty appears to lie with PROC DATASETS. When a DATA step or PROC SQL is used to perform a copy, it is successful even if the code has extremely arbitrary mixed case.

 data work.Moe;
 set test.mOE;
 proc sql;
 create table Curly as
  select * from test.cUrLy;

See also