use dentlab ,clear
//将dentlab.dta读入内存,如果原内存已经打开其他文件直接清除
list
// +----------------------------------------------------------+
// | name years fulltime recom |
// |----------------------------------------------------------|
// 1. | Y. Don Uflossmore 7.25 part time recommend |
// 2. | Olive Tu'Drill 10.25 full time recommend |
// 3. | Isaac O'Yerbreath 32.75 full time recommend |
// 4. | Ruth Canaale 22 full time recommend |
// 5. | Mike Avity 8.5 part time do not recommend |
// +----------------------------------------------------------+
//显示内容如上,其中fulltime和recom带取值标签
fdasave mydent2,replace
// . fdasave mydent2,replace
// file mydent2.xpt saved
// file formats.xpf saved
//用fdasave将它保存为SAS SPORT格式文件,不同的是,这次同时单独生成一个包含标签
//格式的文件
type mydent2.xpt
type formats.xpf
//显示新形成两个文件内容
// . type mydent2.xpt
// HEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!000000000000000000000000000000 SAS SAS SASLIB 6.06 bs
// > d4.2 31DEC22:20:13:4431DEC22:20:13:44
// > HEADER RECORD*******MEMBER HEADER RECORD!!!!!!!000000000000000001600000000140 HEADER RECORD*****
// > **DSCRPTR HEADER RECORD!!!!!!!000000000000000000000000000000 SAS MYDENT2 SASDATA 6.06 bsd4.2
// > 31DEC22:20:13:4431DEC22:20:13:44 HE
// > ADER RECORD*******NAMESTR HEADER RECORD!!!!!!!000000000400000000000000000000 ........NAME Name of dentist
// > ...... ..................................................................
// > ..YEARS Years practicing BEST ...... ......................................
// > ..............................FULLTIMEIs dentist full time? FTLAB ...... ..........
// > ..........................................................RECOM Recommend Quaddent? RECLAB
// > ...... .......!....................................................HEADER RECORD*******OBS HEADER
// > RECORD!!!!!!!000000000000000000000000000000 Y. Don UflossmoreAt..............A.......Olive Tu'Drill A�......
// > A.......A.......Isaac O'YerbreathB �.....A.......A.......Ruth Canaale B.......A.......A.......Mike Avity
// > A�......................
//
// . type formats.xpf
// HEADER RECORD*******LIBRARY HEADER RECORD!!!!!!!000000000000000000000000000000 SAS SAS SASLIB 6.06 bs
// > d4.2 31DEC22:20:13:4431DEC22:20:13:44
// > HEADER RECORD*******MEMBER HEADER RECORD!!!!!!!000000000000000001600000000140 HEADER RECORD*****
// > **DSCRPTR HEADER RECORD!!!!!!!000000000000000000000000000000 SAS FORMATS SASDATA 6.06 bsd4.2
// > 31DEC22:20:13:4431DEC22:20:13:44 HE
// > ADER RECORD*******NAMESTR HEADER RECORD!!!!!!!000000000300000000000000000000 ........FMTNAME
// > ...... ..................................................................
// > ..START ...... ......................................
// > ...........................(..LABEL ...... ..........
// > .................................................. HE
// > ADER RECORD*******OBS HEADER RECORD!!!!!!!000000000000000000000000000000 FTLAB 0 part time
// > FTLAB 1 full time RECLAB 0 do not
// > recommend RECLAB 1 recommend