Desktop productivity for business analysts and programmers

Error using PIPE to create directory

Reply
N/A
Posts: 0

Error using PIPE to create directory

Hi,
My company has just moved from SAS v.8 on Windows to Enterprise Guide on a Unix server.
On the old version and platform I used to run code to create directories on a file server using PIPE, however, since moving to the new version and platform I get the following error messages when I run the code:

ERROR: Insufficient authorization to access PIPE.
ERROR: Error in the FILENAME statement.
ERROR: No logical assign for filename FILEREF.

My code (simplified) is :

filename fileref PIPE 'mkdir "\\AUNSW0170020\DATA\A\B\C"';
data _null_;
infile fileref;
Input;
put _infile_;
run;

Is this a permissions issue or something else ? Are there any work-arounds ?

Thanks
Tim
Super Contributor
Posts: 260

Re: Error using PIPE to create directory

Silly question : has the user used thru Enterprise Guide to connect to the server ability to create directories ?
Community Manager
Posts: 2,703

Re: Error using PIPE to create directory

Hi,

PIPE, SYSTASK and XCMD are among the features disabled by default when running a SAS server configured with SAS Integration Technologies. These features can present a risk to use on a central server that is accessed by lots of users with Enterprise Guide.

By default, the Object Spawner starts the SAS session with the -NOXCMD option which does not allow SYSTASK commands to be run.

I'd suggest opening a track with tech support and explaining your situation; they can advise you as to the best workaround for what you're trying to do.

Chris
Occasional Contributor
Posts: 15

Re: Error using PIPE to create directory

Although NOXCMD is in effect, SAS can still make use of the operating system. This works for EG running a workspace server on MS Server2003:

data _null_ ;
NewDir = dcreate('AnotherNewDir','c:\temp') ;
run ;
N/A
Posts: 0

Re: Error using PIPE to create directory

Thanks, everyone for your replies.

The last bit of code works a treat !

Thanks again and best regards

Tim
Super Contributor
Posts: 426

Re: Error using PIPE to create directory

Apologies for opening a track from old thread. But my issue looks similar. When i run the below code, i got the error as mentioned in subject. I applied workarnd suggested by AndrewF, but still couldn't succeed.

I'm running this code in SAS EG 5.1.

%global month tdcut infle inpth inpth2 cnt cnt2;

%let month  = 201411              ;*** current monthly processing date;

%let tdcut  = 31oct2014           ;*** the cut off date for daily csv trigger dates, matches the last

                                  date in the current application fi;

%let clint  = resfcu           ;*** client;

%let fi     = ResourcesFCU ;*** fi name;

*filename indat1 pipe 'ls -d /data_PPM/ResourcesFCU/Shopper/daily_files/*'  ;

*filename indat2 pipe 'ls -d /data_PPM/ResourcesFCU/Shopper/daily_files2/*' ;

data null ;

   NewDir1 = dcreate('indat1','ls -d /data_PPM/ResourcesFCU/Shopper/daily_files/*') ;

run ;

data null ;

   NewDir2 = dcreate('indat2','ls -d /data_PPM/ResourcesFCU/Shopper/daily_files2/*') ;

run ;

data file_list1 ;

length fname $250              ;

infile indat1 truncover        ; /* infile statement for file names */

input fname $250.              ; /* read the file names from the directory */

call symput ('num_files1',_n_) ; /* store the record number in a macro variable */

If scan(fname,-1,'.') = 'txt' then delete   ;

If scan(fname,-1,'/') = 'dupes' then delete ;

run ;

error messages from my log

47         data file_list1 ;

48         length fname $250              ;

49         infile indat1 truncover        ; /* infile statement for file names */

50         input fname $250.              ; /* read the file names from the directory */

51         call symput ('num_files1',_n_) ; /* store the record number in a macro variable */

52         If scan(fname,-1,'.') = 'txt' then delete   ;

53         If scan(fname,-1,'/') = 'dupes' then delete ;

54         run ;

NOTE: Numeric values have been converted to character values at the places given by: (Line)Smiley SadColumn).

      51:27  

ERROR: No logical assign for filename INDAT1.

NOTE: The SAS System stopped processing this step because of errors.

WARNING: The data set WORK.FILE_LIST1 may be incomplete.  When this step was stopped there were 0 observations and 1 variables.

NOTE: DATA statement used (Total process time):

      real time           0.00 seconds

      cpu time            0.01 seconds

Ask a Question
Discussion stats
  • 5 replies
  • 1049 views
  • 0 likes
  • 5 in conversation