05-22-2018 01:57 AM
declare hash hwork(dataset: 'TABLENAME' );
05-22-2018 04:20 AM - edited 05-22-2018 04:21 AM
Thanks for your reply, but unfortunately that can not solve my question.
For example, I attached sample program and log-file, could you check them?
In this case, 1st data step has made the dataset "name('%')" correctly.
But the next data step has been failed at L.15 and L.16 .
** I tried to use %bquote and %superq functions, but they confused me ...
I really hope your kindest helps.
05-22-2018 05:37 AM
You can avoid all that pain in a very simple way by using standard SAS names (letters, digits, underlines) and avoiding the 'some crazy stuff'n construct. Put fancy descriptions and characters in labels, where they belong. This will make your future SAS life much easier.
a month ago
As Kurt mentions it might be best to avoid using the special characters such as % in your variable names. Particularly as these are special tokens that SAS parses at compile time unless they are escaped appropriately. I'm not sure whether they can be escaped in the hash object definitions. There seems to be some rules to be aware of when working with hash objects and that % is a special character - see the last point at http://support.sas.com/documentation/cdl/en/lecompobjref/63327/HTML/default/viewer.htm#n1f2an4fc14u4...
FYI, one of my favourite SAS documentation sections on how SAS processes a program and special tokens which might be helpful is http://support.sas.com/documentation/cdl/en/mcrolref/62978/HTML/default/viewer.htm#p1lpbl12k9hhkxn1m...