Type of Tool | SAS Utility Macro |
SAS Utility Macro | Tool/Utility |
Title | Create Next Word |
Programmer/Email | ArthurWatts |
Contributing Site | Rochester |
Description | Macro function NextWord returns the first word from a string, and removes the first word from the list |
Classification Graph Type | |
References | |
Datasets | |
Data | |
Software Program | SAS |
Software | SAS |
Macro Parameters | The macro parameter is: string = a string of words. |
R-Code - Attachment | |
R-Code | |
SAS-Code - Attachment | Rochester_Create Next Word_Main Macro |
SAS-Code | %Macro NextWord(string); %Let space=%Index(&&&string,%Str( )); %Let size=%Length(&&&string); %If %Eval(&space)>0 %Then %Do; %Let NextWord=%Substr(&&&string,1,&space); %Let &string=%Substr(&&&string,&space+1,&size-&space); %End; %Else %Do; %Let NextWord=&&&string; %Let &string= ; %End; &NextWord %Mend NextWord; |
Stata-Code - Attachment | |
Stata-Code | |
Other Code - Attachment | |
Other Code | |
Called Data Manipulation | |
Called Tool/Utility | |
Called Checking Macro | |
Called Other | |
Creation-Date | |
Revision-Date | |
Example Code | SAS Example Code |
Example Output | |
SAS Examples | |
SAS_Example_Code | example: %Let next=%NextWord(string) ; |
SAS_Example_Output | |
R Examples | |
R_Example_Code | |
R_Example_Output | |
Stats Examples | |
Special Features | |
Special Features Attached | |
Special Features Text | |
Notes1-Legend | Section with calls to needed macros |
Notes1 | |
Notes2-Legend | Macro call with fully specified parameters |
Notes2 | |
Notes3-Legend | Section with definitions of global macro parameters |
Notes3 | |
Notes4-Legend | Section with definitions of local macro variables |
Notes4 | |
See Also | |
Checklists | |
Stat Tools Disclaimer | |
Discliamer | The views expressed within CTSpedia are those of the author and must not be taken to represent policy or guidance on the behalf of any organization or institution with which the author is affiliated. |
Permission | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT OLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Reference Image |