BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Not sure if this is the right forum, but.... is there a function in SAS that will obtain the dynamic address of a user's computer? I'd love to be able to use this type of function in order to FTP a file to that person's computer when they run a project.
10 REPLIES 10
deleted_user
Not applicable
%sysget(something)
provides the value of environment variable "something"

That was my soluton a long time ago, collecting the DISPLAY environment variable in a sun unix environment to get the "terminal identity IP address. I expect these things are managed in different ways now.

COMPUTERNAME may be an environment variable available on your windows environment, containing a machine name that is "recognised" in that domain

Are these topics for ths forum?

PeterC
deleted_user
Not applicable
Thanks for the information, Peter. I'll see what I can dig up concerning %sysget function.

I appreciate your replying 🙂
deleted_user
Not applicable
Just wondering..... where might I obtain the variables available for the %SYSGET function?

And, I wasn't sure if this was a proper topic for this forum, which was why I started my original post with saying I wasn't sure....

Thanks!
advoss
Quartz | Level 8
I assume that you are running windows. Start a DOS command prompt and then type the command set |more and see if anything looks useful.

Also, you may not be able to ftp to a Windows workstation. It seems that many sites do not have the ftp services enabled to allow files to be pushed to the workstation.

Can you email the file instead?
deleted_user
Not applicable
Thanks for replying, advoss.....

I think I just also figured my little problem..... we have SAS running on servers, and when I tried using %sysget(COMPUTERNAME), I kept receiving the name of the server computer, not my own "on-my-desk" computer. Your sugestion of typing in the DOS command set | more showed me that. So..... perhaps I might be better off trying to e-mail files, as per your suggestion.

This stuff is frustrating!! I appreciate your input.
deleted_user
Not applicable
Hello, again,

Although e-mailing a file sounds plausible, our e-mail system has a file size limit on attachments, and the e-mail folks are sticklers for not changing those limits.

Just wondering... any thoughts on how I can dynamically find my local PC's name from a server, via SAS and Enterprise Guide?

I think that'd be neat to be able to do that!

Thanks again!!!
Cynthia_sas
SAS Super FREQ
If you are doing it from within a stored process, (which I'm not sure of), then you could check out this site:
http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html
which shows for Web clients how you can get _RMTUSER, _RMTADDR and _RMTHOST because they are reserved stored process macro variables that are set for web clients.

Your best bet for help with this is to contact Tech Support and ask them for help with the FTP Filename engine statement. Even if you could NOT FTP directly to someone's PC you should be able to FTP to a shared server directory that they can get to.

cynthia
deleted_user
Not applicable
Thanks for the information, Cynthia,

I just didn't realize it would be this difficult to get a machines address or name. I'll try this tack now.
Cynthia_sas
SAS Super FREQ
Hi:
SAS always knows what machine (server) it's running on. But capturing client-side information and sending it to the server, so the server can use it and send something back?? That's a bit trickier, since SAS may not be running on the CLIENT side. So, I don't expect SAS to be able to capture information about a machine on which it's not running.

If there is a client application (like PowerPoint) that is requesting a stored process to run, then the question becomes -- does PowerPoint (or any client app) have a way to grab or identify the client IP address or client machine network name WITHOUT SAS being involved?? If they don't have a way to grab that information without SAS being involved or without a VB script being involved, then it's hard to see how the client app could send that information to SAS on the server.

I always think of getting a machine name or IP address as something that is unique to each operating system and each operating system's environment variables. That's why Web applications DO have a way to send the IP address of the remote host and the remote user, because the communication between the web client and the web server need that information.

If you made your stored process return a permanent package result, then you can indicate a place on the server file system for the package to live (that's one of the options when you create a permanent package). It seems to me that sending an email with the server location of their report "package" would be a viable alternative to e-mailing a large file or FTP-ing a large file. If the email guys aren't happy about emailing a large file, do you think the network guys would be any happier about FTP-ing large files?

cynthia
deleted_user
Not applicable
Hi, cynthia,

Where can I find more info about web clients? Possibly, any samples???

Thanks for replying!

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 10 replies
  • 1994 views
  • 0 likes
  • 3 in conversation