The PATHNAME()
and GETOPTION()
functions return different results for SASAUTOS
, casting doubt on what directories are used for AUTOCALL. Does SASAUTOS
exist as two distinct "things" happening to posses the same name?
To provide some background, I maintain a directory for personal utility macros, the path of which has been added to my config file.
-SET SASAUTOS (
"!SASROOT\core\sasmacro"
"!SASROOT\aacomp\sasmacro"
"!SASROOT\accelmva\sasmacro"
"!SASROOT\assist\sasmacro"
"!SASROOT\dmscore\sasmacro"
"!SASROOT\ets\sasmacro"
"!SASROOT\gis\sasmacro"
"!SASROOT\graph\sasmacro"
"!SASROOT\hps\sasmacro"
"!SASROOT\iml\sasmacro"
"!SASROOT\or\sasmacro"
"!SASROOT\qc\sasmacro"
"!SASROOT\stat\sasmacro"
"C:\USERS\ME\PERSONAL AUTOCALL"
)
This behaves as expected. When I load SAS, I can call whatever macros reside in the PERSONAL AUTOCALL
directory.
I also run a complex process which requires a multitude of problem specific macros. These reside in a separate directory from my PERSONAL AUTOCALL
. Since these macros should be available independent of whomever runs the process, they are not included in the config file. Instead, I have SAS load the directory into the autocall search hierarchy from within the session. I do this by issuing the following statement.
options mautosource mrecall sasautos = (SASAUTOS, 'Z:\Path\To\COMPLEX PROCESS AUTOCALL');
Again, this behaves as expected. When the first argument SASAUTOS
is excluded from the options statement, only the COMPLEX PROCESS AUTOCALL
macros may be called and vice versa.
The trouble arises when I monitor what directories are in the autocall search hierarchy. To do this, I issue:
%put %sysfunc(pathname(sasautos));
This returns the precise list given in my config file, given above. It lacks the COMPLEX PROCESS AUTOCALL
path, despite the SASAUTOS=
option having included it and those macros being call-able.
If I instead issue
%put %sysfunc(getoption(sasautos));
then the following is returned.
(SASAUTOS, "'C:\Path\To\COMPLEX PROCESS AUTOCALL'")
While the combination of the two %put
statements provide what I believe is a full listing of the autocall libraries, I'm at a loss for why both are needed.
PATHNAME() returns the name of a data library, in this case SASAUTOS
which should have been appended with COMPLEX PROCESS AUTOCALL
, at least within the context of the current session.
GETOPTION() returns the value of a SAS system option. Apparently the system option is distinct from the data library.
Do the different return values indeed imply that two different SASAUTOS
"things" exist, one a library and the other an option? If so, how do they interact? Given this unexpected discrepancy, how can I be sure there aren't other directories being searched than those listed?