PING  0.9
Statistical data handling and processing in production environment
Misc

This macro retrieves either the name of the client SAS EG project (without its extension) it is launched in or the path of where it is located.

%let p=%_egp_path(path=base, dashreplace=no, parent=no);

Arguments

Returns

p : depending on path value:

Examples

Imagine the name of the program running this function is test-01.egp and is located in the directory Z:\main\test, then:

%let p=%_egp_path(path=base);

returns: p=test-01.

%let p=%_egp_path(path=base, dashreplace=yes);

returns: p=test01.

%let p=%_egp_path(path=path);

returns: p=Z:/main/test

%let p=%_egp_path(path=drive);

returns: p=/main/test.

%let p=%_egp_path(path=path, parent=yes);

returns: p=Z:/main.

Run macro %_example__egp_path for examples.

Notes

  1. This macro works only with SAS ENTERPRISE GUIDE since it uses the predefined macro variables _CLIENTPROJECTNAME and _CLIENTPROJECTPATH.
  2. Note that whether you are running in local or not (e.g., SASMain), the path returned with option path=base or (drive)path is always formatted as a local path, hence there is no difference.

References

Hemedinger, C.: Special automatic macro variables available in SAS Enterprise Guide.

See also

%_egp_prompt.