BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MC1985
Obsidian | Level 7

Hi everybody,

 

my task is about moving some file from server with SAS Plaftform to my local machine, using SAS Enterprised Guide (Server and Local Machine under Windows Environment), but  i don't want to use the upload/dowload task or with the custom task proposed by Chris Eminger at this link but using a custom task by code.

 

I'm not so pro in technology but i think i can use the PIPE Command and send some command to system and moving file by File Transfert Protocol? can be a good and feasible idea? what type of information i need to do this, like permission, password, test network between server and local machine(how i can do this?) or other? how to do in Windows Environment, because in past i used in UNIX Environment and SAS Base the PIPE and "SCP OS command" from SERVER to SERVER and not in my local machine?

 

Some one can help me or suggest?

 

thank you very much

have nice day

MC

Martino Crippa
1 ACCEPTED SOLUTION

Accepted Solutions
MC1985
Obsidian | Level 7

The reason is that i have not the permission on my local pc to copy the *.dll file of custom task and for policy i can't install any software or other file in system folders...

 

So try something like that:

 

TO START I NEED:

1. enable the XCOMMAND

2. SAS SERVER can ping my local machine

3. SAS User from SAS server can copy to my local machine


TO DO LIST:
1. Understand my local ip with "ipconfig" from CMD on my machine (IPv4 Address)
2. TEST from SAS EG if SERVER can PING my local machine, for example:

filename CMD pipe 'ping XXXXXXXX';
data _null_;
    length rc $ 256 ;
    infile CMD length=reclen missover;
    input  rc $varying256. reclen;
    put rc=;
run;


3. COPY file from SERVER to MYLOCALMACHINE, for example:

filename CMD pipe 'copy C:\tmp\class.sas7bdat \\MYLOCALIP\C:\tmp\\class.sas7bdat';

data _null_;
    length rc $ 256 ;
    infile CMD length=reclen missover;
    input  rc $varying256. reclen;
    put rc=;
run;

any suggest or error?

 

is correct if i ask to IT Office to enable XCOMMAND to Workspace Server?

 

thanks

MC

Martino Crippa

View solution in original post

7 REPLIES 7
Kurt_Bremser
Super User

In most cases, working with EG means that SAS runs on a remote server. Using any external utility from SAS code will therefore necessitate that some kind of transfer server process runs on your PC, as the SAS code on the server will be using the client for the respective protocol.

Setting up a FTP or SSH server daemon on your desktop PC may prove to be less than trivial. One of the great handicaps of Windows is its lack of simple utilities (like the server daemons) that are in abundance in the UNIX world.

 

What is your reason for not using Chris Hemedinger's custom file transfer task?

MC1985
Obsidian | Level 7

The reason is that i have not the permission on my local pc to copy the *.dll file of custom task and for policy i can't install any software or other file in system folders...

 

So try something like that:

 

TO START I NEED:

1. enable the XCOMMAND

2. SAS SERVER can ping my local machine

3. SAS User from SAS server can copy to my local machine


TO DO LIST:
1. Understand my local ip with "ipconfig" from CMD on my machine (IPv4 Address)
2. TEST from SAS EG if SERVER can PING my local machine, for example:

filename CMD pipe 'ping XXXXXXXX';
data _null_;
    length rc $ 256 ;
    infile CMD length=reclen missover;
    input  rc $varying256. reclen;
    put rc=;
run;


3. COPY file from SERVER to MYLOCALMACHINE, for example:

filename CMD pipe 'copy C:\tmp\class.sas7bdat \\MYLOCALIP\C:\tmp\\class.sas7bdat';

data _null_;
    length rc $ 256 ;
    infile CMD length=reclen missover;
    input  rc $varying256. reclen;
    put rc=;
run;

any suggest or error?

 

is correct if i ask to IT Office to enable XCOMMAND to Workspace Server?

 

thanks

MC

Martino Crippa
MC1985
Obsidian | Level 7
Hi Kurt, i forget to answer. My customer business users didn't have the permission by IT Department to use Chris Hemedinger's custom file transfer task.
Usually they copy in a manually way file from the remote folder that are mapped on their local pc.
thank you very much
Martino Crippa
LinusH
Tourmaline | Level 20
Enabling XCOMMAND is must if you are going to use PIPE or similar method.
But the whole setup seems awkward.
Can't you get access to the file on the server instead, or have the SAS session write the file to a file share?
What is "some file"?
Data never sleeps
MC1985
Obsidian | Level 7

i hope that Customer IT Department enabled the XCOMMAND.

 

"some file" are fromt *.sas7bdat, xlsx, csv, html or csv.

 

now the users bring in manually way the file from remote desktop by explorer, they had the remote disk mapped in their local machines.

 

tnks

 

M

Martino Crippa
ChrisHemedinger
Community Manager

Good news! That custom task isn't "custom" anymore -- in EG 7.13 it's built into the application.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
MC1985
Obsidian | Level 7
thank you very much
Martino Crippa

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 8700 views
  • 1 like
  • 4 in conversation