Interface IZosVSAMDataset


  • public interface IZosVSAMDataset
    Highly configurable representation of a VSAM dataset
    • Method Detail

      • store

        void store​(@NotNull
                   @NotNull IZosDataset fromDataset)
            throws ZosVSAMDatasetException
        Write to content to the data set. The content of the from data set must be a suitable format, e.g. must be in key sequenced order for a KSDS
        Parameters:
        fromDataset -
        Throws:
        ZosVSAMDatasetException
      • setVolumes

        void setVolumes​(String volumes)
        Set the volume(s) to be used in allocating this VSAM file
        Parameters:
        volumes -
      • setAccountInfo

        void setAccountInfo​(String accountInfo)
        Set accounting info for the VSAM file
        Parameters:
        accountInfo -
      • setBufferspace

        void setBufferspace​(long bufferspace)
        Set the bufferspace for the VSAM file
        Parameters:
        bufferspace -
      • setBwoOption

        void setBwoOption​(IZosVSAMDataset.BWOOption bwoOption)
        Set the Backup-While-Open option for the VSAM file
        Parameters:
        bwoOption -
      • setControlInterval

        void setControlInterval​(String controlInterval)
        Set the control interval for the VSAM file
        Parameters:
        controlInterval -
      • setDataclass

        void setDataclass​(String dataclass)
        Set the DataClass for the VSAM file
        Parameters:
        dataclass -
      • setEraseOption

        void setEraseOption​(IZosVSAMDataset.EraseOption eraseOption)
        Set the erase option for the VSAM file
        Parameters:
        eraseOption -
      • setExceptionExit

        void setExceptionExit​(String exceptionExit)
        Set an exception exit for the VSAM file
        Parameters:
        exceptionExit -
      • setFreeSpaceOptions

        void setFreeSpaceOptions​(int controlIntervalPercent,
                                 int controlAreaPercent)
        Set the control interval and control area free space percentages for the VSAM file
        Parameters:
        controlIntervalPercent -
        controlAreaPercent -
      • setKeyOptions

        void setKeyOptions​(int length,
                           int offset)
        Set the key length and offset for the VSAM file
        Parameters:
        length -
        offset -
      • setLogStreamID

        void setLogStreamID​(String logStreamID)
        Set the logstream id for the VSAM file
        Parameters:
        logStreamID -
      • setManagementClass

        void setManagementClass​(String managementClass)
        Set the management class for the VSAM file
        Parameters:
        managementClass -
      • setModel

        void setModel​(String modelEntryName,
                      String modelCatName)
        Set the entry name and catalog name for the model for the VSAM file. Catalog may be null, or both entry and catalog may be null.
        Parameters:
        modelEntryName -
        modelCatName -
      • setOwner

        void setOwner​(String owner)
        Set the owner of the VSAM file
        Parameters:
        owner -
      • setRecordSize

        void setRecordSize​(int average,
                           int max)
        Set the average and maximum record sizes for the VSAM file
        Parameters:
        average -
        max -
      • setShareOptions

        void setShareOptions​(int crossRegion,
                             int crossSystem)
        Set cross-region and cross-system share options for the VSAM file
        Parameters:
        crossRegion -
        crossSystem -
      • setStorageClass

        void setStorageClass​(String storageClass)
        Set the storage class for the VSAM file
        Parameters:
        storageClass -
      • setUseDATA

        void setUseDATA​(boolean useDATA,
                        boolean unique)
        Indicate whether a DATA file should be added to the VSAM cluster, and whether it should be unique
        Parameters:
        useDATA -
        unique -
      • setDataName

        void setDataName​(String dataName)
        Set the name for the DATA file
        Parameters:
        dataName -
      • setDataSpace

        void setDataSpace​(IZosVSAMDataset.VSAMSpaceUnit spaceUnit,
                          int primaryExtents,
                          int secondaryExtents)
        Set the IZosVSAMDataset.VSAMSpaceUnit for the DATA file, and the number of primary and secondary extents required.
        Parameters:
        spaceUnit -
        primaryExtents -
        secondaryExtents -
      • setDataVolumes

        void setDataVolumes​(String dataVolumes)
        Set the volume(s) to be used for allocation of the DATA file
        Parameters:
        dataVolumes -
      • setDataBufferspace

        void setDataBufferspace​(long dataBufferspace)
        Set the buffer space for the DATA file
        Parameters:
        dataBufferspace -
      • setDataControlInterval

        void setDataControlInterval​(String dataControlInterval)
        Set the control interval for the DATA file
        Parameters:
        dataControlInterval -
      • setDataExceptionExit

        void setDataExceptionExit​(String dataExceptionExit)
        Set an exception exit for the DATA file
        Parameters:
        dataExceptionExit -
      • setDataFreeSpaceOptions

        void setDataFreeSpaceOptions​(int controlIntervalPercent,
                                     int controlAreaPercent)
        Set the control interval and control area free space percentages for the DATA file *
        Parameters:
        controlIntervalPercent -
        controlAreaPercent -
      • setDataKeyOptions

        void setDataKeyOptions​(int length,
                               int offset)
        Set the key length and offset for the DATA file
        Parameters:
        length -
        offset -
      • setDataModel

        void setDataModel​(String modelEntryName,
                          String modelCatName)
        Set the entry name and catalog name for the model for the DATA file. Catalog may be null, or both entry and catalog may be null.
        Parameters:
        modelEntryName -
        modelCatName -
      • setDataOwner

        void setDataOwner​(String dataOwner)
        Set the owner for the DATA file
        Parameters:
        dataOwner -
      • setDataRecordSize

        void setDataRecordSize​(int average,
                               int max)
        Set the average and maximum record sizes for the DATA file
        Parameters:
        average -
        max -
      • setDataShareOptions

        void setDataShareOptions​(int crossRegion,
                                 int crossSystem)
        Set the cross-region and cross-system share options for the DATA file
        Parameters:
        crossRegion -
        crossSystem -
      • setUseINDEX

        void setUseINDEX​(boolean useINDEX,
                         boolean unique)
        Indicate whether an INDEX file should be allocated in the cluster, and wheth it should be unique
        Parameters:
        useINDEX -
        unique -
      • setIndexName

        void setIndexName​(String indexName)
        Set the name of the INDEX file
        Parameters:
        indexName -
      • setIndexSpace

        void setIndexSpace​(IZosVSAMDataset.VSAMSpaceUnit spaceUnit,
                           int primaryExtents,
                           int secondaryExtents)
        Set the IZosVSAMDataset.VSAMSpaceUnit for the INDEX file, and the number of primary and secondary extents required.
        Parameters:
        spaceUnit -
        primaryExtents -
        secondaryExtents -
      • setIndexVolumes

        void setIndexVolumes​(String indexVolumes)
        Set the volume(s) on which to allocate the INDEX file
        Parameters:
        indexVolumes -
      • setIndexControlInterval

        void setIndexControlInterval​(String indexControlInterval)
        Set the control interval for the INDEX file
        Parameters:
        indexControlInterval -
      • setIndexExceptionExit

        void setIndexExceptionExit​(String indexExceptionExit)
        Set an exception exit for the INDEX file
        Parameters:
        indexExceptionExit -
      • setIndexModel

        void setIndexModel​(String indexModelEntryName,
                           String indexModelCatName)
        Set the entry name and catalog name for the model for the INDEX file. Catalog may be null, or both entry and catalog may be null.
        Parameters:
        indexModelEntryName -
        indexModelCatName -
      • setIndexOwner

        void setIndexOwner​(String indexOwner)
        Set the owner of the INDEX file
        Parameters:
        indexOwner -
      • setIndexShareOptions

        void setIndexShareOptions​(int crossRegion,
                                  int crossSystem)
        Set the cross-region and cross-system share options for the INDEX file
        Parameters:
        crossRegion -
        crossSystem -
      • setCatalog

        void setCatalog​(String catalog)
        Set a catalog for the VSAM cluster
        Parameters:
        catalog -
      • getName

        String getName()
        Get the name of the VSAM file
        Returns:
      • getCommandInput

        String getCommandInput()
        Return the last IDCAMS command for this VSAM data set
        Returns:
      • getCommandOutput

        String getCommandOutput()
        Return the last IDCAMS output for this VSAM data set
        Returns:
      • getAttibutesAsString

        String getAttibutesAsString()
                             throws ZosVSAMDatasetException
        Return the attributes of the data set as a String. If the VSAM data set does not exist, IDCAMS DEFINE statements will be returned, otherwise IDCAMS LISTCAT output will be returned
        Returns:
        Throws:
        ZosVSAMDatasetException
      • setShouldArchive

        void setShouldArchive​(boolean shouldArchive)
        Set flag to control if the content of the VSAM data set should be stored to the test output. Defaults to false
      • shouldArchive

        boolean shouldArchive()
        Return flag that controls if the content of the VSAM data set should be stored to the test output
      • setShouldCleanup

        void setShouldCleanup​(boolean shouldCleanup)
        Set flag to control if the VSAM data set should be automatically deleted from zOS at test end. Defaults to true
      • shouldCleanup

        boolean shouldCleanup()
        Return flag that controls if the VSAM job output should be automatically deleted from zOS at test end