BookmarkSubscribeRSS Feed
Filipvdr
Pyrite | Level 9
FILENAME mkdir pipe "mkdir d:\newfolder";
data _null_;
input mkdir;
put _infile_;
run;

LOG:

56719 FILENAME mkdir pipe "mkdir d:\newfolder";
ERROR: Insufficient authorization to access PIPE.
ERROR: Error in the FILENAME statement.
56720 data _null_;
56721 input mkdir;
56722 put _infile_;
56723 run;

ERROR: No DATALINES or INFILE statement.
ERROR: The _INFILE_ variable has been referenced, but no DATALINES or INFILE statement was found.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds Message was edited by: Filipvdr
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
You may need to talk to your System Administrator:
[pre]
ERROR: Insufficient authorization to access PIPE.
[/pre]

Also, where, exactly are you trying to create the directory and are you doing this in the context of a stored process. For example, if your SP is running on a SAS server on a Unix box, there's probably not a 😧 drive on that server. You may need to have the PIPE capability turned on and/or change your path.

You might consider working with Tech Support on this issue.

cynthia
PaulHomes
Rhodochrosite | Level 12
Hi Filipvdr,

In addition to Cynthia's points, if you are running your stored process code in a SAS Stored Process Server or SAS Workspace Server then it is likely that pipes and executing operating system commands have been disabled via the NOXCMD option (it is the default for the SASApp application server). If that is the case then the SAS platform administrator could possibly enable the XCMD option but it has security implications and may not be appropriate.

Another way of creating directories without using pipes or operating system commands is to use the DCREATE function. This is an SCL function but is also available in the data step. Here is an example of creating the newfolder folder in the d:\ parent directory (i.e. d:\newfolder😞

data _null_;
newdirname=dcreate('newfolder', 'd:\');
put newdirname=;
run;

You can use it in the %sysfunc macro function too:

%let newdir=%sysfunc(dcreate(newfolder,/tmp));
%put &newdir;

You should find that dcreate works even when NOXCMD is in effect. The documentation for the dcreate function at http://support.sas.com/documentation/cdl/en/sclref/59578/HTML/default/viewer.htm#a000308115.htm

Cheers
Paul

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 10302 views
  • 0 likes
  • 3 in conversation