Usage Note 19429: FINDW FUNCTION with 'e' modifier provides the number of the word in a
string
The FINDW FUNCTION is available beginning in SAS 9.2. It returns the
character position of a word in a string, or returns the number of the
word in a string.
The 'e' modifier is used as the third parameter to return where the supplied word in argument two is found
in the String variable, as in this example:
data _null_;
string='Artists from around the country display their art at
an art festival.';
result=findw(string,'art',' ','E');
put result=;
run;
SAS writes the following output to the log because the word "art" is the eighth word in the String variable:
result=8
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows XP Professional | 9.2 | | | |
| Microsoft Windows XP 64-bit Edition | 9.2 | | | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 | | | |
| Microsoft Windows Server 2003 Standard Edition | 9.2 | | | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 | | | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 | | | |
| Microsoft Windows 2000 Professional | 9.2 | | | |
| Microsoft Windows 2000 Server | 9.2 | | | |
| Microsoft Windows 2000 Datacenter Server | 9.2 | | | |
| Microsoft Windows 2000 Advanced Server | 9.2 | | | |
| 64-bit Enabled Solaris | 9.2 | | | |
| Solaris | 9.2 | | | |
| Solaris for x64 | 9.2 | | | |
| z/OS | 9.2 | | | |
| Linux | 9.2 | | | |
| HP-UX | 9.2 | | | |
| HP-UX IPF | 9.2 | | | |
| 64-bit Enabled HP-UX | 9.2 | | | |
| OpenVMS Alpha | 9.2 | | | |
| 64-bit Enabled AIX | 9.2 | | | |
| Tru64 UNIX | 9.2 | | | |
| AIX | 9.2 | | | |
*
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.
| Type: | Usage Note |
| Priority: | |
| Topic: | SAS Reference ==> Functions
|
| Date Modified: | 2020-05-27 08:24:10 |
| Date Created: | 2007-01-25 13:07:44 |