BookmarkSubscribeRSS Feed
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.
Not applicable
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?

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

I appreciate your replying 🙂
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....

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?
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.
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!!!
If you are doing it from within a stored process, (which I'm not sure of), then you could check out this site:
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.

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.
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?

Not applicable
Hi, cynthia,

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

Thanks for replying!



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 10 replies
  • 3 in conversation