Hi All,
I've a dataset called test which have three varibales ID, Q1 and Q2. While exporting dataset into CSV format with the label name label names not appers in output file,only varibale original name appers in output . i'm using below code
proc export data=readin outfile="\\path\read.csv"
dbms=csv Replace;
LABEL Q1="QUA 1" Q2="QUA 2";
run;
Thank you to all in advance !!!
Actually it does support the label statement but there are two things wrong wrong with your code:
1. It only supports variable labels on the data set - you can't change them during the Proc Expand; and
2. You've put your label statement in the wrong place - it goes BEFORE the first semi-colon e.g.
proc export data=sashelp.cars outfile="/folders/myshortcuts/Dropbox/cars.csv" label ;
dbms=csv;
run;
You're right @ChrisNZ it is actually an option in Proc Export and not a statement - i admit I sometimes tend to use the terms interchangeably 🙂
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.