Created
April 10, 2015 03:15
-
-
Save rkoopmann/21c0d7dce9c231d550da to your computer and use it in GitHub Desktop.
A little snippet for creating a bat file to provide a titlebar name for SAS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%let location=%sysget(sasroot)\sas.exe ; | |
%let config=%sysfunc(getoption(CONFIG)); | |
%let client=; | |
*&TRN is a full path for a given client directory. it is standard structure for ALL clients.; | |
data _null_; | |
re=prxparse('/.*Clients\\(.+?)\\.*/'); | |
if prxmatch(re, "&TRN") then do; | |
client=prxposn(re, 1, "&TRN"); | |
put client; | |
call symput('client', trim(client)); | |
end; | |
else put "The string 'Clients' not found in &TRN"; | |
run; | |
data _null_; | |
file "%userprofile%\desktop\SAS - &CLIENT..bat"; | |
put "start """" ""&LOCATION"" -CONFIG ""&CONFIG"" -AWSTITLE=""&CLIENT"""; | |
put "exit"; | |
run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment