One of the things that I find fascinating as a consultant is how different consultants and software developers design and implement their work environments. For the most part, when I go onsite, I almost always keep their vanilla setup just as they have implemented it. For my notebook and personal workstations, I customize them quite heavily.
I think customization of workstations/desktops (and workplace environments too) is fairly common for most hard-core programmers and “Rock-Star” developers. These folks tend to develop tools so they can gain efficiencies in their day-to-day tasks. Over the years, I’ve seen some amazing customizations and I try to borrow their ideas just as much as possible.
A hallmark of a great WPS/SAS developer in my mind is to be able to manage multiple tasks. Some of us can multi-task three or four projects at a time where as some others can only multi-task sequentially. I always liked that phrase and have waited years to use it in a blog! But it’s true! The easier it is to perform some task, the easier it is to automate it and gain efficiencies by running multiple tasks or jobs at the same time.
Today, I want to focus on WPS. In a WPS environment using the Eclipse Workbench, you can view logs and listings and edit multiple WPS programs while a program is running, but you are limited to running a single program at a time from within the Workbench. I know many developers, and count me in as one of these folks, who like to run tasks in the background such as a long running WPS program while I’m doing some editing in the Workbench.
In the SAS environment on the Windows Desktop, you can run a SAS program in batch by right clicking on a .SAS program and selecting “Run SAS Batch” or something similar to that. That’s something I’ve liked and unfortunately, it’s missing in the current WPS environment. So, I’ve put together some simple instructions that shows you how you can do the same thing.
In a previous blog post, I provided a windows CMD file that ran WPS in batch. I slightly modified this CMD file and named it “Submit WPS Batch.CMD” and you can find a link to it at the bottom of this post. This CMD file will run a WPS program in batch and you can easily add a Windows Explorer menu item so that when you right click on a program that has the .SAS extension, you can run this program in batch mode.
Below is the Windows Explorer Window with the Submit WPS Batch menu item added.
The first thing you have to do to get this working is to download the submitbatch.zip file and unzip it to a file folder such as c:\temp or some other folder.
Step 2 is to go to a folder that has an existing WPS program and right click on a file that has the .SAS extension and select “properties” from the context menu. Click on “properties” and then select the “Change” button. The “Open With” selection box will open.
Click on “Browse” and navigate to the folder that you saved the Submit WPS Batch.CMD file and select that program and then click OK. You will see that the properties box for the program will have the following attributes. Type of file: SAS File (.sas) and Opens with: Submit WPS Batch.
The only other modification you need to do is edit the Submit WPS Batch.cmd. Make sure line 12
SET wpsloc=c:\Program Files\World Programming WPS 2
points to the proper folder where WPSI.EXE is located.
That’s all there is to adding a menu item to Windows Explorer so that you can submit a WPS program to run in batch in the background and have the log and lst files be placed in the folder where the submitted program resides.
Link: Submit_WPS_Batch.zip (1,488 bytes)
About the author: Phil Rack is President of MineQuest, LLC. and has been a SAS language developer for more than 25 years. MineQuest provides WPS and SAS consulting and contract programming services and a reseller of WPS in North America.