DataObject.WriteToFile

Prototypes

void WriteToFile( String sPathName )

Parameters

String sPathName
The fully qualified path and filename to which the DataObject should be written. See Remarks for more information.

Remarks

This method stores the DataObject in a file. The following types of files are supported:

Filename Extension File Type
.imx IMLPlus Matrix
.jmp JMP Data Table
.sas7bdat SAS Data Set

You cannot store a DataObject that contains both numeric and character data in an IMLPlus matrix file.

IML Studio cannot store all the information in a DataObject in a SAS data set because a DataObject contains variable and observation properties that are not supported by the SAS data set file format. IML Studio stores additional DataObject information in a special file that is given the extension .dmm (short for Data Model Metadata). When you use the Save As command or the method WriteToFile to store a DataObject in a data set file, IML Studio creates a .dmm file with the same root name as the data set and in the same directory.

For information about how the DataObject class supports SAS data set passwords, refer to Password Support.

Example
mData = { 20 165,
          30 170, 
          40 175, 
          50 180, 
          60 170, 
          70 160 }; 
mVarNames = { "Age", "Weight" };
declare DataObject dobj;
dobj = DataObject.Create( "Sample Data", mVarNames, mData, false );
dobj.WriteToFile( "C:\AgeWeightData.imx" );
See Also

DataObject.WriteToOtherServerDataSet
DataObject.WriteToServerDataSet