We can use ampersand (&) to notify SAS to read the variable until there are two or more spaces encounter as a delimiter. This technique is always useful when the variable contains two or more words.
Actual Input: "Geeks for Geeks" Expected Input: "GeeksforGeeks"
Example 1: There are 2 spaces before 25, 32 and 30 in example code below.
Example 2: When a variable contains 2 or more than 2 words.
- In this scenario, we have a space between First Name and Last Name and we want to store both the first and last names in a single variable.
In this case, Colon modifier (:) does not work for a variable having multiple words.
- SAS | How to read character of varying length using COLON Modifier
- Difference between Functional Programming and Object Oriented Programming
- Program to implement Logic Gates
- Which Programming Language Should I Choose as a Beginner?
- Arrow operator -> in C/C++ with Examples
- 12 Reasons Why You Should Learn Python in 2019
- 5 Most Difficult Programming Languages of the World
- Object Oriented Programming in Ruby | Set-2
- Difference Between Programming, Scripting, and Markup Languages
- Walrus Operator in Python 3.8
- 7 Tips and Tricks to Learn Programming Faster
- Object-Oriented Programming in Ruby | Set 1
- SAS : How to Display Current Date?
- SAS | Delete Empty Rows
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.