06-18-2015 01:20 AM
Hi, I have DB2 Database table with table definitions stating column names are over 32 characters in length. I understand dataset names or variable names cannot be more than 32 in SAS. However is there a work around? Labelling is one option, but that does not form a part of the data structure as I read a SAS dataset and populate into database table. Can anybody help?
06-18-2015 02:22 AM
No, you can not have dataset names longer than 32 bytes, even in 9.4:
So your only option is to set up consistent rules for converting overlong table names when importing into SAS.
A similar "rule" is in place here for column names. DB/2 columns that have a "#" at the end of their name have that converted to an underline in SAS
06-18-2015 02:51 AM
validvarname=any just allows use of name literals ('xxyy zz#$'n), but does not extend the length. This is probably rooted in the inner structure of the dataset header page.
06-18-2015 04:00 AM
This issue comes up a lot. Even if SAS sticks with 32 character names for SAS datasets but enables reading of tables from other databases with longer names using other than SQL PASSTHRU would be an improvement.
Vote for this idea to encourage better solutions: https://communities.sas.com/ideas/3506