SORRY! WHAT I TYPED ON THE ABOVE THREAD DOESN'T MAKE MUCH SENSE. I REWORDED MY QUESTION AND HERE THEY ARE:
----------------------------------------------------
libname mydata 'C:\SAS\programs\data';
libname library 'C:\SAS\programs\data';
proc format library = library;
value $code 'A','a'='GAS' 'B','b'='CONVENIENCE' 'C','c'='Bakery';
run;
data mydata.test; length BName $ 35 Date 6 A $ 1 B $ 1 C $ 1;
informat Date mmddyy6.;
format Date mmddyy10. A $code. B $code. C $code.;
run;
proc fsedit; run;
proc print data=mydata.test;
run;
If I run this code, the format are saved as they are, 'a' for GAS, etc.
------------------------------------------------------------
If I change the code from above to the following:
proc format;
value $code 'A','a'='GAS1' 'B','b'='CONVENIENCE1' 'C','c'='Bakery1';
run;
If I run the code here, all format are ended with 1. For 'a', it would be GAS1. So everything works out ok so far. But, if I delete everything I write, including the data I created and write a new program, the one below, it will actually reference the format here in this portion.
------------------------------------------------------------
Here are the code after I delete everything from above, including the format cat, data file, etc.
libname mydata 'C:\SAS\programs\data';
libname library 'C:\SAS\programs\data';
proc format library = library;
value $code 'A','a'='GAS' 'B','b'='CONVENIENCE' 'C','c'='Bakery';
run;
data mydata.test; length BName $ 35 Date 6 A $ 1 B $ 1 C $ 1;
informat Date mmddyy6.;
format Date mmddyy10. A $code. B $code. C $code.;
run;
proc fsedit; run;
proc print data=mydata.test;
run;
Ok. Now if I run the code, I should get 'a' for GAS and 'b' for CONVENIENCE right? But I actually got 'a' for GAS1 and 'b' for CONVENIENCE1 and 'c' for BAKERY1. My question is, how to write a format where your code will use the format that you've created? Becausae it doesn't matter how many new files I created, they will all use the format in the 2nd attempt. The only thing that works is the Date format. But that is not user defined. How do you use a user defined format?
Thanks!!!