06-10-2013 02:03 PM
Hi, I know it is possible to change EXISTING sas dataset labels using PROC DATASETS, but I am wondering if a smiliar capability exists using PROC SQL. I realize that you can CREATE a sas dataset with a label. Thanks in advance. Please supply syntax with answer (if there is one!).
06-10-2013 03:25 PM
Maybe not for a simple operation like a change of label. In a little test I just ran, the modify time of my dataset is two minutes later than the create time... For that to happen, SAS would have to set the create time of the new copy of the dataset to the create time of the old copy. Possible, but unlikely.
06-11-2013 02:35 AM
I don't think haves a wish, more of a concern...?
Did some tests as well. My conclusion is when you change table metadata that only resides in the header of the file, the table isn't recreated. This goes for labels, formats and informats.
Other changes that changes the structure of the data part of the file will force a recreation of the table. This will include operations such as changing columns length, column type (not available in alter table), adding or dropping columns.
When we are at it, for it would seem naturally to have the opportunity to change columns names using alter table. The doc says this can be done using the rename= ds option. But I haven't seen any examples on how to us this together with alter table. My guess that this suggestion has to be used together with create table, or am I missing something obvious...?