BookmarkSubscribeRSS Feed
RupaJ
Lapis Lazuli | Level 10

Hello,

 

How do I run the SAS code on a specific application server on linux command line? We have 2 app servers - SASAPP and SASAPP2 with SASAPP2 having more memory allocated. So I would like to run on SASAPP2 to make sure all the memory is allocated to the code to avoid any failures. 

 

On SASEG, I just choose the option from "selected server". However not sure how I can do that on linux command line.

 

Also any command line tips on running long running SAS programs on linux? Any examples would be very helpful. 

 

Thanks!

16 REPLIES 16
r_behata
Barite | Level 11

Multiple Instances of the SASApp can be running on the same server or can be distributed across different servers.


The SAS Metadata server makes these details seamless when you switch from SASAPP instance from the other from any of the clients.


However, you need to know the server name mapped to your second logical instance(SASAPP2) to manually run the code directly on that server.

SASKiwi
PROC Star

Why do you need to run SAS jobs from a linux command line? It is a whole lot easier doing this from SAS Management Console Schedule Manager.

SuryaKiran
Meteorite | Level 14

Hi Rupa,

 

You may have to use GRIDAPPSERVE option in SASGSUB. 

Check this out --http://support.sas.com/documentation/cdl/en/gridref/67371/HTML/default/viewer.htm#p05eo0im8mix5qn1bz...

Thanks,
Suryakiran
ChrisNZ
Tourmaline | Level 20

Are you talking about sending to a different machine or executing locally?

Do you want to just call the sas executable or do you want to go through the SAS Metadata server?

 

It's the latter case it seems since you want to use SASAPP2. So you need to talk to the SAS Metadata server. This can be done via different methods, for example using CORBA or Java. The documentation for the Open Metadata Interface is here

 

 

RupaJ
Lapis Lazuli | Level 10

@ChrisNZ - I just want to execute locally on the compute server. 

 

@SASKiwi - The reason I want to run on linux command line is due to the fact that we have SSO enabled and that expires the SASEG session every 10 hours. This is causing our long running SAS programs to fail, so I am looking to run from command line where I can auto renew/extend the kerberos tickets. 

 

@SuryaKiran - Thanks Surya. This seems to be SAS grid options and we don't have that.

 

Just to provide more details, we have 2 servers - meta and compute. Compute server has 2 app servers - sasapp and sasapp2 and I would like to run the sas code on sasapp2 context form command line. Something like

 

/opt/sas/sashome/SASFoundation/9.4/sas  sascode.sas -log sascode.log "-option" sasapp2. 

 

I also see the options -memsize /-sortsize. Should I just mention those and run the code?

SASKiwi
PROC Star

@RupaJ - I'm suggesting SAS Management Console, not EG. A batch job started by SMC will not be affected by any timeout limits on the SMC to SAS server connection - you can close SMC and the batch jobs continue totally independently. 

RupaJ
Lapis Lazuli | Level 10

Thanks @SASKiwi. I started looking at that. I was able to schedule the job, however when I run it , nothing happens. I am still checking where the logs are getting generated. Looks like I need to install the flow manager to check the status of the jobs. 

 

 

SASKiwi
PROC Star

@RupaJ For SMC you can assign the directory for the batch job logs on the Properties of the Server Manager - SASApp - SAS DATA Step Batch Server.

RupaJ
Lapis Lazuli | Level 10

Thanks @SASKiwi!! That's exactly what I was looking for. 

SASKiwi
PROC Star

Cool @RupaJ - I must admit finding where to configure stuff in SMC is sometimes not obvious...

RupaJ
Lapis Lazuli | Level 10

@SASKiwi - Couple more questions, if you could clarify?

 

Do I need the flow manager to check the status of the jobs? Is there a way to check the status of the jobs from SASMC?

Also I read we can email the status of the job. Any direction on how to configure that?

 

Thanks!

SASKiwi
PROC Star

@RupaJ - what scheduler are you using? Platform Process Manager or Operating System Services?

RupaJ
Lapis Lazuli | Level 10

@SASKiwi - Operating System Services. 

RupaJ
Lapis Lazuli | Level 10

@all - And just to circle back to my original question. I used the following command on linux 

 

/opt/sas/SASHome/SASFoundation/9.4/sas run_queries.sas -work /SAS_Work/WS2/SASWork -memsize 171798691840 -sortsize 17179869184 -log /SAS_Testing/tests.log

 

It errors out within minutes. However when I execute the code in SASEG (Enterprise guide), it runs fine with no issues.  I guess I am missing to add some necessary options ?? Any idea. 

 

Attached is the complete log. 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 16 replies
  • 2586 views
  • 0 likes
  • 5 in conversation