- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
While practicing on SAS academics I daily ran the below code:
%let path=~/EMC1V2_Macro;
libname mc1 "&path/data";
Then created following macro and saved in the AUTOCALL library to use this macro again.
%macro propcase(text);
%sysfunc(propcase(&text))
%mend propcase;
Next time when I login into SAS, and run the LIBNAME statement with below code it runs smoothly. Calling the macro PROPCASE works here.
options sasautos=("/home/u62036390/EMC1V2_Macro/autocall",sasautos);
Other situation when I login into SAS, I just need my libraries so I run the LIBNAME statement without OPTIONS SASAUTOS. But after a while I run this OPTIONS SASAUTOS and then if I call the macro it doesn't resolve.
To me this appears as if the OPTIONS SASAUTOS is working only when I run with the LIBNAME statement. But in Advanced programming performance based exam, we don't need to define libraires. This is automatically done when we start the exam.
Suppose in the exam, I want to built my AUTOCALL library so I can use the macros saved in the exam. But here as the libraries are not needed to be defined and as per my understanding if the OPTIONS SASAUTOS is working only with the LIBNAME statement it will give me a error that the macro was not found. Please correct if I misunderstood the concept and also guide how this will work in the exam specially.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'm not familiar with the SAS Exam environment.
But there is no relationship between using the OPTIONS statement to update the SAS autocall library search path, and using a LIBNAME statement. I would work on debugging this problem further.
One possibility is if you accidentally call %PROPCASE once before you have updated the autocall search path, and then you update the search path, and then try again to call %PROPCASE, it will fail. Because by default SAS will only search the autocall library for the definition of %PROPCASE once per session. To change that behavior, you can set system option MRECALL.
Next up: Troy Martin Hughes presents Calling Open-Source Python Functions within SAS PROC FCMP: A Google Maps API Geocoding Adventure on Wednesday April 23.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'm not familiar with the SAS Exam environment.
But there is no relationship between using the OPTIONS statement to update the SAS autocall library search path, and using a LIBNAME statement. I would work on debugging this problem further.
One possibility is if you accidentally call %PROPCASE once before you have updated the autocall search path, and then you update the search path, and then try again to call %PROPCASE, it will fail. Because by default SAS will only search the autocall library for the definition of %PROPCASE once per session. To change that behavior, you can set system option MRECALL.
Next up: Troy Martin Hughes presents Calling Open-Source Python Functions within SAS PROC FCMP: A Google Maps API Geocoding Adventure on Wednesday April 23.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Actually this:
@POOJA_J wrote:
Got it. I created the %propcase macro and to check it doesn't have any errors I called it. Then saved in the AUTOCALL library and then used the OPTIONS SASAUTOS. So when I'm trying to call it again it gives error.
Should not give an error. If you manually compile the %propcase macro and successfully call it, then add it to the autocall library, the next time you call the %propocase macro in the same session it should still work. Because the macro has already been compiled, it will not actually read from the autocall library.
The situation I was describing was slightly different. Suppose you start a SAS session and call %propcase and the macro call fails, because it has not been compiled and does not exist in an autocall library. Then you update the SASAUTOS option. Then you try to call %propcase again. In that case the call to %propcase will still fail, even if propcase.sas is an autocall library. Basically SAS remembers that it has already looked in the autocall library once for the definition of propcase, so by default it will not look a second time.
Next up: Troy Martin Hughes presents Calling Open-Source Python Functions within SAS PROC FCMP: A Google Maps API Geocoding Adventure on Wednesday April 23.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Whenever (that's 100% of the time, NO EXCEPTIONS), when you get an error in the log, show us the ENTIRE log. We need to see the ENTIRE log (down to the errors), not just a portion of the log.
Please copy the log as text and paste it into the window the appears when you click on the </> icon, PLEASE DO NOT SKIP THIS STEP.
Paige Miller