aruku
asked on
transfer from Compressed file - SAS dataset
Hi all,
I have a compressed file in a specific location in a different server. I need to transfer it onto a different server and create a sas dataset from that.
Can any one please help me on that.
Extension: .gz
Appreciate your help!!
I have a compressed file in a specific location in a different server. I need to transfer it onto a different server and create a sas dataset from that.
Can any one please help me on that.
Extension: .gz
Appreciate your help!!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Connection refused means exactly that... you cannot connect to the server. Something is wrong with either your host=, user=, or pass=. You have an account on both servers, right, and can open a telnet session on each? You That's the quickest way to test the server address, user id, and password.
In your fileref source, without a leading / it will look in your home directory for the path. I don't think that that's the problem but it's something to check.
Are you running this from the source server? If you're running from a desktop and have connected to the source or target then be sure you are RSUBMITing the code.
In your fileref source, without a leading / it will look in your home directory for the path. I don't think that that's the problem but it's something to check.
Are you running this from the source server? If you're running from a desktop and have connected to the source or target then be sure you are RSUBMITing the code.
ASKER
I did connect to both the servers using telnet and am able to connect to them.
I am running this from the target server but am not rsubmiting the code
Do you think this is the issue?
Please let me know and appreciate your help
I am running this from the target server but am not rsubmiting the code
Do you think this is the issue?
Please let me know and appreciate your help
You should submit this the same way you do other SAS code to execute on the target server.
Only if you're editing the code in the SAS/Windows desktop editor and submitting it to run on a server do you need to encapsulate it in rusbmit...endrsubmit.
Only if you're editing the code in the SAS/Windows desktop editor and submitting it to run on a server do you need to encapsulate it in rusbmit...endrsubmit.
Hi Aruku
Add the DEBUG option to your filename statement, that way you should be able to see what the problem is:
filename source ftp 'export/home/xxxxx'
host=XXXXXXXXXX.abc.XXX.co m'
binary dir
user=aak pass=XXXXXXXXX DEBUG;
filename target ftp '/sas/edaspace/XXXXXXX'
host='XXXXXXX.abc1.XXXX.co m'
binary dir
user=aak pass=XXXXXXXXX DEBUG;
If that does not help - post the log (hiding sensative passwords etc), so we can help.
Add the DEBUG option to your filename statement, that way you should be able to see what the problem is:
filename source ftp 'export/home/xxxxx'
host=XXXXXXXXXX.abc.XXX.co
binary dir
user=aak pass=XXXXXXXXX DEBUG;
filename target ftp '/sas/edaspace/XXXXXXX'
host='XXXXXXX.abc1.XXXX.co
binary dir
user=aak pass=XXXXXXXXX DEBUG;
If that does not help - post the log (hiding sensative passwords etc), so we can help.
ASKER
Here is the update on the issue:
What am I trying to do:
Using SCP need to transfer the file from source dir to target dir by triggering through target dir.
I have created rsa keys in the source server and shared it with target so don't need any password authetication.
I have tried logging into source server and using the below command in UNIX am able to transfer the file to target server:
scp {file to copy} {destination UID}@XXXXXXXXX: {destination location}
Now, I need to connect to the Source server through a SAS program running in target server and execute the aboe command using X command.
Can any one please help me on this.
Appreciate your help!!
What am I trying to do:
Using SCP need to transfer the file from source dir to target dir by triggering through target dir.
I have created rsa keys in the source server and shared it with target so don't need any password authetication.
I have tried logging into source server and using the below command in UNIX am able to transfer the file to target server:
scp {file to copy} {destination UID}@XXXXXXXXX: {destination location}
Now, I need to connect to the Source server through a SAS program running in target server and execute the aboe command using X command.
Can any one please help me on this.
Appreciate your help!!
Hi Aruku
I am not sure that your proposed solution ID: 36374107 will work:
1. I am unsure if you have SAS loaded on the Source server. If you do, can you rsubmit code to that server?
2. If you can rsubmit, I am unsure that you will be able to execute an X command, as this is normally turned off by default on the remote server (NOXCMD)
Workin thru the comments above, I think you might need to use Secure FTP. And because you are moving a non-text file over, you will need to stream the file across. Assuming your local / target server is Windows based:
The outstanding problem is that we don't know why you cannot connect. Perhaps set the DEBUG option and post the log.
I am not sure that your proposed solution ID: 36374107 will work:
1. I am unsure if you have SAS loaded on the Source server. If you do, can you rsubmit code to that server?
2. If you can rsubmit, I am unsure that you will be able to execute an X command, as this is normally turned off by default on the remote server (NOXCMD)
Workin thru the comments above, I think you might need to use Secure FTP. And because you are moving a non-text file over, you will need to stream the file across. Assuming your local / target server is Windows based:
filename source sftp 'export/home/xxxxx'
host=XXXXXXXXXX.abc.XXX.com'
binary dir
RECFM=S LRECL=1 DEBUG;
%let work = %SYSFUNC(PATHNAME(Work));
%put &work;
filename target "&work" RECFM=N;
data _null_;
infile source('exl_final_prep_report.dat.gz');
input;
file target('exl_final.dat.gz');
put _infile_;
run;
The outstanding problem is that we don't know why you cannot connect. Perhaps set the DEBUG option and post the log.
ASKER
Alternate Solution:
I have created RSA keys between both the servers so that there is no password authentication and then executed the below commands using X commands for SCP:
X "rm -f (destination location of the file);
scp uid:(source server):/(Source location of the file) uid@(destination server):(destination location);
gunzip (destination location)";
I have created RSA keys between both the servers so that there is no password authentication and then executed the below commands using X commands for SCP:
X "rm -f (destination location of the file);
scp uid:(source server):/(Source location of the file) uid@(destination server):(destination location);
gunzip (destination location)";
ASKER
I've requested that this question be closed as follows:
Accepted answer: 500 points for theartfuldazzler's comment http:/Q_27251517.html#36374747
Assisted answer: 0 points for aruku's comment http:/Q_27251517.html#36384869
for the following reason:
We can use the top one as alternate solution as well
Accepted answer: 500 points for theartfuldazzler's comment http:/Q_27251517.html#36374747
Assisted answer: 0 points for aruku's comment http:/Q_27251517.html#36384869
for the following reason:
We can use the top one as alternate solution as well
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry for the confusion. The result first came from d507201. So that will be the primary solution
ASKER
alternate solution
ASKER
Thanks for the response. I am trying to do the ftp and am getting the below error. Can you please help me on this
filename source ftp 'export/home/xxxxx'
5 host=XXXXXXXXXX.abc.XXX.co
6 binary dir
7 user=aak pass=XXXXXXXXX;
8
9 filename target ftp '/sas/edaspace/XXXXXXX'
10 host='XXXXXXX.abc1.XXXX.co
11 binary dir
12 user=aak pass=XXXXXXXXX;
13
14 data _null_;
15 infile source('exl_final_prep_rep
16 input;
17 file target('exl_final.dat.gz')
18 put _infile_;
19 run;
ERROR: Open failed for file SOURCE
ERROR: Connection refused.
ERROR: Open failed for file TARGET
ERROR: Connection refused.