BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Deonjpret
Fluorite | Level 6
I have two macros of which: 1. (_printlog.sas): has to be executed at the start of ever Enterprise Guide session 2. (_printlogend.sas): And the other when the session is done running. Neither of them can be in Enterprise Guide itself - has to be in a configuration and autoexec file. We are running SAS 9.4 on Linux. Let me know if you need more info please. Please be specific in where what should be placed, as I have tried with no success. Many thanks Deon
1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

Hi

 

From the document you showed, one can not see whether you actually called the macros.

 

the code should look like:

%macro _startjob;

/* your code */
%mend;

%_startJob

Also opening the Listing destination will not help, because SAS Enteprise Guide will generate code that closes all open destinations: (ods _all_ close;).

 

To collect the SAS Log there better alternatives then the Proc PRINTTO, because using Proc PRINTTO means, you will not see the SAS Log in SAS Enterprise Guide.

 

I suggest you have a look at the mentioned SAS Logging Facility, The App.Program logger is the one you want to use to capture the complete SAS Log of a session.

 

Have a look at this discussion as well https://communities.sas.com/t5/SAS-Enterprise-Guide/Setting-log-level-for-the-workspace-server/td-p/...

 

Bruno

View solution in original post

6 REPLIES 6
BrunoMueller
SAS Super FREQ

Is your request just for SAS Enterprise Guide sessions, or any application using a SAS Workspace server?

 

If it is the latter, then have a look at the Logical Workspace Server options > Set Server Properties, there you can set a program to run at the beginning and at the end.

 

Capture.PNG

 

I would also have a look at the SAS Logging Facility, maybe you can get the information you need also out of a log.

 

Bruno

Deonjpret
Fluorite | Level 6
Hi Bruno_sas, Thank you for that. As I said, we are using a Linux environment. I copy the full path and macro name including .sas into the space. I asume I have to stop and start the Object spawner? Thank you again ...
LinusH
Tourmaline | Level 20

At least "Refresh spawner". Just try and see...

Data never sleeps
Deonjpret
Fluorite | Level 6

Hi All,

 

Thank you for all the help.

 

I have done it and found that it does not do what I intended. Allow me to explain in

the attachment what happened and what I expected.

 

Thank you again.

 

 

 

 

BrunoMueller
SAS Super FREQ

Hi

 

From the document you showed, one can not see whether you actually called the macros.

 

the code should look like:

%macro _startjob;

/* your code */
%mend;

%_startJob

Also opening the Listing destination will not help, because SAS Enteprise Guide will generate code that closes all open destinations: (ods _all_ close;).

 

To collect the SAS Log there better alternatives then the Proc PRINTTO, because using Proc PRINTTO means, you will not see the SAS Log in SAS Enterprise Guide.

 

I suggest you have a look at the mentioned SAS Logging Facility, The App.Program logger is the one you want to use to capture the complete SAS Log of a session.

 

Have a look at this discussion as well https://communities.sas.com/t5/SAS-Enterprise-Guide/Setting-log-level-for-the-workspace-server/td-p/...

 

Bruno

Deonjpret
Fluorite | Level 6

Thank you for all that help and made suggestions. Awesome stuff. Love this forum.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1795 views
  • 3 likes
  • 3 in conversation