Ok a bit of background information. I have been programming SAS for six years now, and I have never came accross anything like this. this dataset consists of 3000 variables; all of them get a format assigned, which is basically named like the variable, and those which end with a number, get an F attached. Then, in one program I do the following:
proc format;
value LBWSAM01F
1 = '1 Pilot cohort'
2 = '2 Main cohort'
;
RUN;
DATA test1 ;
SET dataset.small;
KEEP lbwsam01;
FORMAT lbwsam01 lbwsam01F.; /*checking column attributes the format SAS attaches is called lbwsam0114.*/
RUN; /*no error message in the log, but opening test1, the formats are not assigned*/
Proc TAbulate data=test1;
class lbwsam01;
table lbwsam01;
RUN; /*the output table is using the right formats, as if they were assigned*/
PRoc contents data=test1; /*it says lbwsam01f is assigned*/
RUn;
Then, I open the dataset (test1). Depending on how you have SAS organised, I have my libraries on the left hand side, I open my temporary library (work) find the dataset test1, double click and straight away I can see it open in a spread sheet...without formats assigned, which means I only see the values 1 and 2, instead 1 Pilot Cohort, 2 Main Cohort. If I then right click on the column, I get to my column attributes and can see the name of the format attached, which is lbwsam0114...
I wouldn't worry too much about it and change simply the format name, but I have a couple of hundred variabels for which I experience this problem...so I'd rather know what's going on, also it's a longitudinal dataset...so more to come. I have sent this little program and a part of the dataset 'small' to another SAS programmer, and he has experienced the same problems and cannot understand it. I'm happy to send it to you, email me
[email protected] as I don't think I can upload it here somehow...or can I?!