Mnemonic Description
_SELOGNM The fileref is assigned to an invalid file.
_SWLNASN The fileref is not assigned.
SAS Data Set Messages
_DSENMR The TRANSACTION data set observation does not exist in
the MASTER data set.
_DSEMTR Multiple TRANSACTION data set observations do not exist
in MASTER data set.
_DSENOM No matching observation was found in MASTER data set.
_SEBAUTH The data set has passwords.
_SEBDIND The index name is not a valid SAS name.
_SEDSMOD The data set is not open in the correct mode for the specified
operation.
_SEDTLEN The data length is invalid.
_SEINDCF The new name conflicts with an index name.
_SEINVMD The open mode is invalid.
_SEINVPN The physical name is invalid.
_SEMBACC You do not have the level of access required to open the data
set in the requested mode.
_SENOLCK A record-level lock is not available.
_SENOMAC Member-level access to the data set is denied.
_SENOSAS The file is not a SAS data set.
_SEVARCF The new name conflicts with an existing variable name.
_SWBOF You tried to read the previous observation when you were on
the first observation.
_SWNOWHR The record no longer satisfies the WHERE clause.
_SWSEQ The task requires reading observations in a random order, but
the engine that you are using allows only sequential access.
_SWWAUG The WHERE clause has been augmented.
_SWWCLR The WHERE clause has been cleared.
%SYSRC Autocall Macro 189
Mnemonic Description
_SWWREP The WHERE clause has been replaced.
SAS File Open and Update Messages
_SEBDSNM The filename is not a valid SAS name.
_SEDLREC The record has been deleted from the file.
_SEFOPEN The file is currently open.
_SEINVON The option name is invalid.
_SEINVOV The option value is invalid.
_SEINVPS The value of the File Data Buffer pointer is invalid.
_SELOCK The file is locked by another user.
_SENOACC You do not have the level of access required to open the file
in the requested mode.
_SENOALL _ALL_ is not allowed as part of a filename in this release.
_SENOCHN The record was not changed because it would cause a
duplicate value for an index that does not allow duplicates.
_SENODEL Records cannot be deleted from this file.
_SENODLT The file could not be deleted.
_SENOERT The file is not open for writing.
_SENOOAC You are not authorized for the requested open mode.
_SENOOPN The file or directory is not open.
_SENOPF The physical file does not exist.
_SENORD The file is not opened for reading.
_SENORDX The file is not radix addressable.
_SENOTRD No record has been read from the file yet.
_SENOUPD The file cannot be opened for update because the engine is
read only.
_SENOWRT You do not have Write access to the member.
_SEOBJLK The file or directory is in exclusive use by another user.
190 Chapter 13 AutoCall Macros
Mnemonic Description
_SERECRD No records have been read from the input file.
_SWACMEM Access to the directory will be provided one member at a
time.
_SWDLREC The record has been deleted from file.
_SWEOF End of file.
_SWNOFLE The file does not exist.
_SWNOPF The file or directory does not exist.
_SWNOREP The file was not replaced because of the NOREPLACE
option.
_SWNOTFL The item pointed to exists but is not a file.
_SWNOUPD This record cannot be updated at this time.
Library/Member/Entry Messages
_SEBDMT The member type specification is invalid.
_SEDLT The member was not deleted.
_SELKUSR The library or library member is locked by another user.
_SEMLEN The member name is too long for this system.
_SENOLKH The library or library member is not currently locked.
_SENOMEM The member does not exist.
_SWKNXL You have locked a library, member, or entry, that does not
exist yet.
_SWLKUSR The library or library member is locked by another user.
_SWLKYOU You have already locked the library or library member.
_SWNOLKH The library or library member is not currently locked.
Miscellaneous Operations
_SEDEVOF The device is offline or unavailable.
_SEDSKFL The disk or tape is full.
_SEINVDV The device type is invalid.
%SYSRC Autocall Macro 191
Mnemonic Description
_SENORNG There is no write ring in the tape opened for Write access.
_SOK The function was successful.
_SWINVCC The carriage-control character is invalid.
_SWNODSK The device is not a disk.
_SWPAUAC Pause in I/O, process accumulated data up to this point.
_SWPAUSL Pause in I/O, slide data window forward and process
accumulated data up to this point.
_SWPAUU1 Pause in I/O, extra user control point 1.
_SWPAUU2 Pause in I/O, extra user control point 2.
Comparisons
The SYSRC autocall macro and the SYSRC automatic macro variable are not the same.
For more information, see “SYSRC Automatic Macro Variable” on page 223.
Example: Examining the Value of _IORC_
The following DATA step illustrates using the autocall macro SYSRC and the automatic
variable _IORC_ to control writing a message to the SAS log:
data big;
modify big trans;
by id;
if _iorc_=%sysrc(_dsenmr) then put 'WARNING: Check ID=' id;
run;
%TRIM and %QTRIM Autocall Macro
Trim trailing blanks.
Type: Autocall macro
Requirement: MAUTOSOURCE system option
Syntax
%TRIM(text | text-expression)
%QTRIM(text | text-expression)
192 Chapter 13 AutoCall Macros
Details
Note: Autocall macros are included in a library supplied by SAS. This library might not
be installed at your site or might be a site-specific version. If you cannot access this
macro or if you want to find out if it is a site-specific version, see your on-site SAS
support personnel. For more information, see “Storing and Reusing Macros” on page
115.
The TRIM macro and the QTRIM macro both trim trailing blanks. If the argument
contains a special character or mnemonic operator, listed below, use %QTRIM.
QTRIM produces a result with the following special characters and mnemonic operators
masked so that the macro processor interprets them as text instead of as elements of the
macro language:
& % ' " ( ) + − * / < > = ¬ ~ ; , # blank
AND OR NOT EQ NE LE LT GE GT IN
Examples
Example 1: Removing Trailing Blanks
In this example, the TRIM autocall macro removes the trailing blanks from a message
that is written to the SAS log.
%macro numobs(dsn);
%local num;
data _null_;
set &dsn nobs=count;
call symput('num', left(put(count,8.)));
stop;
run;
%if &num eq 0 %then
%put There were NO observations in %upcase(&dsn).;
%else
%put There were %trim(&num) observations in %upcase(&dsn).;
%mend numobs;
%numobs(sample)
Invoking the NUMOBS macro generates the following statements:
DATA _NULL_;
SET SAMPLE NOBS=COUNT;
CALL SYMPUT('num', LEFT(PUT(COUNT,8.)));
STOP;
RUN;
If the data set Sample contains six observations, then the %PUT statement writes this
line to the SAS log:
There were 6 observations in SAMPLE.
Example 2: Contrasting %TRIM and %QTRIM
These statements are executed January 28, 1999:
%let date=%nrstr( &sysdate );
%put *&date* *%qtrim(&date)* *%trim(&date)*;
The %PUT statement writes this line to the SAS log:
%TRIM and %QTRIM Autocall Macro 193
..................Content has been hidden....................

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