Extract from a variable a character string that is no longer than a specified length and that does not end in the middle of a word.
|Featured Step||DATA step|
|Featured Step Options and Statements||ANYPUNCT, ANYSPACE, LARGEST, and SUBSTR functions|
Data set WORKPLACE has comments from six employees.
WORKPLACE Obs comments 1 Cannot discuss work-related issues with my supervisor. 2 Need flex scheduling&job-sharing options. 3 Add closer parking areas. 4 Love the cafeteria 5 More programs for career advancement 6 Mentoring? Coaching? Either available?
Output 9.17 TRUNC_COMMENTS Data Set
Example 9.17 TRUNC_COMMENTS ...