Usage Note 43471: How to get the SAS® Stored Process Server host name and port number when running a request
When running a SAS® Stored Process, you can get the computer host name and the TCP/IP port number of the SAS® Stored Process Server that executed the request. This example SAS Stored Process code illustrates an approach to get the host name and port number.
/* Get the Host Name and Port Number of the */
/* Stored Process Server that executed this request. */
data _null_;
format obparms $char1000.;
obparms=getoption('objectserverparms');
x1 = index(obparms,"port=");
port = substr(obparms,x1+5);
x1 = index(port," ");
port = substr(port,1,x1);
call symput('_PORT',trim(left(put(port,6.))));
host =sysget('COMPUTERNAME'); /* Use this statement on WINDOWS */
/* host =sysget('HOST'); */ /* Use this statement on UNIX */
call symput('_SERVER',trim(left(put(host,$80.))));
run;
data _null;
file _webout;
put '<HTML>';
put '<H2>Stored Process Server Host Name and Port Number</H2>';
put "<br>The Server Host Name is: &_SERVER";
put "<br>The Server Port Number is: &_PORT";
put '</HTML>';
run;
Operating System and Release Information
SAS System | SAS Integration Technologies | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M0 | |
Microsoft Windows XP 64-bit Edition | 9.2 TS2M0 | |
Microsoft® Windows® for x64 | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 for x64 | 9.2 TS2M0 | |
Microsoft Windows Server 2008 for x64 | 9.2 TS2M0 | |
Microsoft Windows XP Professional | 9.2 TS2M0 | |
Windows Vista | 9.2 TS2M0 | |
Windows Vista for x64 | 9.2 TS2M0 | |
64-bit Enabled AIX | 9.2 TS2M0 | |
64-bit Enabled HP-UX | 9.2 TS2M0 | |
64-bit Enabled Solaris | 9.2 TS2M0 | |
HP-UX IPF | 9.2 TS2M0 | |
Linux | 9.2 TS2M0 | |
Linux for x64 | 9.2 TS2M0 | |
Solaris for x64 | 9.2 TS2M0 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Linux on Itanium | 9.1 TS1M3 SP4 | |
Tru64 UNIX | 9.1 TS1M3 SP4 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When running a SAS® Stored Process, you can get the computer host name and the TCP/IP port number of the
SAS Stored Process Server that executed the request.
Date Modified: | 2011-06-29 16:42:03 |
Date Created: | 2011-06-08 22:30:12 |