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 Increment and Decrement Operators
- Problem in comparing Floating point numbers and how to compare them correctly?
- Control Structures in Programming Languages
- I Can't Use Logic In Programming. What Should I Do?
- 7 Tips To Write Clean And Better Code in 2020
- I Can’t Do Computer Programming – 7 Common Myths You Must Know
- Find all the possible remainders when N is divided by all positive integers from 1 to N+1
- Hello World Program : First program while learning Programming
- 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
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.