Package dev.galasa.zosfile
Interface IZosDataset
public interface IZosDataset
Representation of a non-VSAM data set
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Enumeration of data type for store and retrieve of data set content:IZosDataset.DatasetDataType.TEXT
IZosDataset.DatasetDataType.BINARY
IZosDataset.DatasetDataType.RECORD
static enum
Enumeration of data set organization options:IZosDataset.DatasetOrganization.PARTITIONED
IZosDataset.DatasetOrganization.SEQUENTIAL
static enum
static enum
static enum
Enumeration of space units for data set allocation:IZosDataset.SpaceUnit.TRACKS
IZosDataset.SpaceUnit.CYLINDERS
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Allocate the physical data set on the zOS image.boolean
delete()
Delete the data set on the zOS image.boolean
exists()
Returns true if the data set exists on the zOS imageReturn the attributes of the data set as aString
The format of the String is defined by the implementationint
Return block size of the data setGet the data set creation dateReturn the data class of the data setReturn the organization (IZosDataset.DatasetOrganization
) of the data setGet theIZosDataset.DSType
for the data setReturn the data type (IZosDataset.DatasetDataType
) for store and retrieve of the data set contentint
Return directory blocks of the partitioned data setGet the data set expiration dateint
Get the number of extents of the data setReturn the management class of the data setReturns the member name if supplied and is a partitioned data setgetName()
Return the name of the data setint
Return primary allocation extents of the data setReturn the record format of the data setint
Return the record length of the data setGet the data set referenced dateint
Return secondary allocation extents of the data setReturn the allocation space unit of the data setReturn the storage class of the data setgetUnit()
Return the unit name of the data setint
getUsed()
Get the number of used extents of the data setReturn the Volume serial(s) of the data setboolean
isPDS()
Returns true if the data set exists and is a partitioned data setvoid
memberCreate
(@NotNull String memberName) Create an empty member in the partitioned data setvoid
memberDelete
(@NotNull String memberName) Delete a member from the partitioned data setboolean
memberExists
(@NotNull String memberName) Return true if the named member exists in the partitioned data setList the members of the partitioned data setbyte[]
memberRetrieveAsBinary
(@NotNull String memberName) Retrieve content from the partitioned data set member in Binary modememberRetrieveAsText
(@NotNull String memberName) Retrieve content from the partitioned data set member in Text modevoid
memberSaveToResultsArchive
(@NotNull String memberName, String rasPath) Store the content of the partitioned data set member to the Results Archive Storevoid
memberStoreBinary
(@NotNull String memberName, @javax.validation.constraints.NotNull byte[] content) Write content to the partitioned data set member in Binary modevoid
memberStoreText
(@NotNull String memberName, @NotNull String content) Write content to the partitioned data set member in Text modebyte[]
Retrieve content of the data set in Binary modeRetrieve content of the data set in Text modevoid
Retrieve the attributes of an existing data set to make the values available in the getter methodsvoid
saveToResultsArchive
(String rasPath) Store the content of the data set to the Results Archive Storevoid
setBlockSize
(int blockSize) Set the block size for the data setvoid
setDataClass
(String dataClass) Set the data class of the data setvoid
setDatasetOrganization
(IZosDataset.DatasetOrganization organization) Set the organization (IZosDataset.DatasetOrganization
) of the data setvoid
setDatasetType
(IZosDataset.DSType dsType) Set theIZosDataset.DSType
for the data setvoid
setDataType
(IZosDataset.DatasetDataType dataType) Set the data type (IZosDataset.DatasetDataType
) for store and retrieve of the data set contentvoid
setDirectoryBlocks
(int directoryBlocks) Set the number of directory blocksvoid
setManagementClass
(String managementClass) Set the management class of the data setvoid
setRecordFormat
(IZosDataset.RecordFormat recordFormat) Set theIZosDataset.RecordFormat
for the data setvoid
setRecordlength
(int recordlength) Set the record length for the data setvoid
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.void
setShouldCleanup
(boolean shouldCleanup) Set flag to control if the data set should be automatically deleted from zOS at test end.void
setSpace
(IZosDataset.SpaceUnit spaceUnit, int primaryExtents, int secondaryExtents) Set theIZosDataset.SpaceUnit
for data set, and specify how many primary and secondary extents to allocate.void
setStorageClass
(String storageClass) Set the storage class of the data setvoid
Set the unit name of the data setvoid
setVolumes
(String volumes) Set the Volume serial(s) of the data setboolean
Return flag that controls if the content of the data set should be automatically stored to the test output at test endboolean
Return flag that controls if the data set should be automatically deleted from zOS at test endvoid
storeBinary
(@javax.validation.constraints.NotNull byte[] content) Write content to the data set in Binary modevoid
Write content to the data set in Text mode
-
Method Details
-
create
Allocate the physical data set on the zOS image. Will be deleted at test method end- Returns:
- Throws:
ZosDatasetException
-
delete
Delete the data set on the zOS image.- Returns:
- deleted
- Throws:
ZosDatasetException
-
exists
Returns true if the data set exists on the zOS image- Returns:
- Throws:
ZosDatasetException
-
storeText
Write content to the data set in Text mode- 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- Parameters:
content
-- Throws:
ZosDatasetException
-
retrieveAsText
Retrieve content of the data set in Text mode- Returns:
- data set content
- Throws:
ZosDatasetException
-
retrieveAsBinary
Retrieve content of the data set in Binary mode- Returns:
- data set content
- Throws:
ZosDatasetException
-
saveToResultsArchive
Store the content of the data set to the Results Archive Store- Parameters:
rasPath
- path in Results Archive Store- Throws:
ZosDatasetException
-
isPDS
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
Create an empty member in the partitioned data set- Parameters:
memberName
-- Throws:
ZosDatasetException
-
memberDelete
Delete a member from the partitioned data set- Parameters:
memberName
-- Throws:
ZosDatasetException
-
memberExists
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
Retrieve content from the partitioned data set member in Text mode- Parameters:
memberName
-- Returns:
- Throws:
ZosDatasetException
-
memberRetrieveAsBinary
Retrieve content from the partitioned data set member in Binary mode- Parameters:
memberName
-- Returns:
- Throws:
ZosDatasetException
-
memberList
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
Set the data type (IZosDataset.DatasetDataType
) for store and retrieve of the data set content- Parameters:
dataType
-
-
setVolumes
Set the Volume serial(s) of the data set- Parameters:
volumes
-
-
setUnit
Set the unit name of the data set- Parameters:
unit
-
-
setDatasetOrganization
Set the organization (IZosDataset.DatasetOrganization
) of the data set- Parameters:
organization
-
-
setSpace
Set theIZosDataset.SpaceUnit
for data set, and specify how many primary and secondary extents to allocate.- Parameters:
spaceUnit
-primaryExtents
-secondaryExtents
-
-
setDirectoryBlocks
void setDirectoryBlocks(int directoryBlocks) Set the number of directory blocks- Parameters:
directoryBlocks
-
-
setRecordFormat
Set theIZosDataset.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
Set the management class of the data set- Parameters:
managementClass
-
-
setStorageClass
Set the storage class of the data set- Parameters:
storageClass
-
-
setDataClass
Set the data class of the data set- Parameters:
dataClass
-
-
setDatasetType
Set theIZosDataset.DSType
for the data set- Parameters:
dsType
-
-
getName
String getName()Return the name of the data set- Returns:
-
getDataType
IZosDataset.DatasetDataType 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 theIZosDataset.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
Retrieve the attributes of an existing data set to make the values available in the getter methods- Throws:
ZosDatasetException
-
getAttibutesAsString
Return the attributes of the data set as aString
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
-