Interface IZosVSAMDataset


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

    • create

      Allocate the physical VSAM data set on the zOS image. Will be deleted at test method end
      Returns:
      Throws:
      ZosVSAMDatasetException
    • clone

      Allocate the physical VSAM data set on the zOS image using the supplied VSAM data set as a model. Will be deleted at test method end
      Returns:
      Throws:
      ZosVSAMDatasetException
    • delete

      boolean delete() throws ZosVSAMDatasetException
      Delete the VSAM data set on the zOS image.
      Returns:
      deleted
      Throws:
      ZosVSAMDatasetException
    • exists

      boolean exists() throws ZosVSAMDatasetException
      Returns true if the VSAM data set exists on the zOS image
      Returns:
      Throws:
      ZosVSAMDatasetException
    • storeText

      void storeText(@NotNull @NotNull String content) throws ZosVSAMDatasetException
      Write to content to the data set in text mode. The data must be a suitable format, e.g. must be in key sequenced order for a KSDS

      See setDataType(DatasetDataType)

      Parameters:
      content -
      Throws:
      ZosVSAMDatasetException
    • storeBinary

      void storeBinary(@NotNull @javax.validation.constraints.NotNull byte[] content) throws ZosVSAMDatasetException
      Write to content to the data set in binary mode. The data must be a suitable format, e.g. must be in key sequenced order for a KSDS

      See setDataType(DatasetDataType)

      Parameters:
      content -
      Throws:
      ZosVSAMDatasetException
    • 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
    • retrieveAsText

      String retrieveAsText() throws ZosVSAMDatasetException
      Retrieve content of the VSAM data set in text mode

      See setDataType(DatasetDataType)

      Returns:
      VSAM data set content
      Throws:
      ZosVSAMDatasetException
    • retrieveAsBinary

      byte[] retrieveAsBinary() throws ZosVSAMDatasetException
      Retrieve content of the VSAM data set in binary mode

      See setDataType(DatasetDataType)

      Returns:
      VSAM data set content
      Throws:
      ZosVSAMDatasetException
    • saveToResultsArchive

      void saveToResultsArchive(String rasPath) throws ZosVSAMDatasetException
      Store the content of the VSAM data set to the Results Archive Store
      Parameters:
      rasPath - path in Results Archive Store
      Throws:
      ZosVSAMDatasetException
    • setDataType

      void setDataType(IZosDataset.DatasetDataType dataType)
      Set the data type (IZosDataset.DatasetDataType) for store and retrieve of the data set content
      Parameters:
      dataType -
    • setSpace

      void setSpace(IZosVSAMDataset.VSAMSpaceUnit spaceUnit, int primaryExtents, int secondaryExtents)
      Set the IZosVSAMDataset.VSAMSpaceUnit for the VSAM file, and the number of primary and secondary extents required.
      Parameters:
      spaceUnit -
      primaryExtents -
      secondaryExtents -
    • 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 -
    • setFrlogOption

      void setFrlogOption(IZosVSAMDataset.FRLogOption frlogOption)
      Set the IZosVSAMDataset.FRLogOption for the VSAM file
      Parameters:
      frlogOption -
    • setDatasetOrg

      void setDatasetOrg(IZosVSAMDataset.DatasetOrganisation dataOrg)
      Set the IZosVSAMDataset.DatasetOrganisation for the VSAM file
      Parameters:
      dataOrg -
    • setKeyOptions

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

      void setLogOption(IZosVSAMDataset.LogOption logOption)
      Set the IZosVSAMDataset.LogOption for the VSAM file
      Parameters:
      logOption -
    • 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 -
    • setRecatalogOption

      void setRecatalogOption(IZosVSAMDataset.RecatalogOption recatalogOption)
      Set the IZosVSAMDataset.RecatalogOption for the VSAM file
      Parameters:
      recatalogOption -
    • setRecordSize

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

      void setReuseOption(IZosVSAMDataset.ReuseOption reuseOption)
      Set the IZosVSAMDataset.ReuseOption for the VSAM file
      Parameters:
      reuseOption -
    • setShareOptions

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

      void setSpanOption(IZosVSAMDataset.SpanOption spanOption)
      Set the IZosVSAMDataset.SpanOption for the VSAM file
      Parameters:
      spanOption -
    • setSpeedRecoveryOption

      void setSpeedRecoveryOption(IZosVSAMDataset.SpeedRecoveryOption speedRecoveryOption)
      Set the IZosVSAMDataset.SpeedRecoveryOption for the VSAM file
      Parameters:
      speedRecoveryOption -
    • setStorageClass

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

      void setWriteCheckOption(IZosVSAMDataset.WriteCheckOption writeCheckOption)
      Set the IZosVSAMDataset.WriteCheckOption for the VSAM file
      Parameters:
      writeCheckOption -
    • 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 -
    • setDataEraseOption

      void setDataEraseOption(IZosVSAMDataset.EraseOption dataEraseOption)
      Set the IZosVSAMDataset.EraseOption for the DATA file
      Parameters:
      dataEraseOption -
    • 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 -
    • setDataReuseOption

      void setDataReuseOption(IZosVSAMDataset.ReuseOption dataReuseOption)
      Set the IZosVSAMDataset.ReuseOption for the DATA file
      Parameters:
      dataReuseOption -
    • setDataShareOptions

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

      void setDataSpanOption(IZosVSAMDataset.SpanOption dataSpanOption)
      Set the IZosVSAMDataset.SpanOption for the DATA file
      Parameters:
      dataSpanOption -
    • setDataSpeedRecoveryOption

      void setDataSpeedRecoveryOption(IZosVSAMDataset.SpeedRecoveryOption dataSpeedRecoveryOption)
      Set the IZosVSAMDataset.SpeedRecoveryOption for the DATA file
      Parameters:
      dataSpeedRecoveryOption -
    • setDataWriteCheckOption

      void setDataWriteCheckOption(IZosVSAMDataset.WriteCheckOption dataWriteCheckOption)
      Set the IZosVSAMDataset.WriteCheckOption for the DATA file
      Parameters:
      dataWriteCheckOption -
    • 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 -
    • setIndexReuseOption

      void setIndexReuseOption(IZosVSAMDataset.ReuseOption indexReuseOption)
      Set the IZosVSAMDataset.ReuseOption for the INDEX file
      Parameters:
      indexReuseOption -
    • setIndexShareOptions

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

      void setIndexWriteCheckOption(IZosVSAMDataset.WriteCheckOption indexWriteCheckOption)
      Set the IZosVSAMDataset.WriteCheckOption for the INDEX file
      Parameters:
      indexWriteCheckOption -
    • 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:
    • getDataType

      Return the data type (IZosDataset.DatasetDataType) for store and retrieve of the data set content
      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:
    • getDefineCommand

      String getDefineCommand() throws ZosVSAMDatasetException
      Return the IDCAMS define command for this VSAM data set
      Returns:
      Throws:
      ZosVSAMDatasetException
    • getDeleteCommand

      String getDeleteCommand() throws ZosVSAMDatasetException
      Get the IDCAMS delete command for this VSAM cluster
      Returns:
      Throws:
      ZosVSAMDatasetException
    • getReproToCommand

      String getReproToCommand(String outDatasetName) throws ZosVSAMDatasetException
      Get the IDCAMS REPRO command
      Parameters:
      outDatasetName -
      Returns:
      Throws:
      ZosVSAMDatasetException
    • getReproFromCommand

      String getReproFromCommand(String indatasetName) throws ZosVSAMDatasetException
      Get the IDCAMS REPRO command
      Parameters:
      infile -
      Returns:
      Throws:
      ZosVSAMDatasetException
    • getListcatOutput

      String getListcatOutput() throws ZosVSAMDatasetException
      Returns the IDCAMS LISTCAT output for the VSAM file
      Returns:
      Throws:
      ZosVSAMDatasetException
    • 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