BookmarkSubscribeRSS Feed
Obsidian | Level 7

Struggling with SAS command line...


I've been using SAS EG for a while, and want to try batch work arrangement by windows CLI(for some permission level restriction I can't use scheduls in SAS EG...).


But I have to connect to metadata sever every time  I start EG, which I don't know how to finish in command line, I guess there should be some sas.exe parameters to set up the "bridge" connection with [remote server address, port, user name, password...]


Is there a handbook I may follow?


appreciate in advance for any rely.

The SAS session that Enterprise Guide connects to is a Workspace Server. The Workspace Server establishes a connection to the Metatdata Server by way of the Lev1/metadataConfig.xml file that is called by the METAPROFILE in Lev1\SASApp\sasv9.cfg. This establishes a connection to the Metadata Server using the connection details in that XML file as the process owner or in the case of SAS Token Authentication using a one-time password for the user who requested the server from the Object Spawner.

To connect to Metadata from a SAS session started in batch you could use the Batch Server to start SAS (i.e. Lev1\SASApp\BatchServer\sasbatch.cmd) which would also load that metaprofile option, or in a SAS session started from <SASHome>\SASFoundation\9.4\sas, use the metadata connection options (e.g. metaprofile, or metaserver/metaport/metauser/metapass).

Connection Options
Greg Wootton | Principal Systems Technical Support Engineer
Opal | Level 21

SAS Management Console provides a point-and-click interface to schedule and run SAS batch programs - if you are creating EG projects then you need to export these to SAS programs first.


Is this a possibility for you? SMC needs to be installed on your PC like EG, but once it is you connect to a remote SAS server just like in EG. 

Meteorite | Level 14

If one wants to run SAS code in batch mode from command line, it is not  necessary to connect to the metadata server. However this is to be run a machine on which SAS is installed.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 4 in conversation