BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jacksonan123
Lapis Lazuli | Level 10
options nosymbolgen nomtrace nonotes nosource noMPRINT;


%macro datm4;
%do i=1 %to 10;
data result&I ;
/*inialization of flag to 0 which will be used to find line of interest*/
retain flag_section1 0 ;
infile "FOLDERS/myfolders/FINALSAS/DATA/TEST&i..nm7/TEST&i..lst" END=EOF;
if index(_infile_ , 'NO. OF SIG. DIGITS IN FINAL EST.:') and scan(_infile_, -1,'') = '2.9' then flag_section1 =1;

input @; if _infile_ =: 'NO. OF SIG. DIGITS IN FINAL EST.: 2.9' then flag_section1 =1;

if eof then output;
run;
%END;

TITLE ' DISTRIBUTION D DATA';
data FLAG;
set %do i=1 %to 10;RESULT&i %end ;;
run;

%mend datm4;
%datm4;



PROC EXPORT DATA=flag
   OUTFILE= '/folders/myfolders/FINALSAS/Flag.XLSX ' 
   DBMS=XLSX REPLACE;
   RUN;

The program above runs ok on my laptop.  Before I ran the code on the workstation I checked the properties and the location was given as:/folders/myfolders/myfolders/finalsas/…..

 

I got the following error message which is listed for 7 but applies to all N=10 folders:

ERROR: Physical file does not exist,
/opt/sasinside/SASConfig/Lev1/SASApp/FOLDERS/Myfolders/myfolders/FINALSAS/DATA/TEST7.nm7/TEST7.lst.
WARNING: The data set WORK.RESULT7 may be incomplete. When this step was stopped there were 0 observations and 1 variables.
WARNING: Data set WORK.RESULT7 was not replaced because this step was stopped.
ERROR: Physical file does not exist,
/opt/sasinside/SASConfig/Lev1/SASApp/FOLDERS/Myfolders/myfolders/FINALSAS/DATA/TEST8.nm7/TEST8.lst.
 

Can anyone tell me why using the path from the pull down properties tab in SAS UE, although it has an extra myfolders, does not work?  

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
infile "/folders/myfolders/FINALSAS/DATA/TEST&i..nm7/TEST&i..lst" END=EOF;

The path is case sensitive since SAS UE uses a Unix file system.

This seems like a way to read the output from Listing, which is likely old code I'm assuming or a PROC that doesn't support ODS tables. 

View solution in original post

8 REPLIES 8
ballardw
Super User

READ the error message. It is telling you where you told the program to read from:

 

/opt/sasinside/SASConfig/Lev1/SASApp/FOLDERS/Myfolders/myfolders/FINALSAS/DATA/TEST7.nm7/TEST7.lst.

You don't say what environment you are using, whether SAS UE or not.

I suspect the issue may be either missing a / before FOLDERS

or running connected to a server that can't find the path because the server doesn't have permissions to read from the location.

 

I find the capitalization a bit odd as most people with similar error messages show the path in all lower case. If you are running in SAS University edition then that is a Linux system and the path is case sensitive for each and every folder name and likely expects lower case as well as the /folders start to the path.

jacksonan123
Lapis Lazuli | Level 10
I am running SAS UE. I did put a (/) before folders and used no caps but I
got the same error messages. I doubled checked the location based upon the
file properties dropdown.

You stated, " or running connected to a server that can't find the path
because the server doesn't have permissions to read from the location."
Since I am the administrator if this is the problem what is the best way to
resolve it?

ERROR: Physical file does not exist,
/folders/myfolders/myfolders/FINALSAS/DATA/TEST7.nm7/TEST7.lst.




jacksonan123
Lapis Lazuli | Level 10
No that is the path I got from the properties tab.
Reeza
Super User
Then you set up your myfolders nested somehow...it's perfectly valid but will through most of us off because you created a myfolders under you main myfolders for some reason.
jacksonan123
Lapis Lazuli | Level 10
That was probably unintentional when I was linking the Vmware to the my
folders. I do have myfolders nested.

I have decided to go back and use my lap top where the path issues do not
exist.

This is taking too much time although there may be a simple solution.
Reeza
Super User
infile "/folders/myfolders/FINALSAS/DATA/TEST&i..nm7/TEST&i..lst" END=EOF;

The path is case sensitive since SAS UE uses a Unix file system.

This seems like a way to read the output from Listing, which is likely old code I'm assuming or a PROC that doesn't support ODS tables. 

jacksonan123
Lapis Lazuli | Level 10
nosymbolgen nomtrace nonotes nosource noMPRINT
For some reason when I changed the no options to symbologen mtrace etc it ran okay

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 977 views
  • 1 like
  • 4 in conversation