04-20-2014 11:46 PM
hi, i want to drop a variable called "global company id"
how can i drop this?
set base1 (drop = global company key);
is not working. thank you
04-20-2014 11:57 PM
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.
04-21-2014 12:02 AM
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.
04-21-2014 12:06 AM
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 = "";
04-21-2014 11:05 AM
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.