/*
Post_title:
Labelling my data with labels corrected in a CSV file.
Link to post:
https://communities.sas.com/t5/SAS-Programming/Labelling-my-data-with-labels-corrected-in-a-CSV-file/m-p/775060
Important post details:
The csv file is just two collums, one with the variable names and one with the labels.
*/
*if you are using SAS OnDemand for Academics (ODA)
change your-userid-on-oda for your userid
if you are using another option then change
/home/your-userid-on-oda/ for a path/folder
you can use;
%let mypath = /home/your-userid-on-oda/;
data work.dataset_with_labels;
variable_name = "abc";
variable_label = "label-for-abc";
run;
proc export data = work.dataset_with_labels
outfile = "&mypath.dataset_with_labels.csv"
replace;
run;
proc import datafile = "&mypath.dataset_with_labels.csv"
out = work.imported_dataset_with_labels
replace;
run;
Does this make sense for you?
Best regards, Jos
... View more