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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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-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
  • 2873 views
  • 1 like
  • 2 in conversation