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);

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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