The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Windows services for unix - How do I run in batch rbdenham Windows & DOS: Issues & Discussions 3 06-05-2008 12:42 PM
Batch id in UNIX ganapati UNIX for Dummies Questions & Answers 1 03-28-2007 04:45 AM
batch file equivalent for Unix megastar UNIX for Advanced & Expert Users 1 10-12-2005 03:20 PM
Batch files and FTP under Unix ober5861 UNIX for Dummies Questions & Answers 4 07-16-2001 06:12 PM
unix batch eeldivady UNIX for Dummies Questions & Answers 3 06-30-2001 07:16 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-25-2007
Registered User
 

Join Date: Sep 2007
Posts: 1
Stumble this Post!
Unix Batch FTP - SAS

Hi All,

Im trying to write a Unix FTP batch file within a program called SAS. Now i already have one for windows which works fine, but it doesnt work within unix.

I've been told that some of the commands are different from Windows to Unix, and ive looked round and am completely stumped...

Can anyone have a look at the below and tell me which parts need changing:-

Code:
%macro ftp_create_folder(
			host = ,
			user = ,
			pass = ,
			cur_dir = ,
			new_dir = ,
			script_file = temp.txt);

	filename scr "&script_file";

	data _NULL_;

		file scr;

		put "open &host";
		put "&user";
		put "&pass";
		%if "&cur_dir" ne "" %then
			%do;
				put "cd &cur_dir";
			%end;
		put "mkdir &new_dir";
		put "close";
		put "quit";
	run;

	filename scr clear;

	%sysexec ftp -s:"&script_file";
	%sysexec del "&script_file";


%mend ftp_create_folder;
Thanks

Shenn
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:31 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0