Desktop productivity for business analysts and programmers

&_clientprojectpath and &_clientprojectname both missing?

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

&_clientprojectpath and &_clientprojectname both missing?

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


Accepted Solutions
Solution
‎03-31-2014 07:35 AM
Community Manager
Posts: 2,693

Re: &_clientprojectpath and &_clientprojectname both missing?

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

View solution in original post


All Replies
Solution
‎03-31-2014 07:35 AM
Community Manager
Posts: 2,693

Re: &_clientprojectpath and &_clientprojectname both missing?

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

New Contributor
Posts: 3

Re: &_clientprojectpath and &_clientprojectname both missing?

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

☑ This topic is SOLVED.

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

Discussion stats
  • 2 replies
  • 538 views
  • 1 like
  • 2 in conversation