Desktop productivity for business analysts and programmers

%logParse usage

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

%logParse usage

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.


Accepted Solutions
Solution
‎01-10-2017 11:23 AM
Occasional Contributor
Posts: 8

Re: %logParse usage

[ Edited ]

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


All Replies
SAS Employee
Posts: 93

Re: %logParse usage

Hi Damian (great name Smiley Happy)

 

My guess is that the input parameter LOGFILE (from %logparse(logfile , myperfdata)Smiley Wink 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

 

Solution
‎01-10-2017 11:23 AM
Occasional Contributor
Posts: 8

Re: %logParse usage

[ Edited ]

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 214 views
  • 0 likes
  • 2 in conversation