Data Management Object Model Reference

IJob Members

IJob overview

Public Instance Properties

CurrentDirectory Set the working directory for the job.
CurrentInputDataSource The current input data source
Errors A string a containing the validation errors seperated by CR/LF
EventHandlers This property returns a collection of output datasource objects
GlobalVariables Description: This property returns the Job's global variables collection. Examples: To return the Job's global variables collection: Job.GlobalVariables.Item["SomeVar"] Job.GlobalVariables["SomeVar"] Job.GlobalVariables.SomeVar To add an object to the collection: Dim somevalue somevalue=CreateObject("SomeValue") Job.GlobalVariables.Add("SomeNewVar",somevalue) Note: Only the syntax Job.GlobalVariables.SomeVar = SomeValue can be used to SET the value of a global variable.
GlobalVariablesSections This property returns a collection of global variable section objects
IgnoreBadCases Setting this to true enables a transformation to continue despite writing of a record failed Setting this to false would make the transformation stop when a write fails Default value is true
InputDataSources This property returns a collection object that contains input datasource objects
IsDebug IsDebug is True if the DMOM is running within the mrStudio debugger.
Log Description: Return the Logging component Remarks: The Logging object can be accessed in either of the following ways: Log.LogFatal("Some Fatal Error") Job.Log.LogFatal("Some Fatal Error")
MetaDataScript This property returns a collection object that contains metadata script section objects
OutputCaseNumber The current output case number
OutputDataSources This property returns a collection object that contains output datasource objects
Questions Description: This property returns the Job's Questions collection. Example: Dim response response=Job.Questions.Q1.Response
TableDocument Default Table document i.e. the Table document assigned to the first output datasource
TableDocuments Table documents collection, containing one Table document per output datasource
TempDirectory Get or set the temporary directory for the job
TransformedInputMetaData Description: Returns a collection of input metadata filenames, one for each input data source. Example: In a DMS Script this could be done as: InputDataSource(SomeInput, the output) ConnectionString = Provider...... . . End InputDataSource Event (OnAfterMetaDataTransformations, dddd) 'accesssing the weight engine by output datasource name Dim weName Set weName=Job.TransformedInputMetaData["SomeInput"] 'accesssing the weight engine by by ordinal Dim weOrdinal Set weOrdinal=Job.TransformedInputMetaData[0] End Event
TransformedOutputMetaData Description: Returns a collection of output metadata filenames, one for each input data source. Example: In a DMS Script this could be done as: OutputDataSource(SomeOutput, the output) ConnectionString = Provider...... . . End OutputDataSource Event (OnAfterMetaDataTransformations, dddd) 'accesssing the weight engine by output datasource name Dim weName Set weName=Job.TransformedOutputMetaData["SomeOutput"] 'accesssing the weight engine by by ordinal Dim weOrdinal Set weOrdinal=Job.TransformedOutputMetaData[0] End Event
Warnings A string a containing the validation warnings seperated by CR/LF
WeightEngine Description: This property returns the interface pointer to the weight engine interface for the first output data source. There is a limitation that WeightEngine can’t be initialized when the first output data source is Csv format, thus WeightEngine is not usable. Example: Dim we we=Job.WeightEngine
WeightEngines Description: Returns a colletcion of weight engines, one for each output data source. Example: In a DMS Script this could be done as: OutputDataSource(SomeOutput, the output) ConnectionString = Provider...... . . End OutputDataSource Event (OnJobStart, job start) 'accesssing the weight engine by output datasource name Dim weName Set weName=Job.WeightEngines["SomeOutput"] 'accesssing the weight engine by by ordinal Dim weOrdinal Set weOrdinal=Job.WeightEngines[0] End Event

Public Instance Methods

AddEventScript Adds a new event script to the job
AddMetadataScript Add a new metadata script to the job
DropCurrentCase Description: By calling this method, the current respondent's data will not be written to the output data source.
EnvironmentInit Sets the internal environment value
InputCaseNumber Get the input case number for the specified input source
Load Loads a DMS file, defined in DTScriptFileName, the Load method calls LoadString internally
LoadString Initializes the DMOM based on the string that contains a DMS script
LoadXml Loads an xml file containing the DMS script
Run Executes a DMS script
Save Saves a DMS script to DMS file, the Save method calls SaveToString internally to persist the DMOM state
SaveToString Saves the DMOM state into a string, this string will contain the generated DMS script
SaveXml Saves a DMS script to XML file, the SaveXML method calls SaveToString internally to persist the DMOM state
Stop Description: By calling this method, the transformation will stop imediately, events defined after this event will not be executed
Validate Calling this method invokes the

See Also

IJob Interface | SPSSMR.Data.Transformations Namespace