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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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