Visit Our UNIX and Linux User Community


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
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #996
Difficulty: Medium
Major Unix vendors, including Sun Microsystems, HP, IBM, and SGI, have been selling virtualized hardware since before 1990.
True or False?

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
HPT27XX(4)						   BSD Kernel Interfaces Manual 						HPT27XX(4)

NAME
hpt27xx -- HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device hpt27xx Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): hpt27xx_load="YES" DESCRIPTION
The hpt27xx driver provides support for HighPoint's RocketRAID 27xx based RAID controller. These devices support SAS disk drives and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality. HARDWARE
The hpt27xx driver supports the following SAS controllers: o HighPoint's RocketRAID 271x series o HighPoint's RocketRAID 272x series o HighPoint's RocketRAID 274x series o HighPoint's RocketRAID 276x series o HighPoint's RocketRAID 278x series NOTES
The hpt27xx driver only works on the i386 and amd64 platforms as it requires a binary blob object from the manufacturer which they only sup- ply for these platforms. The hpt27xx driver does not work on i386 with pae(4) enabled. SEE ALSO
kld(4), kldload(8), loader(8) HISTORY
The hpt27xx device driver first appeared in FreeBSD 10.0. AUTHORS
The hpt27xx device driver was written by HighPoint Technologies, Inc.. This manual page was written by Xin LI <delphij@FreeBSD.org> for iXsystems, Inc. BSD
December 28, 2011 BSD

Featured Tech Videos