How can I display the entire name of my variables when they are in output. For example in my data step I put
if sex = 'M' then gender = 'male';
if sex = 'F' then gender = 'female';
if sex = 'U' then gender = 'unknown';
when this was outputed it showed up as gender
How can I get the entire word to show up in the output?
Actually, I think the data is correctly displayed...
I suspect you have created the GENDER variable in the input dataset without preassigning to it, the maximum possbible length.
You see, if you do not explicitly define a variable size, SAS will assume one of two things.
If it is a numerical var, it will be defined with the maximum length, being 8 bytes.
If it is a character var, it will be defined with the size of the first value assigned to it during execution.
In your case, I suspect the first value assigned to GENDER was 'male' which is 4 bytes long. From there, all other values where truncated to that size.