Help using Base SAS procedures

Filename Statement Hanging

Reply
Contributor
Posts: 53

Filename Statement Hanging

I've run into a problem with a filename statement hanging all of the sudden.  This code ran fine in the past but when I submit this code, SAS hangs at "Running..."  Any ideas on what it could be?

filename mymac "***directory path***";

%include mymac ('*.sas');

Here's my setup.  SAS 9.2 on UNIX.  Enterprise Guide 4.3

Super User
Super User
Posts: 7,076

Re: Filename Statement Hanging

Posted in reply to mdavidson

Make sure the disk is on line.

Contributor
Posts: 53

Re: Filename Statement Hanging

I'm able to navigate to the drive, so it is definitely mounted and online.

Any other ideas?

Super User
Super User
Posts: 7,076

Re: Filename Statement Hanging

Posted in reply to mdavidson

Probably there is unbalanced quotes or other programming issue in the files that you are trying to %INC.

How controlled is write access to that directory?  Do you have version control on the files?

If it used to work then you can probably start by concentrating on the files that have been modified since it last worked.

You could look at what it is trying to read by using a data step to read the files instead of %INC.

data allmacs (compress=yes);

  length fname filename $200 text $1000 ;

  infile mymac('*.sas') lrecl=1000 truncover filename=fname;

  input text $char1000.;

  filename=fname;

run;

Trusted Advisor
Posts: 2,116

Re: Filename Statement Hanging

Posted in reply to mdavidson

The SAS code is running on the Unix server, so the FILENAME must reference a directory on the Unix server.

If the file name is known on the PC (EGuide) side, but not on the Unix side, then the disk will not be seen by Unix and it might hang (as Tom described).  Just being able to navigate to it with 'my computer' is not sufficient to tell if it is known to the Unix server.

You probably need to check with your local tech support people.

Ask a Question
Discussion stats
  • 4 replies
  • 238 views
  • 0 likes
  • 3 in conversation