hi, i want to drop a variable called "global company id"
how can i drop this?
simnply saying:
data work1;
set base1 (drop = global company key);
run;
is not working. thank you
SAS doesn't usually allow variable names with spaces, so either the variable name is actually global_company_id, or if it actually has spaces you need to refer to it as "global company id"n.
thank you so much for your kind reply Reeze:
this is what i got from proc contents
11 at Num 8 F18.4 Assets - Total
12 capx Num 8 F18.4 Capital Expenditures
13 ceq Num 8 F18.4 Common/Ordinary Equity - Total
9 conm Char 57 $57. $57. Company Name
5 consol Char 2 $2. $2. Level of Consolidation - Company Annual Descriptor
22 costat Char 1 $1. $1. Active/Inactive Status Marker
when i view table i see Assets-total. is it possible to at instead of assets-total. it is very difficult to code by looking at the view table.
Your variable NAME is AT and that's what you should use in your code.
Your variable LABEL is Assets-Total
You can switch the view in SAS by going to View>Column Names, but this doesn't 'stick'.
Yes its a pain in the ass. Another option is to strip all labels from a dataset, but with truncated variable names that has its own problems.
I believe the following line will remove the labels from all variables.
attrib _all_ label = "";
If you use command instead of the point & click menu to open a data set: Vt <data set name goes here>;colnames; will open view table with names instead of labels.
Or better, open the Keys menu, default F9, and add a command to a key:
vt _last_; colnames;
Then pressing the key combination you selected will bring up the last created data set with column names.
Thanks, that's handy.
I'd still prefer an option to have the column names show by default rather than the labels.
Steps 1 through 4 here make the column names the default
http://listserv.uga.edu/cgi-bin/wa?A2=ind0708d&L=sas-l&P=6458
And if you want to sort the data in the tables or make data edits add openmode=edit
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.