DataObject.WriteToServerDataSet

Prototypes

void WriteToServerDataSet( String sLibrefDotDataSetName )

void WriteToServerDataSet( String sLibref, String sDataSetName )

Parameters

String sLibrefDotDataSetName
A string of the form "libref.member" that specifies the data set in which the DataObject will be stored. You do not need to specify the libref if it is WORK.

String sLibref
The libref of the library in which the DataObject will be stored.

String sDataSetName
The name of the data set in which the DataObject will be stored. If the specified data set already exists, it will be overwritten.

Remarks

This method stores the DataObject in a data set on the server running the IMLPlus program.

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 dialog box 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. In the case of storing a DataObject in a data set on a server, however, IML Studio cannot store the .dmm file on the server. Instead, IML Studio stores the .dmm file in the following location on the client computer:

LocalAppData\SAS\IML Studio\Server Data\~ServerName\~Libref

where LocalAppData is usually

Windows 7 C:\Users\userid\AppData\Local
Windows 8 C:\Users\userid\AppData\Local
Windows 10 C:\Users\userid\AppData\Local

and where userid is the user's Windows user name. The ~ character is added to prevent name conflicts with Windows device names such as AUX, PRN, etc.

Note that IML Studio only creates a .dmm file if the libref used to store the data set is a persistent libref other than WORK. Persistent librefs include the following:

IML Studio does not create a .dmm file if you use the following librefs to store a data set:

If the libref is not assigned but the library is defined in the SAS Metadata Server, IMLPlus will assign the libref using the Metadata LIBNAME Engine.

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

Example
Names = { "John",
          "Mary",
          "Steve",
          "Jane" };
Scores = { 92,
           90,
           94,
           98 };
declare DataObject dobj;
dobj = DataObject.Create( "Example" );
dobj.AddVar( "Name", Names );
dobj.AddVar( "Score", Scores );
dobj.WriteToServerDataSet( "sasuser.StudentScores" );
See Also

DataObject.WriteToFile
DataObject.WriteToOtherServerDataSet