BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
cellurl
Quartz | Level 8

File: my.sas

 x "sas9 /mktg/mrq/jpruett/juanita.sas &"; run;

 

File: juanita.sas

libname here '/mktg/mrq/jpruett/.'; run;

ods csv file="/mktg/mrq/jpruett/ods_csv.csv";
proc print data=here.dom_rev;
run;
ods csv close;

 

Test 1: From Solaris:    

mktpricing:/mrq/jpruett % sas9 my.sas
mktpricing:/mrq/jpruett % cat *.csv
"Obs","CUST_NBR","rev"
"1",378510490,"."
"2",522856401,"."
"3",525331199,"."
"4",684611763,"."
"5",826893206,"."
"6",836789067,"."
"7",864120008,"."
"8",865098006,"."
"9",902191429,"."

 

 

Test 2: From SAS Studio.   I click to run my.sas

Then in Unix I do the following:

mktpricing:/mrq/jpruett % cat *.csv
"Obs","CUST_NBR","rev"

 

 

There are no rows!, just header... ;-(   Any ideas???

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
cellurl
Quartz | Level 8

Mark closed please.  

I no longer care about this.

 

Explaination:

 

I need to run 10 minute queries. My impression was that SasStudio was a normal webpage which timed out in 2 minutes (most do).

But people tell me it isn't like that, and it will run forever and not hang.

 

So I did a 10 minute test and indeed it ran for 10 minutes and then finished gracefully. (Its nice to watch the bottom left corner to see progress, so I know it isn't hanging...)

 

Anyway, I no longer need the "X " command.

View solution in original post

7 REPLIES 7
cellurl
Quartz | Level 8

where does sas studio put logs called from "X "  ?

 

I dont see it. 

thanks for helping! I am dumbfounded on this one.

cellurl
Quartz | Level 8

The logs are only available in SAS-STUDIO. Even though I gave a path for the logs, it doesn't honor it.

Q: Where does SAS-Studio put the logs (besides in a web page) ?

 

 

Untitled.pngls -Untitled.png

cellurl
Quartz | Level 8

I am trying to create excel and email it to me.

My approach may not work.

Q: Is there another way to do it?   Below says "ODS will ruin my life". What should I do instead in SAS-STUDIO?  

 

Thanks

 

Untitled.png

Kurt_Bremser
Super User

@cellurl wrote:

where does sas studio put logs called from "X "  ?

 

I dont see it. 

thanks for helping! I am dumbfounded on this one.



These usually are put in the current working directory of the SAS workspace server, from which the X is executed.

 

Try adding a defined path for the log with -log.

 

Also use the filename pipe method for calling external commands:

filename oscmd pipe "sas /path/program.sas -log /path/program.log 2>&1";

data _null_;
infile oscmd;
input;
put _infile_;
run;

filename oscmd clear;

All messages from the OS will end up in the SAS log, so you can see if the batch run fails completely.

cellurl
Quartz | Level 8

no joy.

To recall:

 

----In Unix it works great. I get csv file emailed to me aok--------

sas9 my.sas 

 

----In Sas studio, I click on RUN for my.sas and it runs, but the ODS fails and I get no email. I don't see any log.

 

I think sas studio doesnt allow changing path of logs, so I don't know how ODS fails.

 

I also tried 

 

libname out xlsx '/mktg/mrq/jpruett/file.xlsx'; run;

 

but that errored saying:  "XLSX" engine not avail or something like that.

 

cellurl
Quartz | Level 8

Mark closed please.  

I no longer care about this.

 

Explaination:

 

I need to run 10 minute queries. My impression was that SasStudio was a normal webpage which timed out in 2 minutes (most do).

But people tell me it isn't like that, and it will run forever and not hang.

 

So I did a 10 minute test and indeed it ran for 10 minutes and then finished gracefully. (Its nice to watch the bottom left corner to see progress, so I know it isn't hanging...)

 

Anyway, I no longer need the "X " command.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 3348 views
  • 0 likes
  • 2 in conversation