Sunday, September 3, 2017

sas batch jobs

http://support.sas.com/documentation/cdl/en/hostwin/69955/HTML/default/viewer.htm#p16esisc4nrd5sn1ps5l6u8f79k6.htm#p01fzykn6n0s73n164xasi1t3ii9


START !!(how to put multiple starts in one batch ... lol)
Start "Job1" "c:\Program Files\SASHome\SASFoundation\9.4\Sas.exe"  —sysin c:\test1.sas

START with WAIT to make them run one after another


http://blogs.sas.com/content/iml/2015/03/16/pass-params-sysget.html
/* get values of environment variables from SAS command line */
%let aMin = %sysget(aMin);
%let aMax = %sysget(aMax);
%let bMin = %sysget(bMin);
%let bMax = %sysget(bMax);
%let DSName = %sysget(DSName);
With this change, you can run the DATA step in batch mode and use the -SET option on the SAS command line to change the parameter values for each invocation. For example, if the program is stored in the file PassParams.sas then the first invocation from a Windows command prompt could be
> "C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" PassParams.sas 
    -set DSName "Out1" 
    -set aMin 0.1 -set aMax 2 -set bMin 0.1 -set bMax 2
http://www.sascommunity.org/wiki/Parse_sysparm

http://www.sascommunity.org/wiki/Batch_processing_under_Windows#Advanced_Usage:_Setting_Environment_Variables

https://communities.sas.com/t5/SAS-Procedures/SYSPARM-Pass-Command-Line-Arguments-to-SAS/td-p/194511

No comments:

Post a Comment