Package dev.galasa.zosfile
Interface IZosVSAMDataset
public interface IZosVSAMDataset
Highly configurable representation of a VSAM dataset
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Backup-While-Open options for VSAM definestatic enum
VSAM Dataset Organisation optionsstatic enum
Erase options for VSAM definestatic enum
FR Log options for VSAM definestatic enum
Log options for VSAM definestatic enum
Recatalog options for VSAM definestatic enum
Reuse options for VSAM definestatic enum
Spanned options for VSAM definestatic enum
Speed or Recovery options for VSAM definestatic enum
Space units for VSAM definestatic enum
Write check options for VSAM define -
Method Summary
Modifier and TypeMethodDescriptionclone
(IZosVSAMDataset model) Allocate the physical VSAM data set on the zOS image using the supplied VSAM data set as a model.create()
Allocate the physical VSAM data set on the zOS image.boolean
delete()
Delete the VSAM data set on the zOS image.boolean
exists()
Returns true if the VSAM data set exists on the zOS imageReturn the attributes of the data set as aString
.Return the last IDCAMS command for this VSAM data setReturn the last IDCAMS output for this VSAM data setReturn the data type (IZosDataset.DatasetDataType
) for store and retrieve of the data set contentReturn the IDCAMS define command for this VSAM data setGet the IDCAMS delete command for this VSAM clusterReturns the IDCAMS LISTCAT output for the VSAM filegetName()
Get the name of the VSAM filegetReproFromCommand
(String indatasetName) Get the IDCAMS REPRO commandgetReproToCommand
(String outDatasetName) Get the IDCAMS REPRO commandbyte[]
Retrieve content of the VSAM data set in binary modeRetrieve content of the VSAM data set in text modevoid
saveToResultsArchive
(String rasPath) Store the content of the VSAM data set to the Results Archive Storevoid
setAccountInfo
(String accountInfo) Set accounting info for the VSAM filevoid
setBufferspace
(long bufferspace) Set the bufferspace for the VSAM filevoid
setBwoOption
(IZosVSAMDataset.BWOOption bwoOption) Set the Backup-While-Open option for the VSAM filevoid
setCatalog
(String catalog) Set a catalog for the VSAM clustervoid
setControlInterval
(String controlInterval) Set the control interval for the VSAM filevoid
setDataBufferspace
(long dataBufferspace) Set the buffer space for the DATA filevoid
setDataclass
(String dataclass) Set the DataClass for the VSAM filevoid
setDataControlInterval
(String dataControlInterval) Set the control interval for the DATA filevoid
setDataEraseOption
(IZosVSAMDataset.EraseOption dataEraseOption) Set theIZosVSAMDataset.EraseOption
for the DATA filevoid
setDataExceptionExit
(String dataExceptionExit) Set an exception exit for the DATA filevoid
setDataFreeSpaceOptions
(int controlIntervalPercent, int controlAreaPercent) Set the control interval and control area free space percentages for the DATA file *void
setDataKeyOptions
(int length, int offset) Set the key length and offset for the DATA filevoid
setDataModel
(String modelEntryName, String modelCatName) Set the entry name and catalog name for the model for the DATA file.void
setDataName
(String dataName) Set the name for the DATA filevoid
setDataOwner
(String dataOwner) Set the owner for the DATA filevoid
setDataRecordSize
(int average, int max) Set the average and maximum record sizes for the DATA filevoid
setDataReuseOption
(IZosVSAMDataset.ReuseOption dataReuseOption) Set theIZosVSAMDataset.ReuseOption
for the DATA filevoid
Set theIZosVSAMDataset.DatasetOrganisation
for the VSAM filevoid
setDataShareOptions
(int crossRegion, int crossSystem) Set the cross-region and cross-system share options for the DATA filevoid
setDataSpace
(IZosVSAMDataset.VSAMSpaceUnit spaceUnit, int primaryExtents, int secondaryExtents) Set theIZosVSAMDataset.VSAMSpaceUnit
for the DATA file, and the number of primary and secondary extents required.void
setDataSpanOption
(IZosVSAMDataset.SpanOption dataSpanOption) Set theIZosVSAMDataset.SpanOption
for the DATA filevoid
setDataSpeedRecoveryOption
(IZosVSAMDataset.SpeedRecoveryOption dataSpeedRecoveryOption) Set theIZosVSAMDataset.SpeedRecoveryOption
for the DATA filevoid
setDataType
(IZosDataset.DatasetDataType dataType) Set the data type (IZosDataset.DatasetDataType
) for store and retrieve of the data set contentvoid
setDataVolumes
(String dataVolumes) Set the volume(s) to be used for allocation of the DATA filevoid
setDataWriteCheckOption
(IZosVSAMDataset.WriteCheckOption dataWriteCheckOption) Set theIZosVSAMDataset.WriteCheckOption
for the DATA filevoid
setEraseOption
(IZosVSAMDataset.EraseOption eraseOption) Set the erase option for the VSAM filevoid
setExceptionExit
(String exceptionExit) Set an exception exit for the VSAM filevoid
setFreeSpaceOptions
(int controlIntervalPercent, int controlAreaPercent) Set the control interval and control area free space percentages for the VSAM filevoid
setFrlogOption
(IZosVSAMDataset.FRLogOption frlogOption) Set theIZosVSAMDataset.FRLogOption
for the VSAM filevoid
setIndexControlInterval
(String indexControlInterval) Set the control interval for the INDEX filevoid
setIndexExceptionExit
(String indexExceptionExit) Set an exception exit for the INDEX filevoid
setIndexModel
(String indexModelEntryName, String indexModelCatName) Set the entry name and catalog name for the model for the INDEX file.void
setIndexName
(String indexName) Set the name of the INDEX filevoid
setIndexOwner
(String indexOwner) Set the owner of the INDEX filevoid
setIndexReuseOption
(IZosVSAMDataset.ReuseOption indexReuseOption) Set theIZosVSAMDataset.ReuseOption
for the INDEX filevoid
setIndexShareOptions
(int crossRegion, int crossSystem) Set the cross-region and cross-system share options for the INDEX filevoid
setIndexSpace
(IZosVSAMDataset.VSAMSpaceUnit spaceUnit, int primaryExtents, int secondaryExtents) Set theIZosVSAMDataset.VSAMSpaceUnit
for the INDEX file, and the number of primary and secondary extents required.void
setIndexVolumes
(String indexVolumes) Set the volume(s) on which to allocate the INDEX filevoid
setIndexWriteCheckOption
(IZosVSAMDataset.WriteCheckOption indexWriteCheckOption) Set theIZosVSAMDataset.WriteCheckOption
for the INDEX filevoid
setKeyOptions
(int length, int offset) Set the key length and offset for the VSAM filevoid
setLogOption
(IZosVSAMDataset.LogOption logOption) Set theIZosVSAMDataset.LogOption
for the VSAM filevoid
setLogStreamID
(String logStreamID) Set the logstream id for the VSAM filevoid
setManagementClass
(String managementClass) Set the management class for the VSAM filevoid
Set the entry name and catalog name for the model for the VSAM file.void
Set the owner of the VSAM filevoid
setRecatalogOption
(IZosVSAMDataset.RecatalogOption recatalogOption) Set theIZosVSAMDataset.RecatalogOption
for the VSAM filevoid
setRecordSize
(int average, int max) Set the average and maximum record sizes for the VSAM filevoid
setReuseOption
(IZosVSAMDataset.ReuseOption reuseOption) Set theIZosVSAMDataset.ReuseOption
for the VSAM filevoid
setShareOptions
(int crossRegion, int crossSystem) Set cross-region and cross-system share options for the VSAM filevoid
setShouldArchive
(boolean shouldArchive) Set flag to control if the content of the VSAM data set should be stored to the test output.void
setShouldCleanup
(boolean shouldCleanup) Set flag to control if the VSAM data set should be automatically deleted from zOS at test end.void
setSpace
(IZosVSAMDataset.VSAMSpaceUnit spaceUnit, int primaryExtents, int secondaryExtents) Set theIZosVSAMDataset.VSAMSpaceUnit
for the VSAM file, and the number of primary and secondary extents required.void
setSpanOption
(IZosVSAMDataset.SpanOption spanOption) Set theIZosVSAMDataset.SpanOption
for the VSAM filevoid
setSpeedRecoveryOption
(IZosVSAMDataset.SpeedRecoveryOption speedRecoveryOption) Set theIZosVSAMDataset.SpeedRecoveryOption
for the VSAM filevoid
setStorageClass
(String storageClass) Set the storage class for the VSAM filevoid
setUseDATA
(boolean useDATA, boolean unique) Indicate whether a DATA file should be added to the VSAM cluster, and whether it should be uniquevoid
setUseINDEX
(boolean useINDEX, boolean unique) Indicate whether an INDEX file should be allocated in the cluster, and wheth it should be uniquevoid
setVolumes
(String volumes) Set the volume(s) to be used in allocating this VSAM filevoid
setWriteCheckOption
(IZosVSAMDataset.WriteCheckOption writeCheckOption) Set theIZosVSAMDataset.WriteCheckOption
for the VSAM fileboolean
Return flag that controls if the content of the VSAM data set should be stored to the test outputboolean
Return flag that controls if the VSAM job output should be automatically deleted from zOS at test endvoid
store
(@NotNull IZosDataset fromDataset) Write to content to the data set.void
storeBinary
(@javax.validation.constraints.NotNull byte[] content) Write to content to the data set in binary mode.void
Write to content to the data set in text mode.
-
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
Delete the VSAM data set on the zOS image.- Returns:
- deleted
- Throws:
ZosVSAMDatasetException
-
exists
Returns true if the VSAM data set exists on the zOS image- Returns:
- Throws:
ZosVSAMDatasetException
-
storeText
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- 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- Parameters:
content
-- Throws:
ZosVSAMDatasetException
-
store
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
Retrieve content of the VSAM data set in text mode- Returns:
- VSAM data set content
- Throws:
ZosVSAMDatasetException
-
retrieveAsBinary
Retrieve content of the VSAM data set in binary mode- Returns:
- VSAM data set content
- Throws:
ZosVSAMDatasetException
-
saveToResultsArchive
Store the content of the VSAM data set to the Results Archive Store- Parameters:
rasPath
- path in Results Archive Store- Throws:
ZosVSAMDatasetException
-
setDataType
Set the data type (IZosDataset.DatasetDataType
) for store and retrieve of the data set content- Parameters:
dataType
-
-
setSpace
Set theIZosVSAMDataset.VSAMSpaceUnit
for the VSAM file, and the number of primary and secondary extents required.- Parameters:
spaceUnit
-primaryExtents
-secondaryExtents
-
-
setVolumes
Set the volume(s) to be used in allocating this VSAM file- Parameters:
volumes
-
-
setAccountInfo
Set accounting info for the VSAM file- Parameters:
accountInfo
-
-
setBufferspace
void setBufferspace(long bufferspace) Set the bufferspace for the VSAM file- Parameters:
bufferspace
-
-
setBwoOption
Set the Backup-While-Open option for the VSAM file- Parameters:
bwoOption
-
-
setControlInterval
Set the control interval for the VSAM file- Parameters:
controlInterval
-
-
setDataclass
Set the DataClass for the VSAM file- Parameters:
dataclass
-
-
setEraseOption
Set the erase option for the VSAM file- Parameters:
eraseOption
-
-
setExceptionExit
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
Set theIZosVSAMDataset.FRLogOption
for the VSAM file- Parameters:
frlogOption
-
-
setDatasetOrg
Set theIZosVSAMDataset.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
Set theIZosVSAMDataset.LogOption
for the VSAM file- Parameters:
logOption
-
-
setLogStreamID
Set the logstream id for the VSAM file- Parameters:
logStreamID
-
-
setManagementClass
Set the management class for the VSAM file- Parameters:
managementClass
-
-
setModel
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
Set the owner of the VSAM file- Parameters:
owner
-
-
setRecatalogOption
Set theIZosVSAMDataset.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
Set theIZosVSAMDataset.ReuseOption
for the VSAM file- Parameters:
reuseOption
-
-
setSpanOption
Set theIZosVSAMDataset.SpanOption
for the VSAM file- Parameters:
spanOption
-
-
setSpeedRecoveryOption
Set theIZosVSAMDataset.SpeedRecoveryOption
for the VSAM file- Parameters:
speedRecoveryOption
-
-
setStorageClass
Set the storage class for the VSAM file- Parameters:
storageClass
-
-
setWriteCheckOption
Set theIZosVSAMDataset.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
Set the name for the DATA file- Parameters:
dataName
-
-
setDataSpace
void setDataSpace(IZosVSAMDataset.VSAMSpaceUnit spaceUnit, int primaryExtents, int secondaryExtents) Set theIZosVSAMDataset.VSAMSpaceUnit
for the DATA file, and the number of primary and secondary extents required.- Parameters:
spaceUnit
-primaryExtents
-secondaryExtents
-
-
setDataVolumes
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
Set the control interval for the DATA file- Parameters:
dataControlInterval
-
-
setDataEraseOption
Set theIZosVSAMDataset.EraseOption
for the DATA file- Parameters:
dataEraseOption
-
-
setDataExceptionExit
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
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
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
Set theIZosVSAMDataset.ReuseOption
for the DATA file- Parameters:
dataReuseOption
-
-
setDataSpanOption
Set theIZosVSAMDataset.SpanOption
for the DATA file- Parameters:
dataSpanOption
-
-
setDataSpeedRecoveryOption
Set theIZosVSAMDataset.SpeedRecoveryOption
for the DATA file- Parameters:
dataSpeedRecoveryOption
-
-
setDataWriteCheckOption
Set theIZosVSAMDataset.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
Set the name of the INDEX file- Parameters:
indexName
-
-
setIndexSpace
void setIndexSpace(IZosVSAMDataset.VSAMSpaceUnit spaceUnit, int primaryExtents, int secondaryExtents) Set theIZosVSAMDataset.VSAMSpaceUnit
for the INDEX file, and the number of primary and secondary extents required.- Parameters:
spaceUnit
-primaryExtents
-secondaryExtents
-
-
setIndexVolumes
Set the volume(s) on which to allocate the INDEX file- Parameters:
indexVolumes
-
-
setIndexControlInterval
Set the control interval for the INDEX file- Parameters:
indexControlInterval
-
-
setIndexExceptionExit
Set an exception exit for the INDEX file- Parameters:
indexExceptionExit
-
-
setIndexModel
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
Set the owner of the INDEX file- Parameters:
indexOwner
-
-
setIndexReuseOption
Set theIZosVSAMDataset.ReuseOption
for the INDEX file- Parameters:
indexReuseOption
-
-
setIndexWriteCheckOption
Set theIZosVSAMDataset.WriteCheckOption
for the INDEX file- Parameters:
indexWriteCheckOption
-
-
setCatalog
Set a catalog for the VSAM cluster- Parameters:
catalog
-
-
getName
String getName()Get the name of the VSAM file- Returns:
-
getDataType
IZosDataset.DatasetDataType 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
Return the IDCAMS define command for this VSAM data set- Returns:
- Throws:
ZosVSAMDatasetException
-
getDeleteCommand
Get the IDCAMS delete command for this VSAM cluster- Returns:
- Throws:
ZosVSAMDatasetException
-
getReproToCommand
Get the IDCAMS REPRO command- Parameters:
outDatasetName
-- Returns:
- Throws:
ZosVSAMDatasetException
-
getReproFromCommand
Get the IDCAMS REPRO command- Parameters:
indatasetName
-- Returns:
- Throws:
ZosVSAMDatasetException
-
getListcatOutput
Returns the IDCAMS LISTCAT output for the VSAM file- Returns:
- Throws:
ZosVSAMDatasetException
-
getAttibutesAsString
Return the attributes of the data set as aString
. 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
-