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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

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

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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