How can I determine the name and path of the program I am currently running? (In Windows, sas 9.1.3 - but techniques for other versions / environments would also be good to know..)
Remember to vote up questions/answers you find interesting or helpful (requires 15 reputation points)
|
3
|
|
|
|
|
3
|
You can use the Environment variables like so...
On Unix/Linux systems (but only in batch mode - not dms) you could probably use the dictionary.extfiles table (or sashelp.vextfl) since
|
|||
|
|
3
|
The following paper expands on the above answer by resolving windows filepaths into UNC paths, which should make code reliant on access to the location, rather than potentially transient drive mappings: The Path, The Whole Path, And Nothing But the Path, So Help Me Windows |
|||
|
|
2
|
To get the last opened filename:
To get filepath, use the following code;
Sarath Annapareddy StudySAS Blog |
|||
|
|
2
|
In batch mode you can use:
|
|||
|
|
1
|
beware the Environment variables |
|||
|