BookmarkSubscribeRSS Feed
adleach2
Fluorite | Level 6

Hi, 

 

    I am new to SAS AML.   I am trying to understand what the %fcf_get_runasofdate macro is doing so I would like to see the source cod or definition. 

   However, I can't find any fcf_get_runasofdate.sas in any of the sas autocall paths.  

 

    Can any one tell me where this macro is defined? 

 

Thanks,

Alan

 

6 REPLIES 6
adleach2
Fluorite | Level 6

So I found the macro code.   The macros where compiled and stored in a SAS CATALOG  called sasmacr located in the

 

/opt/sas/sashome/SASFoundation/9.4/cmacros/antimnycmn directory at our install.

 

Unfortunately, when the macros where compiled and put the catalog they were compiled with the SECURE option which means I cannot retrieve the source code.

 

Does anyone know how to get the code?

 

SASKiwi
PROC Star

What happens if you run the macro with the SAS option MPRINT? It should print the source in the SAS log unless the compiled macro does not contain source.

ballardw
Super User

Who wrote the code or originally compiled the code with the option?

I would hope someone in the organization wrote or has a copy of the code. Find that person and ask for the source.

 

You may need to add MLOGIC to the suggestion that @SASKiwi made to find macro branching as one pass may not execute all of the paths in macro.

 

SASKiwi
PROC Star

@ballardw  - I very much suspect that this is a SAS-supplied macro so it most likely compiled and secured for reasons of security, given the nature of the product. The OP will most likely need to progress this with SAS Tech Support.

adleach2
Fluorite | Level 6

@SASKiwi  @ballardw  Thanks for the replies.   When I add those options and run the macro I get nothing back in the log

 

options mprint symbolgen source mlogic ;
%fcf_get_runasofdate ;


NOTE: PROCEDURE SQL used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds

 

The macros definitely are compiled. See below.  Hopefully someone as SAS Saved the code before they compiled it.

 

proc catalog ;
27 contents cat= ECMCMAC.sasmacr out=temp;
28 run;

NOTE: The data set WORK.TEMP has 1 observations and 9 variables.
29
30
31 filename outfl "/home/e931413/ECMCMAC";
NOTE: The macro %FCF_GET_RUNASOFDATE was compiled with the /SECURE option. No output will be produced for this %COPY statement.
ERROR: The /SOURCE option was not specified when the macro FCF_GET_RUNASOFDATE was compiled.
ERROR: An error occurred during the execution of the %COPY statement.
32
33 %copy FCF_GET_RUNASOFDATE / OUTFILE=outfl source;

SASKiwi
PROC Star

@adleach2  - That pretty much confirms my suspicions of this being SAS-supplied. Tracking this to Tech Support seems like the only way to make progress.

Discussion stats
  • 6 replies
  • 1547 views
  • 2 likes
  • 3 in conversation