DataObject.WriteVarsToOtherServerDataSet

Prototypes

void WriteVarsToOtherServerDataSet( Matrix mVarNames, String sServerName, String sLibref, String sDataSetName <, boolean bExcludeObsNotInAnalysis> )

void WriteVarsToOtherServerDataSet( String[] asVarNames, String sServerName, String sLibref, String sDataSetName <, boolean bExcludeObsNotInAnalysis> )

Parameters

Matrix mVarNames
A character matrix containing the names of the variables you want to copy from the DataObject to the data set on the server.

String[] asVarNames
The names of the variables you want to copy from the DataObject to the data set on the server.

String sServerName
The name of the server on which the data set will be stored. This name must either be "My SAS Server" (which refers to the installation of SAS on your computer) or the name of a logical SAS Workspace Server defined in the SAS Metadata Server.

String sLibref
The libref of the library in which the data set will be stored. See Remarks for additional details.

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

boolean bExcludeObsNotInAnalysis
If bExcludeObsNotInAnalysis is true, observations that are excluded from analysis are not copied to the data set. If bExcludeObsNotInAnalysis is false, all observations are copied to the data set. Calling this method without specifying the bExcludeObsNotInAnalysis parameter is equivalent to calling it with bExcludeObsNotInAnalysis equal to false.

Remarks

This method copies specific variables from a DataObject to a data set on a server. The server may or may not be the server running the IMLPlus program. The only component of SAS that must be installed on the server is Base.

You cannot use this method to store a data set in the WORK library on the specified server because the WORK library accessed by this method will disappear immediately. To store a data set in the WORK library on the server running the IMLPlus program, use the method WriteVarsToServerDataSet.

Unlike the method WriteToOtherServerDataSet, this method does not create a .dmm file.

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

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

Example
declare DataObject dobj;
dobj = DataObject.CreateFromFile( "baseball" );
vars = { "no_hits", "no_runs" };
dobj.WriteVarsToOtherServerDataSet(
    vars, 
    "My SAS Server", 
    "sasuser", 
    "baseball_subset" ); 
See Also

WriteVarsToServerDataSet