The USER= option does not work correctly with the EXPORT procedure in WorkspaceServer sessions beginning with SAS® 9.4M7 (TS1M7)


Setting the USER= option to direct one-level data set names to a SAS library other than WORK in a WorkspaceServer session can lead to an error in SAS 9.4M7 and later when using PROC EXPORT.

A typical error scenario similar to the following occurs in the SAS log:

30         libname source  '/tmp/sasdemo' ;
NOTE: Libref SOURCE was successfully assigned as follows: 
      Engine:        V9 
      Physical Name: /tmp/sasdemo
31         
32         options user=source ;
33         
34         data test11 ;
35         set sashelp.class ;
36         run ;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set SOURCE.TEST11 has 19 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds

43 proc export data=test11;
44 outfile="/tmp/sasdemo/test11.csv" dbms=csv replace;
45 run;  
ERROR: File WORK.TEST11.DATA does not exist.
ERROR: Export unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE EXPORT used (Total process time): real time 0.02 seconds cpu time 0.02 seconds

Once you assign a SOURCE value to the USER= option, any data set referenced by a one-level name should be associated with the SOURCE library, not the WORK library. 

This behavior occurs only when using PROC EXPORT and only when using a WorkspaceServer session.

Workaround

To work around this issue, specify a two-level name for the data set.

For example, no error occurs when you submit the following:

proc export data=source.test11;
  outfile="/tmp/sasdemo/test11.csv" dbms=csv replace; 
run;