资源描述:
《exporting your data》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、CHAPTER9ExportingYourData9.1MethodsforExportingYourData2629.2WritingFilesUsingtheExportWizard2649.3WritingDelimitedFileswiththeEXPORTProcedure2669.4WritingPCFileswiththeEXPORTProcedure2689.5WritingRawDataFileswiththeDATAStep2709.6WritingDelimitedandHTMLFilesU
2、singODS2729.7SharingSASDataSetswithOtherTypesofComputers274262TheLittleSASBook9.1MethodsforExportingYourDataInoureverincreasinglycomplexworld,peopleoftenneedtotransferdatafromoneapplicationtoanotherorfromonetypeofcomputertoanother.Fortunately,SASgivesyoumanyo
3、ptionsfordoingthis.ExportingdatatootherapplicationsThetypesoffilesthatyoucancreateandthemethodsavailableforcreatingthosefilesdependsonwhatoperatingenvironmentyouareusingandwhetheryouhaveSAS/ACCESSsoftware.Therearethreegeneralmethodsforexportingdatatootherappl
4、ications:createdelimitedortextfilesthattheothersoftwarecanread;createfilesinformatslikeHTML,RTF,orXMLthattheothersoftwarecanread;orwritethedataintheothersoftware’snativeformat.♦Nomatterwhatyourenvironment,youcanalwayscreatedelimitedfilesandmostsoftwarehasthea
5、bilitytoreadthesetypesofdatafiles.TheDATAstep,discussedinsection9.5,givesyouthemostcontrolovertheformatofyourfiles,butrequiresthemoststeps.TheExportWizard,discussedinsection9.2,andtheEXPORTprocedure,discussedinsection9.3,areeasytouse,butyouhavelesscontrolover
6、theresultandnoteveryonehasaccesstothesetools.TheOutputDeliverySystem(ODS),discussedinsection9.6,cancreatecomma-separatedvalues(CSV)filesfromanyprocedureoutputandasimplePROCPRINTwillproduceareasonablefileforimportingintootherprograms.♦UsingODS,discussedinsecti
7、on9.6,youcancreateHTML,RTF,andXMLfilesfromanyprocedureoutput.Manyapplicationscanreaddatainthesetypesoffiles.AlthoughwedonotcovercreatingRTFandXMLfilesforthispurpose,thegeneralmethodisthesameascreatingHTMLfiles.♦IfyouhaveSAS/ACCESSInterfacetoPCFiles,thenyoucan
8、createseveraldifferentfiletypesthatarecommonforPCapplications.BoththeExportWizard,discussedinsection9.2,andtheEXPORTprocedure,discussedinsection9.4,canproducePCfiles.Bycreatingthefilesint