Hello,
I am trying to register an R model into SAS metadata using the aa_model_register macro.
However, I am getting a warning about the _MODEL_VARSMETA table.
WARNING: File WORK._MODEL_VARSMETA.DATA does not exist.
I created the R model, converted it into PMML and then used proc pscore to convert it into a sas file.
However, the aa_model_register macro goes to the exit statement with the above warning in the log.
How do I make sure that the table is created\available and the model gets registered?
Also, this happens intermittently. Sometimes the macro runs, sometimes not.
Kindly let me know if any more details are needed.
What library did you put your _MODEL_VARSMETA into?
My guess without seeing any code is that you passed the name of the data set to the macro without a library and so SAS will assume the data is in the WORK library.
If by some chance you are one of the few that have a USER library for single level names then you may need to tell this macro specifically which library the set is in with either USER. _MODEL_VARSMETA or any seprate parameter that may reference a library.
I did not put the dataset anywhere. Neither it is an input to the macro.
It seems to be a dataset created internally in the macro. Even in the log, I did not see any statement which creates this dataset. The first mention of it in the log was in the warning.
Sometimes the macro goes to exit with a '%GOTO EXIT' even without any warning.
Here is my macro call:
%aa_model_register(modelname=<name of the model>,
modeldesc=%nrbquote(<model description>),
register=Y,
mrPath=%NRBQUOTE(/User Folders/<user>/My Folder/),
spk=N,
spkfolder=c:\temp\,
data=<library>.<data set name> /*Name of the dataset used for model creation/ ,
target= <target variable>/*Name of the target variable*/,
level=Continuous/*Level of the target variable (Binary or Continuous)*/,
miningalgorithm=regression,
scorecodefile=/local/install/<path>/<sas_file_name>.sas
) ;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.