spss.IsActive Function (Python)
spss.IsActive(datasetObj). Indicates whether the specified dataset
is the active one. The result is Boolean—True if the specified dataset is active, False otherwise. The argument must be an
instance of the Dataset
class.
The IsActive
function is intended
for use within a data step. Data steps are initiated with the spss.StartDataStep
function and are used
to create and manage multiple datasets.
Example
import spss
spss.StartDataStep()
datasetObj = spss.Dataset(name="file1")
if not spss.IsActive(datasetObj):
spss.SetActive(datasetObj)
spss.EndDataStep()