Hi guys,
1. how to add submit with sas 9.4 chinese on windows system when right-clicking on sas code (*.sas)?
there are two default options(sas9.4 and sas9.4 utf8) when you do right mouse click as below.
since the sasv9.cfg uses u8 configration under the path C:\Program Files\SASHome\SASFoundation\9.4, like this -config "C:\Program Files\SASHome\SASFoundation\9.4\nls\u8\sasv9.cfg
2. how modify the dos script to run sas xx.sas with the chinese sasv9.cfg
refence link :https://sites.psu.edu/pridmc/running-sas-from-command-prompt-running-multiple-sas-jobs/
From a DOS prompt, you can do this to run ‘programname.sas’:
sasjob programname.sas with sasv9.cfg
since there are two different encodings(utf8 & chinese) for datasets in different projects
Thanks
There is a way to summarize the options with set, which is essentially the same, but may be more efficient if you have a number of programs to run (i.e., if you write many lines).
For example.
set sasoptions=-rsasuser -noicon -nosplash -nostatuswin -nologo "%SASLOC%\sas.exe" "%PRJLOC%\T_1_01.SAS" -config "%sascfg%" %sasoptions% "%SASLOC%\sas.exe" "%PRJLOC%\T_1_02.SAS" -config "%sascfg%" %sasoptions% "%SASLOC%\sas.exe" "%PRJLOC%\T_1_03.SAS" -config "%sascfg%" %sasoptions%
Why not just go ahead and put everything together from the exe path to the options using set?
set sasexec="%SASLOC%\sas.exe" -rsasuser -noicon -nosplash -nostatuswin -nologo -config "%sascfg%" %sasexec% -sysin "%PRJLOC%\T_1_01.SAS" %sasexec% -sysin "%PRJLOC%\T_1_02.SAS" %sasexec% -sysin "%PRJLOC%\T_1_03.SAS"
1.
Create regfile as below.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\SAS.Program.701\shell\BatchZh] @="Batch Submit with SAS 9.4(Simplified Chinese)" [HKEY_CLASSES_ROOT\SAS.Program.701\shell\BatchZh\command] @="\"C:\\Program Files\\SASHome\\SASFoundation\\9.4\\sas.exe\" \"%1\" -nologo -config \"C:\\Program Files\\SASHome\\SASFoundation\\9.4\\nls\\zh\\SASV9.CFG\""
Then run and add to registry.
Please check sas.exe path and config path before run.
you can get batch submit by sas chinese.
2.You can omit -sysin by writing .sas immediately after sas.exe like this.
"%SASLOC%\sas.exe" "%PRJLOC%\T_1_01.SAS" -rsasuser -noicon -nosplash -nostatuswin -nologo -config "%sascfg%"
I think basically there is no more efficient way.
C:\Program Files\SASHome\SASFoundation\9.4\nls\zh\sasv9.cfg
@japelin Morning, japelin, thanks your help , you sovle the first question
I want to see if someone could sort another question out
There is a way to summarize the options with set, which is essentially the same, but may be more efficient if you have a number of programs to run (i.e., if you write many lines).
For example.
set sasoptions=-rsasuser -noicon -nosplash -nostatuswin -nologo "%SASLOC%\sas.exe" "%PRJLOC%\T_1_01.SAS" -config "%sascfg%" %sasoptions% "%SASLOC%\sas.exe" "%PRJLOC%\T_1_02.SAS" -config "%sascfg%" %sasoptions% "%SASLOC%\sas.exe" "%PRJLOC%\T_1_03.SAS" -config "%sascfg%" %sasoptions%
Why not just go ahead and put everything together from the exe path to the options using set?
set sasexec="%SASLOC%\sas.exe" -rsasuser -noicon -nosplash -nostatuswin -nologo -config "%sascfg%" %sasexec% -sysin "%PRJLOC%\T_1_01.SAS" %sasexec% -sysin "%PRJLOC%\T_1_02.SAS" %sasexec% -sysin "%PRJLOC%\T_1_03.SAS"
1.use the value of batch command, copy them and create *.bat file, put this file under c:\windows
2. run the code , like sasu8 xx.sas under the path of sas program
C:\Windows is the system folder, so you should not put user-created .bat.
If such an operational rule is set, it is unavoidable, but if it is a personal arrangement, I recommend using under %userprofile% ,for example, documents, My SAS Files, %appdata% or created folder, etc.
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.