Hi, I was reading Scan function on support site (SAS(R) 9.2 Language Reference: Dictionary, Fourth Edition) . It is written that, In a DATA step, if the SCAN function returns a value to a variable that has not yet been given a length, then that variable is given a length of 200 characters. If you need the SCAN function to assign to a variable a word that is longer than 200 characters, then you should explicitly specify the length of that variable. But when I am executing the below data steps data test1; title = 'Writing as much Macros as possible so that they can be used in other modules as well.'; word=scan(title,1,' '); run; data test2; word=scan('Writing as much Macros as possible so that they can be used in other modules as well.',1,' '); run; The length of variable word in both the data sets is 85 . I just need to understand why is the length not 200 and 85.
... View more