BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dmcloughlin
Fluorite | Level 6

I am trying to use the logParse Macro, but having some issues being able to reference the logfile which i am redirecting to the server  - I have searched the community responses to this, but i cant find anything that solves my issue.

 

The code I am submitting :

 


options fullstimer;

%let files \\serverxx ;
%let logParse = \logparse.sas;
%let passInfo = \passinfo.sas;

%include "&files.&passInfo";
%passInfo;
 

filename  logfile "\\serverxx\esa.log" ;

proc printto log= logfile  ; 
run; 

 
data esa;
	set benefit.esa_history (where=(date_data_Extract > "01dec2016"d));
run;

%include "&files.&logParse";
%logparse(logfile , myperfdata);

 

When i submit this and call the %logparse file - i dont seem to be able to be passing the correct reference to the log - i am using the filename in this instance, but have also tried the full path and other options to no avail.

 

On submitting the code above - i recieve the following message in the log which appears to suggest SAS is looking in the default SASAPP folder?

 


NOTE: Variable abovemem is uninitialized.
ERROR: Physical file does not exist, C:\SAS\Config\Lev1\SASApp\logfile.

 

Appreciate any thoughts / advice on how to solve this.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
dmcloughlin
Fluorite | Level 6

Agreed on the name!

 

I actually managed to solve this myself earlier but hadnt got around to updating this. I had been trying the full path approach you mentioned below, but discovered that i didnt need the quotes - when i removed these, the code worked fine.

 

  - use the full path

           %logparse(\\serverxx\esa.log, myperfdata);

View solution in original post

2 REPLIES 2
Damo
SAS Employee

Hi Damian (great name Smiley Happy)

 

My guess is that the input parameter LOGFILE (from %logparse(logfile , myperfdata);) is not recognized as the filename you defined earlier.

As such, it's trying to find a file name LOGFILE from the default folder use by the Workspace Server (you're using EG?) which is C:\SAS\Config\Lev1\SASApp.

 

i'm thinking of 2 options:

  - use the full path

           %logparse("\\serverxx\esa.log", myperfdata);

  - use a macro-variable

           %let logfile='\\serverxx\esa.log';

           %logparse(&logfile., myperfdata);

 

Hope that helps.

 

Cheers,

Damo

 

dmcloughlin
Fluorite | Level 6

Agreed on the name!

 

I actually managed to solve this myself earlier but hadnt got around to updating this. I had been trying the full path approach you mentioned below, but discovered that i didnt need the quotes - when i removed these, the code worked fine.

 

  - use the full path

           %logparse(\\serverxx\esa.log, myperfdata);

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 2412 views
  • 0 likes
  • 2 in conversation