[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: Open file in Textpad with SAS
From:       John Hendrickx <John_Hendrickx () YAHOO ! COM>
Date:       2005-10-31 8:14:39
[Download RAW message or body]

Thanks Peter. What works for me is:

-initstmt 'dm wedit "whostedit  ""$FILE""" wedit continue;'

It does look very arcane for doing something so very basic as opening a file
in the standard editor.

Strangely (and stupidly), I got error messages at startup if I used "editor"
instead of "wedit" (in SAS 8.2, WIN2000). S&S once again, 'dm editor
"whostedit ""<file>""" editor contine;' works fine in an enhanced editor
window once SAS has started up. Oh well, at least it works now as intended.

Others have mentioned how to run SAS in batch from Textpad. There's also a
small program at http://www.data-for-all.com/blog/index.php?p=14 that will
let you send selected text in Texpad to SAS. Don't know if it would work
with other editors though.

Thanks for the help,
John Hendrickx

On Fri, 28 Oct 2005 11:33:59 -0400, Peter Crawford
<peter.crawford@BLUEYONDER.CO.UK> wrote:

>see in-line comments
>
>On Fri, 28 Oct 2005 10:41:48 -0400, John Hendrickx
><John_Hendrickx@YAHOO.COM> wrote:
>
>>On Fri, 28 Oct 2005 07:37:25 -0400, Peter Crawford
>><peter.crawford@BLUEYONDER.CO.UK> wrote:
>>
>>>On Fri, 28 Oct 2005 06:19:06 -0400, John Hendrickx
>>><John_Hendrickx@YAHOO.COM> wrote:
>>>
>>>>I've been looking for a way to launch SAS from Textpad (or any other
>>>editor)
>>>>            Is there a dm command
>>>or
>>>>any other method to automatically close the program editor window? Or
>are
>>>>there any other ways to open the current file in an editor with SAS?
>>>>
>>>>John Hendrickx
>
>
>>>close any (most) dm windows with command
>>>   <window name> off
>>>You'll want to do that when the focus is not in that window.
>>>As a statement, issue
>>>                     dm log 'pgm off' editor ;
>>>and hopefully, the command will be issued in the log window, and once it
>>>has completed, focus transferred to the editor window
>>
>
>
>>Apparently, the DM command creates an empty program editor window. If you
>
>.........perhaps "apparently", but not neccessarily...
>DM is a statement
>and ......
>
>>issue "dm log 'clear';" from the enhanced editor the log is cleared by a
>>program editor window is also opened. You can close the program editor
>>window by issuing "pgm off" from the "command" box on the toolbar. But if
>>you do this using the DM command, a new program editor window will be
>>created. Strange and pretty stupid, IMHO.
>
>I sort of disagree about the "pretty" etc. part
>
>dm on-window 'issue command' go-to-window ;
>
>DM statements, need-not create a pgm window, if "on-window" and "go-to-
>window" are provided (and neither is pgm)
>Probably better described by usage note
>http://support.sas.com/techsup/unotes/SN/005/005644.html
>
>however, see also usage note for winclose
>http://support.sas.com/techsup/unotes/SN/014/014744.html
>it offers  DM  'winclose' pgm;
>but when I don't have a pgm-ed open, it leaves one. More effective, is
>        DM pgm 'winclose' pgm;
>
>
>I have much to learn  too  imho.
>
>
>>
>>>
>>>
>>>the include command works in enhanced editor
>>
>>The "include" command opens a file in the program editor. "whostedit"
>opens
>>files in the enhanced editor.
>
>
>Include also works when "in" an enh-ed window, just like in pgm-ed.
>Issued from any window, whostedit opens a new enh-ed window.
>
>>
>>>
>>>good luck
>>>Peter
>>
>>Thanks,
>>John Hendrickx

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic