SAS IntrNet Server
SYSPROCESSNAME Automatic Macro Variable
Contains the process name of the current SAS process.
Type: Automatic macro variable (read only)
Example: Using SYSPROCESSNAME to Display the
Current SAS Process Name
The following statement writes the name of the current SAS process to the log:
%put &sysprocessname;
If you submit this statement in the SAS windowing environment of your second SAS
session, the following line is written to the SAS log:
DMS Process (2)
SYSPROCNAME Automatic Macro Variable
Contains the name of the procedure (or DATASTEP for DATA steps) currently being processed by the SAS
Language Processor.
Type: Automatic macro variable (read only)
Details
The value of SYSPROCNAME contains the name of the procedure specified by the user
in the PROC statement until a step boundary is reached.
SYSRC Automatic Macro Variable
Contains the last return code generated by your operating system.
Type: Automatic macro variable (read and write)
See: “Automatic Macro Variables in UNIX Environments” in SAS Companion for UNIX
Environments
“Automatic Macro Variables” in SAS Companion for Windows
“Macro Variables” in SAS Companion for z/OS
Details
The code returned by SYSRC is based on commands that you execute using the X
statement in open code, the X command in a windowing environment, or the
SYSRC Automatic Macro Variable 223
%SYSEXEC, %TSO, or %CMS macro statements. Return codes are integers. The
default value of SYSRC is 0.
You can use SYSRC to check the return code of a system command before you continue
with a job. For return code examples, see the SAS companion for your operating
environment.
SYSSCP and SYSSCPL Automatic Macro Variables
Contain an identifier for your operating environment.
Type: Automatic macro variable (read only)
See: “Automatic Macro Variables in UNIX Environments” in SAS Companion for UNIX
Environments
“Automatic Macro Variables” in SAS Companion for Windows
“Macro Variables” in SAS Companion for z/OS
Details
SYSSCP and SYSSCPL resolve to an abbreviation of the name of your operating
environment. In some cases, SYSSCPL provides a more specific value than SYSSCP.
You could use SYSSCP and SYSSCPL to check the operating environment to execute
appropriate system commands.
The following table lists some of the values for SYSSCP and SYSSCPL. If your
operating environment is not listed, refer to your host companion documentation.
Table 14.10 SYSSCP and SYSSCPL Values for Platforms Running SAS 9.2 or Later
Platform SYSSCP Value SYSSCPL Value
z/OS OS z/OS
VMI or OpenVMS on
Itanium - supported for SAS
Foundation only
VMS ITAN OpenVMS
UNIX
HP-UX PA-RISC or H64 HP 64 HP-UX
H61 or HP-UX IPF or HP-
UX on Itanium
HP IPF HP-UX
LAX or LINUX on X64
(x86-64)
LIN X64 LINUX or Linux
LNX or LINUX or LINUX
32-bit (x86)
LINUX LINUX or Linux
R64 or AIX64 or AIX on
POWER
AIX 64 AIX
224 Chapter 14 Automatic Macro Variables
Platform SYSSCP Value SYSSCPL Value
S64 or SUN64 or Solaris on
SPARC
SUN 64 SUNOS or SunOS
SAX or Solaris 10 on X64
(x86-64)
SUN X64 SUNOS or SunOS
Windows
Windows XP Pro WIN XP_PRO
Windows Server 2003 WIN NET_SRV
Windows Enterprise Server
2003
WIN NET_ASRV
Windows Data Center Server
2003
WIN NET_DSRV
Windows XP Pro x64 WIN X64_PRO
Windows Server 2003 x64 WIN X64_SRV
Windows Enterprise Server
2003 x64
WIN X64_ESRV
Windows Data Center Server
2003 x64
WIN X64_DSRV
Windows 7 WIN W32_7PRO
Windows Server 2008 WIN W32_SRV08
Windows Enterprise Server
2008
WIN W32_ESRV08
Windows Data Center Server
2008
WIN W32_DSRV08
Windows 7 x64 WIN X64_7PRO
Windows Server 2008 x64 WIN X64_SRV08
Windows Enterprise Server
2008 x64
WIN X64_ESRV08
Windows Data Center Server
2008 x64
WIN X64_DSRV08
Windows Server 2008 R2 x64 WIN X64_S08R2
SYSSCP and SYSSCPL Automatic Macro Variables 225
Platform SYSSCP Value SYSSCPL Value
Windows Enterprise Server
2008 R2 X64
WIN X64_ES08R2
Windows Data Center Server
2008 R2 x64
WIN X64_DS08R2
Windows Server 2008
Itanium
WIN W64_ESRV08
Windows Itanium Enterprise
Server 2003 or W64_ASRV
WIN W64_ASRV
Windows Itanium Data
Center Server 2003 or
W64_DSRV
WIN W64_DSRV
Windows Itanium Server
2003
WIN W64_SRV
Windows 8 Professional and
Enterprise
WIN X64_8PRO
Windows 8 WIN X64_8HOME
Windows Server 2012 Data
Center
WIN X64_DSRV12
Windows Server 2012 WIN X64_SRV12
Example: Deleting a Temporary File on a Platform
Running SAS
The macro DELFILE locates the platform that is running SAS and deletes the TMP file.
FILEREF is a global macro variable that contains the fileref for the TMP file.
%macro delfile;
%if /* HP Unix */&sysscp=HP 64 or &sysscp=AIX 64
%then
%do;
X "rm &fileref..TMP";
%end;
%else %if /* DOS-LIKE PLATFORM */&sysscp=WIN
%then
%do;
X "DEL &fileref..TMP";
%end;
%mend delfile;
226 Chapter 14 Automatic Macro Variables
SYSSCPL Automatic Macro Variable
Contains the name of your operating environment.
Type: Automatic macro variable (read only)
See: “Automatic Macro Variables in UNIX Environments” in SAS Companion for UNIX
Environments
“Automatic Macro Variables” in SAS Companion for Windows
“Macro Variables” in SAS Companion for z/OS
Details
See “SYSSCP and SYSSCPL Automatic Macro Variables” on page 224
SYSSITE Automatic Macro Variable
Contains the number assigned to your site.
Type: Automatic macro variable (read only)
Details
SAS assigns a site number to each site that licenses SAS software. The number is
displayed in the SAS log.
SYSSIZEOFLONG Automatic Macro Variable
Contains the length in bytes of a long integer in the current session.
Type: Automatic macro variable (read only)
Details
The SYSSIZEOFLONG automatic macro variable contains the length of a long integer
in the current SAS session.
SYSSIZEOFPTR Automatic Macro Variable
Contains the size in bytes of a pointer.
Type: Automatic macro variable (read only)
Details
The SYSSIZEOFPTR automatic macro variable contains the size in bytes of a pointer.
SYSSIZEOFPTR Automatic Macro Variable 227
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset