Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rsubmit - Unix?

Status
Not open for further replies.

shenniko

Programmer
Apr 15, 2005
52
US
Hi All,

Not 100% sure about this question as only know a little bit about what happens when you rsubmit things...

Below code:-

Code:
rsubmit;
filename Runcode "Macro_Runs.SAS";
Data t1;
	set Product_Links;
	File Runcode;
	Length SubStr $200;

	If Franchise NE "All" Then
		SubStr = '%Create_Product_Data(FTitle='||TranWrd(trim(Left(Franchise)), " ","_")||',Franchise='||Trim(Left(Franchise))||');';
	PUT SubStr;
run;
endrsubmit;

Will create a file called Macro_Runs.SAS in my File Name=/home/username/ Area on the Unix box..

Is there any way to delete that file once it has been used? As we dont have access to see the unix area.

Ta

Robbie
 
You can use the X command to issue a system command on the remote box.
You'll need to remote submit the command obviously to get it to the Unix box. There are alot of options with this that I didn't really play around with much, but one thing I found is that if it fails to delete the file (for instance if it doesn't have access to do so) you won't get a message back unless you specifically code for it.

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
The following should work -

rsubmit;

data _null_;;
call system('rm Macro_Runs.SAS');;
run;

endrsubmit;;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top