Wednesday, November 23, 2011

Check the SAS Log from a Windows Context Menu

Have you ever wanted to check a SAS log from the Windows context menu? Well, now you can with a new script I developed using my CheckLog macro. Here's how:
  1. Download the CheckLog SAS macro and save it to a permanent location.
  2. Download the CheckLogSendTo.txt file.
  3. Open the file and replace the value of the variable CheckLog with the location of the CheckLog SAS macro.
  4. Save the file.
  5. Change the extension of the file to "vbs".
  6. Create a shortcut for the CheckLogSendTo.vbs file. Rename it as "CheckLog".
  7. Copy the shortcut to the user's SendTo files here: C:\Documents and Settings\%USERNAME%\SendTo, replacing the %USERNAME% variable with the username in question.
  8. Right click on a file or directory to check. Go to Send To > CheckLog.
  9. Select Yes, No, or Cancel when asked whether you would like to add additional arguments.
    1. Yes = Add arguments
    2. No = Use the default arguments
    3. Cancel = Cancel the check
  10. If you said Yes above, enter the additional arguments you would like to use. See the Arguments page for more detail.
Here are some screenshots of the script in action:


Note: VBScript is required, which is unfortunately only available on Microsoft Windows. I hope to develop a platform-independent script sometime. I chose VBScript because it required no additional installation or administrator requirements on the platform I current work on.

This script should save me a lot of time! Normally I would copy the directory and filename of the log into a SAS session and paste it into a CheckLog call. But now it's more automatic, and I get the results faster.

Please feel free to send me feedback about the script!

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.