Architecting, installing and maintaining your SAS environment

ERROR: Shell escape is not valid in this SAS session

Accepted Solution Solved
Reply
Contributor
Posts: 65
Accepted Solution

ERROR: Shell escape is not valid in this SAS session

When I schedule sas prog via sas amangement console as sassrv user . its throwing below error. I alredy made the below changes in smc Allow XCMD

.

  1. Expand Server Manager ► SASApp ► SASApp - Logical Workspace Server.
  2. Right-click on SASApp - Workspace Server and select Properties.
  3. Click the Options tab, and then click the Advanced Options button.
  4. Click the Launch Properties tab, and select Allow XCMD. Click OK until you have closed all open dialog boxes.
  5. Exit SAS Management Console.
  6. From the Microsoft Windows desktop, click Start and then Services.
  7. Select Stop the Metadata Server and wait a few moments.
  8. Restart the servers as follows:
    • Start the Metadata Server
    • Start the Object Spawner
    • Start the SAS Remote Services
    • Start the SASTS - Table Server

 

ERROR: Shell escape is not valid in this SAS session.

 


Accepted Solutions
Solution
yesterday
Super User
Posts: 6,930

Re: ERROR: Shell escape is not valid in this SAS session

Instead of editing the sasbatch.sh file, you should add the -xcmd in the USERMODS_OPTIONS environment variable in sasbatch_usermods.sh.

sasbatch.sh may be overwritten by updates or hotfixes, the *_usermods* files will not be changed.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Super User
Posts: 6,930

Re: ERROR: Shell escape is not valid in this SAS session

IIRC, the scheduler uses one of the SAS Data Step Batch Servers, so you need to change the configuration of that.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 65

Re: ERROR: Shell escape is not valid in this SAS session

I have update the batchsas.sh file..... now is working fine.

/opt/sas/config/Lev1/SASApp/BatchServer

 

exec "$SAS_COMMAND" -xcmd -lrecl 32767 "$@" "${USERMODS_OPTIONS[@]}"

Solution
yesterday
Super User
Posts: 6,930

Re: ERROR: Shell escape is not valid in this SAS session

Instead of editing the sasbatch.sh file, you should add the -xcmd in the USERMODS_OPTIONS environment variable in sasbatch_usermods.sh.

sasbatch.sh may be overwritten by updates or hotfixes, the *_usermods* files will not be changed.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 704 views
  • 4 likes
  • 2 in conversation