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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 7 replies
  • 1163 views
  • 0 likes
  • 2 in conversation