Help using Base SAS procedures

sas.exe - batch from windows command line / remote metadata server

Reply
Occasional Contributor
Posts: 15

sas.exe - batch from windows command line / remote metadata server

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
N/A
Posts: 1

Re: sas.exe - batch from windows command line / remote metadata server

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
Super Contributor
Posts: 356

Re: sas.exe - batch from windows command line / remote metadata server

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
Occasional Contributor
Posts: 15

Re: sas.exe - batch from windows command line / remote metadata server

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
Ask a Question
Discussion stats
  • 3 replies
  • 770 views
  • 0 likes
  • 3 in conversation