Formats are useful for labeling output. It is easiest if one has the formats separate from the rest of the input program. This allows one to add additional formats to recoded variables at a later time.
The first file, called test.fmt reads in the labels for sex. The format is fsex.
libname test '/usr/work/lisan/shared/extract';
options ls=80 ps=60;
proc format fmtlib library=test cntlout=dsfmt;
value fsex 1 = 'male'
2 = 'female';
run;
quit;
To invoke this program:
\sas test.fmt
If, you need to add more labels to my variables, edit the file, test.fmt, and then re-compile the program with \sas test.fmt.
The input file for reading the raw data and associating the data with the formats is as follows:
libname test '/usr/work/lisan/shared/extract'; libname library '/usr/work/lisan/shared/extract'; data test.test; infile '/usr/work/lisan/shared/extract/test.dat'; input sex 1-1; format sex fsex.; proc freq; tables sex; run;
Submit this program via the queue. The results will be an output file with labeled frequencies and a sas system file.
Recent resources, events, news
Farley. "Kerner Report plus 40 Years." PSC Research Report.
Galea et al. "Longitudinal Predictors of Post-traumatic Stress"
Monday, Oct 13
Jamie Jones
"Fertility & Risk Aversion on Utah Frontier"
W A R N I N G
If you are reading this, it may be that you are using rather old web browsing software that does not support modern international Web technology standards. For a better experience of the Web and this site in particular, please upgrade your web browser software today. The following are good choices: Firefox 2; Opera 9; Safari 3.