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

Hello All,

 

we are using sas 9.4 on linux as grid environment.

my question is if we run a batch job via command line with below command where output goes?

 

$sas  test.sas

 

(code is data test; a=123; run;)

 

Logs says work.test created -> i am trying to find this table

 

this created directory under my home dir with "SASGSUB-date-time...." where i can see logs+job details+sas program itself. I checked under "grid-share" dir but i don't see output there. I also checked temporary sas work space directory but i don't see anything under my id either.

 

please advise.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

SAS WORK libraries and datasets are automatically deleted at the end of your batch job. If you wish to keep the TEST dataset write it to a permanent SAS library.

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

SAS WORK libraries and datasets are automatically deleted at the end of your batch job. If you wish to keep the TEST dataset write it to a permanent SAS library.

Kurt_Bremser
Super User

If you want to run code in batch, you need to take control over the results.

When working with Enterprise Guide or SAS Studio, those frontends will automatically add code that sends output back to them, catch the log, and display datasets. WORK datasets can be viewed because the workspace server process stays active all the time.

So, as @SASKiwi already suggested, do not use the WORK library for datasets you want to use after the batch job has run.

Similarly, direct any output to a place where you can find it, either by using ODS with correct paths for output destinations, or by using the -print option on the commandline.

Finally, redirect the log to a place where you can find it with the -log commandline option.

 

woo
Barite | Level 11 woo
Barite | Level 11

thanks all. its dragging me to basics 🙂

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 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1542 views
  • 3 likes
  • 3 in conversation