Open SAS Log File from inside SAS Program of Same Name

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
tanddent
Posts: 1
Joined: Mon Mar 23, 2009 7:18 pm

Open SAS Log File from inside SAS Program of Same Name

Post by tanddent »

Is there a way in Textpad to set up a hotkey or macro to open the Log File to an existing open SAS program.

For example, if I have a program called MyProgram.sas open in Textpad, is there a way to program Textpad to automatically have it open the corresponding MyProgram.Log file in the same directory at the touch of a button?
shaqmeister
Posts: 18
Joined: Sun Feb 15, 2009 12:50 pm

Re: Open SAS Log File from inside SAS Program of Same Name

Post by shaqmeister »

tanddent wrote:Is there a way in Textpad to set up a hotkey or macro to open the Log File to an existing open SAS program.

For example, if I have a program called MyProgram.sas open in Textpad, is there a way to program Textpad to automatically have it open the corresponding MyProgram.Log file in the same directory at the touch of a button?
Hi there

You might have to say just a little more about what you mean by having an "SAS program" open in TextPad. Does that mean that you have a file open for editing called MyProgram.sas?

If this is the case, a tool set up with:

Code: Select all

Command: C:\Program Files\TextPad 5\TextPad.exe
Parameters: $BaseName.Log
Initial Folder: $FileDir
should do the trick. This will open the log file - assuming, as you say, that it has the same base name as the SAS 'file' and is in the same directory - in the current or a new instance of TextPad, depending on what you have set under Configure | Preferences... | General | Allow multiple instances to run.

(Apologies in advance if I've misunderstood what you mean by "SAS program." If this is, say, an executable launched from a TextPad tool, then the above is not what you need.)

Hope this helps.
Post Reply