sas >> x command for SAS EG

by brad.olson » Thu, 24 Jul 2008 23:14:57 GMT

Our SAS EG environment does not allow us to use the X command. This is a
mater of policy for our institution (not gmac) so so we cannot turn that on
with the appropriate option string. For that matter we don't have execute
permission on the SAS server that SAS EG uses to process it's sas code.

I would like to have a way of getting access to my PC (the client) from
within SAS code executed by SAS EG so I can issue commands to my pc (with
something like an x command) that would normally be directed by an x
command to the SAS server.

I have made great use of the x command in the past for managing files and
such, but here I am denied that capacity.

Any help would be most appreciated!

Thanks,

Brad

sas >> x command for SAS EG

by donaldjhenderson » Thu, 24 Jul 2008 23:52:25 GMT


if you are running EG locally and have a local copy of SAS you can specify in a node by node basis whether to run the code on your local or remote SAS server.

If you don't have a local install of SAS, I don't believe you can have SAS on the server access your local PC with an X command.

HTH,
donh

----------------------------------------

_________________________________________________________________
Use video conversation to talk face-to-face with Windows Live Messenger.
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_video_072008

sas >> x command for SAS EG

by donaldjhenderson » Thu, 24 Jul 2008 23:59:57 GMT

if you are running EG locally and have a local copy of SAS you can specify in a node by node basis whether to run the code on your local or remote SAS server.

If you don't have a local install of SAS, I don't believe you can have SAS on the server access your local PC with an X command.

HTH,
donh

----------------------------------------

_________________________________________________________________
Time for vacation? WIN what you need- enter now!
http://www.gowindowslive.com/summergiveaway/?ocid=tag_jlyhm

sas >> x command for SAS EG

by joewhitehurst » Fri, 25 Jul 2008 00:19:43 GMT

o set up X commands to run in SAS Enterprise Guide on SASMain/business
intelligence setups, follow these steps:
1. Close SAS Enterprise Guide.

2. Click Start-->Settings-->Administrative Tools-->Services.
Right-click
SAS Lev1 OB - <Project Name>. Click Stop and minimize the window.

3. Click Start-->Run. Type cmd and click OK.
Change directory to C:SAS<Project
Name>Lev1SASMainObjectSpawnerObjectSpawner and submit the
following:

objectspawner -remove

Minimize the window.

4. In Notepad, open C:SAS<Project Name>Lev1SASMainObjectSpawner
ObjectSpawner.bat and add -allowxcmd to the first "-install" line.
For example, your code should look like this:

-install -allowxcmd -name "%SASServiceNAME%" %DEPENDS%

5. Click File-->Save.

6. Reopen the Command window that you minimized at the end of step 3,
and submit the following:

objectspawner -install

7. Reopen the Services window that you minimized in step 2. Right-click
SAS Lev1 OB - <Project Name>. Click Start.

8. Open SAS Enterprise Guide. Click New-->Code and type the following:

proc options; run;

9. Click Code-->Run on SASMain. Right-click the code node on the
Project tab. Select Open Log and search for XCMD. The Log should
show the following message:

XCMD The X command is valid in this SAS session.

10. CLick File-->New-->Code and type the following:

options noxsync noxwait;
x 'dir > c: est.txt';
run;

11. Click Code-->Run on SASMain. Right-click the code node on the
Project tab. Select Open Log and verify that your code ran
successfully. Then, go to your server and search for c: est.txt.

See SAS Note #015179 for similar issues with the SAS(R) Stored Process
Server and XCMD.

See SAS Note #016023 for issues with SAS/ACCESS(R) and XCMD on
UNIX.

Note: You need to make sure that the userID that you use for accessing
SASMain has appropriate privileges. In this example, in the Server List
of SAS Enterprise Guide, when you right-click SASMain, select
Properties-->Server tab, and look at Server Userid. You will find the
server userID that should have privileges on the server to perform your
X command. In the code that you submit in step 10, you need to make
sure that the userID is a member of the administrators group on SASMain.

Warning: By giving your customers adminstrative privileges on SASMain,
you allow them read/write/delete access to important data and system
files. Caution these users about the possibilities of catastrophic
failure with mistakes in the X command code and the possibility of abuse
of company resources on that server.

See SAS Note #013521 for restrictions on Windows 2003 servers where
SASMain is installed: Security issue. For security reasons, the object
spawner is started with the system option of NOXCMD, which prevents the
client from submitting any type of shell or operating system command.
With administrative privileges, the object spawner can be re-started
with the option ALLOWXCMD or NONOXCMD that permits the client to issue
shell or operating system commands. This works for all Windows operating
systems EXCEPT for the Windows 2003 Server.






On 7/24/08, Bradley Olson < XXXX@XXXXX.COM > wrote:

sas >> x command for SAS EG

by RHOADSM1 » Fri, 25 Jul 2008 01:08:13 GMT

Are the files you want to manage on your PC's local hard disk, or are
they on network file storage that would also be accessible from your SAS
server?

As Don has explained, you are out of luck with EG trying to use the X
command when running on a non-local SAS server -- almost certainly a
good idea, since you certainly wouldn't want any user of the server to
be able to have access to all the files.

However, if the SAS server does have access to the files of interest,
SAS has built-in facilities to do some file processing. For an example,
see Linda Libeg's 2007 SAS Global Forum paper "FUNCTIONSIZE: Process
Your External Files" at
http://www2.sas.com/proceedings/forum2007/054-2007.pdf.

Mike Rhoads
Westat
XXXX@XXXXX.COM

-----Original Message-----
From: SAS(r) Discussion [mailto: XXXX@XXXXX.COM ] On Behalf Of Don
Henderson
Sent: Thursday, July 24, 2008 11:52 AM
To: XXXX@XXXXX.COM
Subject: Re: x command for SAS EG


if you are running EG locally and have a local copy of SAS you can
specify in a node by node basis whether to run the code on your local or
remote SAS server.

If you don't have a local install of SAS, I don't believe you can have
SAS on the server access your local PC with an X command.

HTH,
donh

----------------------------------------
is a
that on
execute
code.
from
(with
and

_________________________________________________________________
Use video conversation to talk face-to-face with Windows Live Messenger.
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGL
M_WL_Refresh_messenger_video_072008

sas >> x command for SAS EG

by stephen » Fri, 25 Jul 2008 01:51:48 GMT

Try mapping a network drive back to your PC for the session or using a
direct reference if you are using a Windows Server for SAS. e.g.-
\\my-pc.domain.corp\c$\data_dir\file_to_use.csv<file://my-pc.domain.corp/c$/data_dir/file_to_use.csv>

Regards,
Stephen

On Thu, Jul 24, 2008 at 8:14 AM, Bradley Olson < XXXX@XXXXX.COM >

Similar Threads

1. Pipe Command in EG

Hi,

I was trying to use the pipe command in the code window under EG.
So far it works fine, however I'm not able to cc or to add a message
to the email...any help is much appriciated.


filename send_m pipe "uuencode '&work_dir./outfile/abcd_%sysfunc(today
(),yymmdd10.).txt'
		'abcd_%sysfunc(today(),yymmdd10.).txt'|
		/usr/ucb/mail -s 'abcd Report'  XXXX@XXXXX.COM ";

data _null_;
	file send_m;
run;

Best,
Gordon

2. Run Multiple SAS E.G. Projects in one code

3. EG 3.0 compared to EG 4.1

Is there big difference between the two, not sure if we should upgrade
just yet.

Anyone have a comparison chart ?

Thanks

4. Comparison of a Simple Join done by EG and Hand Coded - 22 times longer in EG

5. Comparison of a Simple Join done by EG and Hand Coded - 22 times longer in EG

6. How to execute a DOS command without the command window

7. SAS EG vs SAS EM

Hi,

Recently my team switched over from PC-SAS Miner to Enterprise Guide
based on running from a server in US. Being located in India, the
network speed prevents me from doing even normally simple tasks like
opening/browsing through even very small data sets. (cant have a server
in India). Morever EG doesnt have the Miner like interface for building
decision trees etc. We are talking with the IT folks to make them
understand our need to have EM because of lack of features in EG as
compared to EM and the speed issue because of using a EG client. We are
looking to build a proper case with IT for reverting back to EM
(inspite of it being very costly) or at the very least PC-SAS with
essential modules.

I would like to know as to whether there are any documents/studies
available (even informal) which might detail about difference between
EG and EM and their relative strengths/weakneses and does any study
exist on end-user efficiency differences between these 2?

Also, I would like to add that part of the present discomfort with EG
could also be because of my lack of knowledge of its features but again
when I see the EG help it doesnt have any of the syntaxes etc as in
normal SAS help (Its not feasible to refer to Online document each time
considering that speed of network access is already an issue) gives a
sense as if, SAS didnt build EG from a code writing perspective.
Probably it could also be because there arent many tutorials available
(I searched to some extent) on the possibly finer features of EG or
something like even SAS hosted EG forum seems to be nascent (I have
been waiting for a week to get a response to my query).

Please guide me.

Regards,
HP
India

8. SAS 9.1.1 Vs SAS EG 4.1