sas在import带有长字符串字符时如何防止被截断
方法一:设置sas软件的默认guessingrows:
open SAS 9.4, and in the command line – in the upper left corner of the screen – type regedit. Then navigate to Products–>BASE–>EFI–>GuessingRows and set the value to the number of rows in the CSV or Excel file you want SAS to scan to find the longest value. I chose 1000, because I knew I wouldn’t have more than 1000 rows in an Excel file, but you could increase it up to 2147483647 (or MAX), although SAS documentation recommends not to, as it might adversely affect performance. I saw no performance hit ater I changed it to 1000.
方法二:在代码中使用TEXTSIZE
scans the length of text data for a data source column and uses the length of the longest string data that it finds as the SAS column width. However, if the maximum length that it finds is greater than what is specified in the TEXTSIZE= option, then the smaller value that is specified in TEXTSIZE= will be applied as the SAS variable width.
方法来自网友问答。