Desktop productivity for business analysts and programmers

SAS Command Line in E.G.

Posts: 0

SAS Command Line in E.G.

Is there a way to invoke SAS from a command line environment using EG ?

In addition, I need to be able to set system level options when performing certain processes in a SAS program.

More specifically, I need the ability to use X commands in some of what I do. Curently NOXCMD is the setting.

Unfortunately, we have inexperienced SAS Sys. administrators whom I need to persuade to make a change at the system level each time I need something done and this is getting very annoying.

Bottom line is I need more control in EG.

Posts: 0

Re: SAS Command Line in E.G.

I don't know if this will answer your problem of using the execute (X) command:
X Statement
[pre] Issues an operating-environment command from within a SAS session[/pre]
where you say: "More specifically, I need the ability to use X commands in some of what I do. Curently NOXCMD is the setting."

I avoid the whole issue by using "cut-n-paste".

Basically: 1) I write out the commands I wish to execute (like "copy" files in MS DOS, or "MKDIR" to make directories, etc.)
2) write those instructions out in an HTML window
3) instruct the user of the system to copy all the commands (via A and then C) and
4) open an MS-DOS window (via )
5) paste in the MS-Dos commands (via V)

Programming note: I print the instructions in the HTML window by creating a dataset with all the instructions in it,
and the name of the variable is 'REM bat_line'n, and the dataset is printed without line numbers. That way the titles (all starting with REM) and the var names are all treated as REMarks by MS-DOS. The titles I use are descriptive, like
"REM Copy this to a DOS window -- aka Command Prompt --
REM in order to copy the files to various locations"
Posts: 8,819

Re: SAS Command Line in E.G.

This tech support note explains that the X command and SYSTASK are both turned off:
" Most SAS code should work without changes in SAS Enterprise Guide, although you should be aware of the following:
* Code that calls X command or SYSTASK might not work because the default Integration Technologies configuration disables this."

Your systems folks might not want you to alter the configuration. So your best bet might be to contact Tech Support to find out the ramifications of turning X or SYSTASK back on.

Posts: 0

Re: SAS Command Line in E.G.

So SAS sys. administrator has made the change to allow for XCMD.

When tested from the user interface on the server side the X command, X 'del c:\myfile.txt', works with no problem.

When I try it through EG it does not work. We rebooted the server, the PC and EG . . . still it does not work.

When PROC OPTIONS is run from the gui on the server side the log file shows XCMD (enabled), PROC OPTIONS output from EG shows NOXCMD.

Any immediate assistance provided would be very helpful.

This is very odd, but I guess that's EG for you.

I will be contacting Tech. Support.
Posts: 0

Re: SAS Command Line in E.G.

I'm a little surprised at the statement that "Ctrl(V) pastes into a command line window". I have always found the Windows command line interface had it's own obscure set of shortcuts.

As a general idea; if generating command files within SAS, I create a batch file and would then provide a shortcut in an email or on a web page for someone who had system level access.

It is possible to hack past the NoXCmd setting, which is part of the Enterprise Guide server implementation, not the SAS Application server. I have done so for EG2 and tested on EG3, but not on EG4.2. I must add though that I won't do that any more because it provides OS level access to a server which in SAS9 could mean you are controlling a large remote server. The idea that someone might be able to stop the server, modify the task priorities, create or remove user ids, change security groups and so on is an alarming prospect.

In an environment where a small group of users shared a common resource, that is fine. On the larger shared environments, the potential for mischief is much more likely. I suggest you find other ways around your problem so that you don't create a more serious issue for yourselves in the future.

Kind regards

Ask a Question
Discussion stats
  • 4 replies
  • 2 in conversation