How to give your SAS-session a name

The DOS batch code below let’s you give your SAS-session a name – instead of just showing “SAS” on the procesline. The code gives you the possibility to differentiate multiple SAS-sessions from each other on the process line.
You just make a .bat-file containing the code below. Then you drag and drop the shortcut for your SAS-session onto the .bat-file and the .bat-file will start by asking you to give the SAS-session a name. When you have entered a name and pressed the Enter-key, it will start a SAS-session showing the name you just entered.

@echo off
cls
set /P SASName=Please enter name of SASSession:
%1 -AWSTITLE "%SASName%"

You will have to drag and drop your SAS-shourtcut on to the .bat-file containing the code above.
pic20903

 

 

 

 

 

 

The .bat-file will ask you to give the SAS-session a name.
pic23687

Now you will have open SAS-session on the process line in Windows with the name you have just given them.
pic24521