SAS Enterprise Guide

Desktop productivity for business analysts and programmers
BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JamesScandol
Calcite | Level 5

I'm trying to get the location of my EGP project using the macro variables &_clientprojectpath and &_clientprojectname, but these variables are set to missing.

These global macro variables used to exist in EG 5.1, but have gone in EG 6.1??

When I run:

%put _all_;

I get returned:

22         GOPTIONS ACCESSIBLE;

23         %put _all_;

GLOBAL _EGSOURCE SOURCE

GLOBAL _CLIENTAPP 'SAS Enterprise Guide'

GLOBAL _CLIENTAPPABREV EG

GLOBAL _CLIENTPROJECTPATH ''

GLOBAL _CLIENTPROJECTNAME ''

GLOBAL EGP_FILE ''

GLOBAL EGP_PATH  

GLOBAL SYS_SQL_IP_ALL -1

Does anyone know how to get these variables set correctly in EG6.1? Is there an option setting or command line switch that needs to be used?

Thanks James

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

They should be there -- but they can be set only if your active project is actually saved to a location (has a file name).  I see them set at the top of each program that I submit within a saved project:

;*';*";*/;quit;run;

OPTIONS PAGENO=MIN;

%LET _CLIENTTASKLABEL='Program1';

%LET _CLIENTPROJECTPATH='C:\Users\sascrh\Desktop\att.egp';

%LET _CLIENTPROJECTNAME='att.egp';

%LET _SASPROGRAMFILE=;

Chris

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!

View solution in original post

2 REPLIES 2
ChrisHemedinger
Community Manager

They should be there -- but they can be set only if your active project is actually saved to a location (has a file name).  I see them set at the top of each program that I submit within a saved project:

;*';*";*/;quit;run;

OPTIONS PAGENO=MIN;

%LET _CLIENTTASKLABEL='Program1';

%LET _CLIENTPROJECTPATH='C:\Users\sascrh\Desktop\att.egp';

%LET _CLIENTPROJECTNAME='att.egp';

%LET _SASPROGRAMFILE=;

Chris

Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
JamesScandol
Calcite | Level 5

Thanks Chris, that is pretty obvious in hindsight!!

I think the original issue may have arisen when migrating a project from 5.1 to 6.1. EG appears to put the "new 6.1" project in an unsaved state during migration where these variables are undefined. I had code where this worked in 5.1, then it stopped working during migration (but that was probably before I re-saved the project as a 6.1 version).

Of course my tests to followup on the issue were not specified correctly!

James

BTW Thanks for your great book on Custom Tasks

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 3592 views
  • 1 like
  • 2 in conversation