libname ABCDEFGH postgres server="Server_Address.com" port=5432 user=kevin password="P@ssW0rd" database=DBName schema=SchemaName; Data work.my_data_file; Result 1 = length(' hello '); Result 2 = lengthc(' hello '); Result 3 = lengthm(' hello '); Result 4 = lengthn(' hello '); run; proc print data=my_data_file; run; |
What's happening in the script above?
Round | Input | Output | Description |
---|---|---|---|
Length | hello | 6 | Returns the length of a string; trailing blanks excluded; returns 1 for blanks. |
Lengthc | hello | 7 | Returns the length of a string; trailing blanks included. |
Lengthm | hello | 7 | Returns the number of bites |
Lengthn | hello | 6 | Returns the length of a string; trailing blanks excluded. |
Kevin Regan
Have an article, idea, found a typo, want to contribute? Shoot me an email
Here
Below are links to some Udemy Data Science Courses. I've been using Udemy for a number of years now, and I've found their courses super helpful, maybe you will also.