Unix Batch FTP - SAS


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unix Batch FTP - SAS
# 1  
Old 09-25-2007
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
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing the sas comment line using UNIX

I have tried a lot, Need your help guys. SAS Program: data one ; /* Data step */ Input name $; /*Dec variables*/ I want to remove the commented part(/* Data step */) alone. I have tried using sed command but it is deleting the entire line itself. i need unix command to separate this and... (6 Replies)
Discussion started by: saaisiva
6 Replies

2. UNIX for Dummies Questions & Answers

Remove SAS comments using UNIX

I have tried a lot, Need your help guys. SAS Program: data one ; /* Data step */ Input name $; /*Dec variables*/ I want to remove the commented part(/* Data step */) alone. I have tried using sed command but it is deleting the entire line itself. i need unix command to separate this and... (1 Reply)
Discussion started by: saaisiva
1 Replies

3. Shell Programming and Scripting

FTP in batch mode

HI, Need to ftp a bunch of files in a directory in batch mode. TRying to ftp a single file first with below code. #!/bin/ksh function ftp_files { ftp -n ${D2_SRVR} <<-EOF quote user ${D2_UID} quote pass ${D2_PWD} cd ${D2_DIR}/${D2_NAME} lcd ${D1_DIR}/${D1_NAME}/dml/ put file1 ... (6 Replies)
Discussion started by: cvsanthosh
6 Replies

4. UNIX for Dummies Questions & Answers

Performing Batch ftp without .netrc

How can I supply the userID/password when executing FTP in the batch mode? Using .netrc is not an option (prohibited per Corporate Policy). Thank you in advance. (1 Reply)
Discussion started by: compaamat
1 Replies

5. UNIX for Dummies Questions & Answers

Unix commands in Base SAS programming

hi all, iam using unix command in the basesas programming. i need to delete one folder which is dynamically creating when SAS script runs. rm -rf " dynamic foldername" iam not able to delete the folder it is saying rm: cannot remove directory `test_lin_prod_06_20091211_0516':... (2 Replies)
Discussion started by: bbc17484
2 Replies

6. Windows & DOS: Issues & Discussions

Batch file to Get New Files Only through FTP

Hi there I want to create a batch file which Get (mget) the newly added Files only from specific directory on UNIX server to specific folder on windows server using FTP, and this batch file will be scheduled on the windows server to run daily to load the new files (load the newly added files... (1 Reply)
Discussion started by: alsharq
1 Replies

7. Windows & DOS: Issues & Discussions

Batch file to Get New Files Only through FTP

Hi there I want to create a batch file which Get (mget) the newly added Files only, from specific directory on UNIX server to local folder on windows server through FTP, and this batch file will be scheduled to run daily to load the new files. help me plz :confused: (1 Reply)
Discussion started by: alsharq
1 Replies

8. UNIX for Dummies Questions & Answers

Unix and Mac setup for SAS

I'm new to the forum, so I appreciate any help you can give me. I have been at an academic institution that manages its own UNIX computing grid for running SAS. I use a Mac as my personal computer and connect remotely using an ssh terminal to conduct my analysis and store/manage my files. I'm... (3 Replies)
Discussion started by: crl21
3 Replies

9. UNIX for Dummies Questions & Answers

UNIX Batch FTP Command file

Hello, I am a UNIX newbie and this is my first posting. I need to create a batch command file to ftp from Sun/Solaris to AS/400. Here is an example file: ftp -d -i -n -v 172.28.16.22 pwd ls binary quit This is the result of executing the command file: Connected to... (10 Replies)
Discussion started by: pietro
10 Replies

10. UNIX for Dummies Questions & Answers

Batch files and FTP under Unix

Hey all, Does anyone know if Unix has an equivalent to a batch file? And if so, does it work the same way as a batch file under windows? AND, if you can answer that one, is it possible to run such a file under HP-UX and have it execute while in an FTP command line? What I need to do is... (4 Replies)
Discussion started by: ober5861
4 Replies
Login or Register to Ask a Question
MFI(4)							   BSD Kernel Interfaces Manual 						    MFI(4)

NAME
mfi -- LSI MegaRAID SAS driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device pci device mfi Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): mfi_load="YES" DESCRIPTION
This driver is for LSI's next generation PCI Express SAS RAID controllers. Access to RAID arrays (logical disks) from this driver is pro- vided via /dev/mfid? device nodes. A simple management interface is also provided on a per-controller basis via the /dev/mfi? device node. The mfi name is derived from the phrase "MegaRAID Firmware Interface", which is substantially different than the old "MegaRAID" interface and thus requires a new driver. Older SCSI and SATA MegaRAID cards are supported by amr(4) and will not work with this driver. Two sysctls are provided to tune the mfi driver's behavior when a request is made to remove a mounted volume. By default the driver will disallow any requests to remove a mounted volume. If the sysctl dev.mfi.%d.delete_busy_volumes is set to 1, then the driver will allow mounted volumes to be removed. HARDWARE
The mfi driver supports the following hardware: o LSI MegaRAID SAS 1078 o LSI MegaRAID SAS 8408E o LSI MegaRAID SAS 8480E o LSI MegaRAID SAS 9260 o Dell PERC5 o Dell PERC6 o IBM ServeRAID M5015 SAS/SATA o IBM ServeRAID-MR10i o Intel RAID Controller SROMBSAS18E FILES
/dev/mfid? array/logical disk interface /dev/mfi? management interface DIAGNOSTICS
mfid%d: Unable to delete busy device An attempt was made to remove a mounted volume. SEE ALSO
amr(4), pci(4), mfiutil(8) HISTORY
The mfi driver first appeared in FreeBSD 6.1. AUTHORS
The mfi driver and this manual page were written by Scott Long <scottl@FreeBSD.org>. BUGS
The driver does not support big-endian architectures at this time. BSD
May 12, 2010 BSD