Tag Archives: WPS

State and Zip Code Macros

We have now posted the final set of macros in the MineQuest Macro Toolkit. This last set pertains to State and Zip Code functions that are part of the SAS V8.2 release. These 10 macros are functionally equivalent to those SAS functions. They are probably most relevant to those users in the U.S. and those companies that do business in the U.S. We’ve also updated the online documentation that describes their usage.

We’ve also packaged all the macros and the PDF documents in to separate zip files to make it easier to download. These macros are fairly general and should operate on any platform that WPS executes on. So, if you have been holding back in switching to WPS from SAS because you need Rank or XML support, or you need State and Zip Code functionality, there’s no reason at this point not to go forward!

I don’t intend to do any more development for the macro toolkit. I may add another macro or two as issues or needs arise but I think that WPS is pretty robust at this point. The WPC developers are moving fast adding additional functionality to the core and I assume that WPC will be adding many of these functions natively in the future. When that happens, these macros will be deprecated. 

I had planned to have an update to MQBatch available on Monday (6/18) but have not had time to fully test the modifications made to the packages and update the documentation. Hopefully, we can have that available by the weekend. The new enhancement to MQBatch is the ability to write LST and LOG files from the server back to the client’s PC. Currently, it writes the LOG and LST files to a directory on the server where the user has read/write access and permissions. The new enhancement is a nice option because UltraEdit, when polling a remote directory sometimes causes editing in the program window to stutter. It’s very irritating when this happens and this enhancement fixes that issue.

Finally, if you are looking to move away from SAS and migrate to WPS, MineQuest is able to help. We can provide assessments of what code can be migrated and provide time and cost estimates to help your organization do that. We also provide SAS consulting and contract programming throughout the Midwest and Eastern United States.


Two New Macro’s, Rank and WPS2XML

I finally got around to putting two more macros online this evening. I refer to them as procedural macros because they cannot be used or called from within a data step. Both of these macros can be found in the downloads section of the www.minequest.com website.

The first macro is RANK. It’s a nice little substitute for PROC RANK in the WPS environment. It can handle ties and group observations based on percentiles, quartiles, deciles, etc… but unfortunately, it doesn’t handle a BY statement. However, a crafty SAS programmer can get around this quite easily. The primary reason I wrote this macro is because I find it’s something that I’m often asked to do when working for a client. Being able to RANK observations on such things as profitability or attendance or whatever the requirement is something that many analysts want to see.

The second procedural macro is WPS2XML. I originally wrote this to be able to get data from WPS back to SAS. My inclination is that there will be a number of sites that keep SAS just for its statistical capabilities. WPS can easily read SAS data sets. But I couldn’t find an easy way of going from WPS to SAS. So, with one line of code, you can take a WPS data set and output it to an XML file that SAS can handle. You can maintain your date, time and datetime fields and also retain the format of your data when you create the XML file. WPS2XML is also useful for outputting data to an external data source that you may not have an ODBC driver for or a system that requires an XML format.

Both of these procedural macros have accompanying documentation in PDF format as well as online help at http://minequest.com/macrotoolkit/help/

Last of the Financial Functions

I posted the last of the “Financial” macros on the MineQuest.com web site. You can find them by going to www.minequest.com/downloads.  These macros act as functions, i.e. you can use them within a data step to calculate the particular financial function. All of the macros that I have posted also has a document associated with it that you can download which explains how to use that particular macro. You also get the source code for the macro so you can examine what it is doing and modify it to meet your own needs.

Most of the work I do is in the financial sector and using functions to calculate different loan and depreciation values is something common for my industry. So, these macros are useful to those people who do some similar work and also serve as a proxy for functions that are not yet implemented or are missing in the latest release of WPS. If you are a SAS user and have not yet converted to WPS, you may find these macros useful because the naming convention is more obvious to the purpose of the macro instead of just calling “mort.”

I will begin posting about a half dozen macros that implement some math and statistical functions starting next week. Just like the Financial Macros, there will also be documentation for each one of these macros as well.

Finally, if you have any questions on using these macros, feel free to post your questions or issues on the support forum at: www.minequest.com/phpBB

Announcing a Support Forum

I wanted to let readers know that MineQuest has setup a Support Forum for the MQBatch product and the Macro Toolkit. I thought it would be valuable to have a place where issues and suggestions can be discussed and everyone can share the information. The support forums will be moderated and spam and foul language will get the posting deleted. I don’t mind constructive criticism but I do have a problem with personal attacks and name calling.

In addition to the forums on the MineQuest tools, I have also created a forum called “Converting from SAS to WPS.” This forum will hopefully be a place for users to ask questions about WPS, find solutions to any problems in converting from SAS to WPS and to share some of their success stories. 

The forums have just been created so feel free to register and post any questions at MineQuest Support. The link is also available from the MineQuest home page at www.MineQuest.com

Macro Toolkit – an Update

We’ve decided to start posting the macro’s that have been written for WPS out on to our website. Originally, we were going to charge a nominal fee for these macro’s, but have since decided against that.

We will be uploading one or two a day to the downloads section on www.minequest.com. This gives us the opportunity to review the documentation for each macro. The documentation for each one of these will be published as well. When we get all 25 or so published, we will consolidate all the documents and all the macros in to two files so that they are easier to download and use.

The first half dozen macros that we will be posting address some financial functions that should help replace the MORT function in SAS. We could have written this to be one huge macro, but I find that breaking them into their respective component pieces makes it easier to use.

As you start converting from SAS to WPS, these macros should be helpful in addressing some functions that may be challenging for some users to write themselves. Also, some of the macros will be specific to running on a Windows Platform but most will be portable to the mainframe.

I would appreciate any feed back from those of you who use these. We are always looking at improving the code and to correct any errors in the macros.

Introducing MQBatch

As many of you may already know, you can run WPS on a Windows Server using a Terminal Server (TS).  What is really exciting is that the cost of WPS on a server is the same price as on a desktop. So, if you have a two-core CPU on your desktop, you can run WPS on a two-core CPU under Windows 2000 or 2003 Server for the same cost. This is a great deal being offered by the World Programming Corporation, the developers of WPS.

So, let’s take this a step further and think about how you can leverage this opportunity. If you don’t have a TS installed, MineQuest has another option that you can explore. We just finished writing MQBatch. MQBatch is a program that allows you to use UltraEdit as your editor on the desktop and submit SAS source code to WPS on the server. MQBatch watches a directory and its subdirectories watching for a program with the extension of .WPS or .SAS and then invokes WPS to run the program. MQBatch makes sure that the LOG and LST files are written back to the user’s assigned subdirectory on the server. What’s really nice is that UltraEdit will detect when the .LST and .LOG files have changed and automatically reload them in the editor.

As it is currently written, you can only run MQBatch as a windows program (not as a service) on the server. It is quite configurable and you can use it to run SAS as well as WPS in this manner. This is a nice feature for being able to convert from SAS to WPS.

Speaking of conversions, it’s really stunning when you think about the cost of SAS in comparison to WPS. Because we are making MQBatch free, the only thing you have to license (other than WPS for the server) is UltraEdit. Currently, an UltraEdit license is $50. So, your total out of pocket license cost for WPS is less than $850 for five users on a Windows Server. Compare that cost with SAS\Base, SAS\Connect, and SAS\Access on a Windows Server!

You can download MQBatch from our website at www.MineQuest.com. Go to the downloads section and download the three files that make up MQBatch. Briefly, the three files are:

DirectoryInstall.zip  – sets up the directory structure that is necessary. The directories that are created are for users to submit code into as well as the necessary scripts needed to install and run the UltraEdit Client.

MQBatchInstallGuide.zip – the installation guide for installing MQBatch. Read this first before attempting the install. You have to unzip the DirectoryInstall.zip file as the first step.

MQBatch.zip  –  the .NET program that makes all this possible. MQBatch is a file watcher that detects when a WPS or SAS program is submitted to the users folder and invokes the correct programs either WPS or SAS.

If you don’t have UltraEdit, you can get a 45 day trial from www.UltraEdit.com. UltraEdit is a superb editor and you can use SAS Syntax Highlighting in the editor as well.

If you have any questions installing MQBatch (there are multiple steps), Read the Installation Guide. If you’re still stumped, feel free to send e-mail to support@minequest.com and we will do our best to help you get MQBatch running so you can execute WPS or SAS programs on your server.