BookmarkSubscribeRSS Feed
Julo
Calcite | Level 5
Hello,

I want to run sas script from (in a batch) from local command line. The problem is, that i want to connect to remote metadata server and run script there.
(In enterprise guide it is not problem because i can choose server from "code" menu)
But I don't know how to pass remote server connection information to sas.exe in command line. "sas.exe /?" doesn't show any help - it runs GUI.
I have created xml file with server connection information using some tool.
I suppose that this file should be passed to sas.exe altogether with sas script file.
Do you know how to do this?

Thanks in advance
3 REPLIES 3
MohammedShareef
Calcite | Level 5
Setup the metadata connection parameters in the config file and you should be able to connect once the sas.exe runs. Add following to your config file with your Metadata Server information:

-METASERVER "ServernameHere"
-METAPORT 8561
-METAUSER "user"
-METAPASS "password"

Regards
Mohammed
twocanbazza
Quartz | Level 8
Doing the above will "Connect" you to the metadata but will not run the script on the metadata server.

What sort of script are you trying to run, as if the metadata server is just that, you shouldn't be running sas jobs on the server unless they are metadata maintenance jobs such as backup etc.

To achieve what you want you'll probably use SAS/connect, have you local session execute and connect to the remote server.

Barry
Julo
Calcite | Level 5
Hello,

I am newbie to sas. (a programmer forced to do someting in sas)
I suppose - when I start enerprise guide I can run script locally on localhost sas server. I can add remote machine (in Enterprise guide explorer) and then run scripts over tables on remote server. In the code menu, there is "select server" item. When I want to work with tables on remote server I choose remote server and run script. I think/thought that script is running on remote server.
I am trying to run some SQL based scripts.
The same case is in Data Integration Studio - I enter servername/port/user/pass/repository and can run script over those tables.

Basically, I need the same functionality as with SQL server - connecting with client to server and run script and get the results. In the terminology of SAS, the client is enterprise guide or data integration studio or sas.exe and I suppose that server is metadata server, database is repository.
If not, please correct me.

So in IDE (such as enterprise guide) I can click it and run ... and I need the same from command line with passing arguments/config to sas.exe. Something like "sas.exe -server asd -repository xyz -userid julo -pass pwd -script myscript.sas" or at least "sas.exe -config file.conf -script ,yscript.sas". But as I wrote "sas.exe /?" ir "sas.exe -h" doesn't work.

Thanks in advance

PS: we don't have sas/connect installed

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 2447 views
  • 0 likes
  • 3 in conversation