Hi
I would like to know whether there is the possibility to run SAS EM from a batch file in Windows. In the long term I'd like to have this batch file running my EM diagram at regular intervals of time so that I just go in the Score folder to get the score sas file. I am not intending, for now, to pass any arguments to SAS EM with my batch file, just launch it, close it, and run my diagram.
Many thanks
Nicolas
If this is just to score data you don't need to use SAS EM for that. SAS EM will produce code that you can 'productionize' in your SAS Server or using SAS EG/Base or other systems as the PMML file is available.
@NicolasC wrote:
Hi
I would like to know whether there is the possibility to run SAS EM from a batch file in Windows. In the long term I'd like to have this batch file running my EM diagram at regular intervals of time so that I just go in the Score folder to get the score sas file. I am not intending, for now, to pass any arguments to SAS EM with my batch file, just launch it, close it, and run my diagram.
Many thanks
Nicolas
Thanks for your answer.
What do you mean by cannot 'productionize it'. At the moment, I create my data base from various DWs with EG, create the model with EM, and use the core back in EG. The reason I use EM is because 1. I run several methods in parallel 2. my data is somehow dirt and a lot of manual intervention is required prior to run the different methods.
Knowing that, is it possible to launch EM with batch, run the diagram I will have previously set-up, close EM once last node is ran.
Many thanks
Nicolas
I didn't say "cannot productionize" it, I said you don't need SAS EM to score your data.
Assuming your inputs are the same, which is the case in either situation, the SCORE code doesn't need to be run in SAS EM, you can run in it SAS EG where you can then schedule it more easily. Or you can usually extract Java or C++ code to use in a server without SAS entirely.
The SCORE node has the option somewhere to export this code. The SAS score code takes care of all that data cleaning and any prep steps you did in EM as well.
Are you looking to:
1. Re-calibrate/develop your model each time with new data, because that's what running your full diagram will do each time.
2. Take a completed model and SCORE new data each month with the model originally developed.
I'm assuming you're attempting Step 2, which is different than running your diagram fully each time.
Reeza is correct.
If you run the SAS Enterprise Miner batch code in Windows (Base SAS, SAS Enterprise Guide, etc.), the code will create a new project/diagram by default and re-train the model that was designed in the GUI.
If you take the model generated within the GUI, open up the results of the Score node and save out the (by default) Optimized SAS Score code (or PMML, C Score, Java Score, per your business reasons) and apply that generated score code on a new set of observations, then you do not need to use the SAS Enterprise Miner batch code. The outputted optimized SAS Score code is simply a concatenated standard data step program of each node's score code (with a couple of nodes that are exceptions) that can be implemented as part of a batch scoring process that can be scheduled to run whenever needed based on your business needs.
Hi Reeza
Thanks for your answer. I am actually looking to complete 1. as per your definition. The idea is to recreate the score every now and then without my intervention in doing so. Is that possible?
Thanks
Nicolas
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 16. Read more here about why you should contribute and what is in it for you!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.