Interface IZosDataset


public interface IZosDataset
Representation of a non-VSAM data set
  • Method Details

    • create

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

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

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

      void storeText(@NotNull @NotNull String content) throws ZosDatasetException
      Write content to the data set in Text mode

      See setDataType(DatasetDataType)

      Parameters:
      content -
      Throws:
      ZosDatasetException
    • storeBinary

      void storeBinary(@NotNull @javax.validation.constraints.NotNull byte[] content) throws ZosDatasetException
      Write content to the data set in Binary mode

      See setDataType(DatasetDataType)

      Parameters:
      content -
      Throws:
      ZosDatasetException
    • retrieveAsText

      String retrieveAsText() throws ZosDatasetException
      Retrieve content of the data set in Text mode

      See setDataType(DatasetDataType)

      Returns:
      data set content
      Throws:
      ZosDatasetException
    • retrieveAsBinary

      byte[] retrieveAsBinary() throws ZosDatasetException
      Retrieve content of the data set in Binary mode

      See setDataType(DatasetDataType)

      Returns:
      data set content
      Throws:
      ZosDatasetException
    • saveToResultsArchive

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

      boolean isPDS() throws ZosDatasetException
      Returns true if the data set exists and is a partitioned data set
      Returns:
      Throws:
      ZosDatasetException
    • getMemberName

      String getMemberName()
      Returns the member name if supplied and is a partitioned data set
      Returns:
      Throws:
      ZosDatasetException
    • memberCreate

      void memberCreate(@NotNull @NotNull String memberName) throws ZosDatasetException
      Create an empty member in the partitioned data set
      Parameters:
      memberName -
      Throws:
      ZosDatasetException
    • memberDelete

      void memberDelete(@NotNull @NotNull String memberName) throws ZosDatasetException
      Delete a member from the partitioned data set
      Parameters:
      memberName -
      Throws:
      ZosDatasetException
    • memberExists

      boolean memberExists(@NotNull @NotNull String memberName) throws ZosDatasetException
      Return true if the named member exists in the partitioned data set
      Parameters:
      memberName -
      Returns:
      Throws:
      ZosDatasetException
    • memberStoreText

      void memberStoreText(@NotNull @NotNull String memberName, @NotNull @NotNull String content) throws ZosDatasetException
      Write content to the partitioned data set member in Text mode
      Parameters:
      memberName -
      content -
      Throws:
      ZosDatasetException
    • memberStoreBinary

      void memberStoreBinary(@NotNull @NotNull String memberName, @NotNull @javax.validation.constraints.NotNull byte[] content) throws ZosDatasetException
      Write content to the partitioned data set member in Binary mode
      Parameters:
      memberName -
      content -
      Throws:
      ZosDatasetException
    • memberRetrieveAsText

      String memberRetrieveAsText(@NotNull @NotNull String memberName) throws ZosDatasetException
      Retrieve content from the partitioned data set member in Text mode
      Parameters:
      memberName -
      Returns:
      Throws:
      ZosDatasetException
    • memberRetrieveAsBinary

      byte[] memberRetrieveAsBinary(@NotNull @NotNull String memberName) throws ZosDatasetException
      Retrieve content from the partitioned data set member in Binary mode
      Parameters:
      memberName -
      Returns:
      Throws:
      ZosDatasetException
    • memberList

      Collection<String> memberList() throws ZosDatasetException
      List the members of the partitioned data set
      Returns:
      Throws:
      ZosDatasetException
    • memberSaveToResultsArchive

      void memberSaveToResultsArchive(@NotNull @NotNull String memberName, String rasPath) throws ZosDatasetException
      Store the content of the partitioned data set member to the Results Archive Store
      Parameters:
      memberName -
      rasPath - path in Results Archive Store
      Throws:
      ZosDatasetException
    • setDataType

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

      void setVolumes(String volumes)
      Set the Volume serial(s) of the data set
      Parameters:
      volumes -
    • setUnit

      void setUnit(String unit)
      Set the unit name of the data set
      Parameters:
      unit -
    • setDatasetOrganization

      void setDatasetOrganization(IZosDataset.DatasetOrganization organization)
      Set the organization (IZosDataset.DatasetOrganization) of the data set
      Parameters:
      organization -
    • setSpace

      void setSpace(IZosDataset.SpaceUnit spaceUnit, int primaryExtents, int secondaryExtents)
      Set the IZosDataset.SpaceUnit for data set, and specify how many primary and secondary extents to allocate.
      Parameters:
      spaceUnit -
      primaryExtent -
      secondaryExtents -
    • setDirectoryBlocks

      void setDirectoryBlocks(int directoryBlocks)
      Set the number of directory blocks
      Parameters:
      directoryBlocks -
    • setRecordFormat

      void setRecordFormat(IZosDataset.RecordFormat recordFormat)
      Set the IZosDataset.RecordFormat for the data set
      Parameters:
      recordFormat -
    • setBlockSize

      void setBlockSize(int blockSize)
      Set the block size for the data set
      Parameters:
      blockSize -
    • setRecordlength

      void setRecordlength(int recordlength)
      Set the record length for the data set
      Parameters:
      recordlength -
    • setManagementClass

      void setManagementClass(String managementClass)
      Set the management class of the data set
      Parameters:
      managementClass -
    • setStorageClass

      void setStorageClass(String storageClass)
      Set the storage class of the data set
      Parameters:
      managementClass -
    • setDataClass

      void setDataClass(String dataClass)
      Set the data class of the data set
      Parameters:
      managementClass -
    • setDatasetType

      void setDatasetType(IZosDataset.DSType dsType)
      Set the IZosDataset.DSType for the data set
      Parameters:
      dsType -
    • getName

      String getName()
      Return the name of the data set
      Returns:
    • getDataType

      Return the data type (IZosDataset.DatasetDataType) for store and retrieve of the data set content
      Returns:
    • getVolumes

      String getVolumes()
      Return the Volume serial(s) of the data set
      Returns:
    • getUnit

      String getUnit()
      Return the unit name of the data set
      Returns:
    • getDatasetOrganization

      IZosDataset.DatasetOrganization getDatasetOrganization()
      Return the organization (IZosDataset.DatasetOrganization) of the data set
      Returns:
    • getSpaceUnit

      IZosDataset.SpaceUnit getSpaceUnit()
      Return the allocation space unit of the data set
      Returns:
    • getPrimaryExtents

      int getPrimaryExtents()
      Return primary allocation extents of the data set
      Returns:
    • getSecondaryExtents

      int getSecondaryExtents()
      Return secondary allocation extents of the data set
      Returns:
    • getDirectoryBlocks

      int getDirectoryBlocks()
      Return directory blocks of the partitioned data set
      Returns:
    • getRecordFormat

      IZosDataset.RecordFormat getRecordFormat()
      Return the record format of the data set
      Returns:
    • getBlockSize

      int getBlockSize()
      Return block size of the data set
      Returns:
    • getRecordlength

      int getRecordlength()
      Return the record length of the data set
      Returns:
    • getManagementClass

      String getManagementClass()
      Return the management class of the data set
      Returns:
    • getStorageClass

      String getStorageClass()
      Return the storage class of the data set
      Returns:
    • getDataClass

      String getDataClass()
      Return the data class of the data set
      Returns:
    • getDatasetType

      IZosDataset.DSType getDatasetType()
      Get the IZosDataset.DSType for the data set
      Returns:
    • getExtents

      int getExtents()
      Get the number of extents of the data set
      Returns:
    • getUsed

      int getUsed()
      Get the number of used extents of the data set
      Returns:
    • getCreateDate

      String getCreateDate()
      Get the data set creation date
      Returns:
    • getReferencedDate

      String getReferencedDate()
      Get the data set referenced date
      Returns:
    • getExpirationDate

      String getExpirationDate()
      Get the data set expiration date
      Returns:
    • retrieveAttibutes

      void retrieveAttibutes() throws ZosDatasetException
      Retrieve the attributes of an existing data set to make the values available in the getter methods
      Throws:
      ZosDatasetException
    • getAttibutesAsString

      String getAttibutesAsString() throws ZosDatasetException
      Return the attributes of the data set as a String
      The format of the String is defined by the implementation
      Returns:
      Throws:
      ZosDatasetException
    • setShouldArchive

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

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

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

      boolean shouldCleanup()
      Return flag that controls if the data set should be automatically deleted from zOS at test end