Package zowe.client.sdk.zosfiles
Class ZosDsn
- java.lang.Object
-
- zowe.client.sdk.zosfiles.ZosDsn
-
public class ZosDsn extends Object
ZosDsn class that provides CRUD operations on Datasets- Version:
- 1.0
- Author:
- Leonid Baranov
-
-
Constructor Summary
Constructors Constructor Description ZosDsn(ZOSConnection connection)
ZosDsn ConstructorZosDsn(ZOSConnection connection, ZoweRequest request)
Alternative ZosDsn constructor with ZoweRequest object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Response
createDsn(String dataSetName, CreateParams params)
Creates a new dataset with specified parametersResponse
deleteDsn(String dataSetName)
Delete a datasetResponse
deleteDsn(String dataSetName, String member)
Delete a dataset memberDataset
getDataSetInfo(String dataSetName)
Retrieves the information about a Dataset.Response
writeDsn(String dataSetName, String content)
Replaces the content of an existing sequential data set with new content.Response
writeDsn(String dataSetName, String member, String content)
Replaces the content of a member of a partitioned data set (PDS or PDSE) with new content.
-
-
-
Constructor Detail
-
ZosDsn
public ZosDsn(ZOSConnection connection)
ZosDsn Constructor- Parameters:
connection
- connection information, see ZOSConnection object
-
ZosDsn
public ZosDsn(ZOSConnection connection, ZoweRequest request)
Alternative ZosDsn constructor with ZoweRequest object. This is mainly used for internal code unit testing with mockito, and it is not recommended to be used by the larger community.- Parameters:
connection
- connection information, see ZOSConnection objectrequest
- any compatible ZoweRequest Interface type object
-
-
Method Detail
-
createDsn
public Response createDsn(String dataSetName, CreateParams params) throws Exception
Creates a new dataset with specified parameters- Parameters:
dataSetName
- name of a dataset to create (e.g. 'DATASET.LIB')params
- create dataset parameters, see CreateParams object- Returns:
- http response object
- Throws:
Exception
- error processing request
-
deleteDsn
public Response deleteDsn(String dataSetName, String member) throws Exception
Delete a dataset member- Parameters:
dataSetName
- name of a dataset (e.g. 'DATASET.LIB')member
- name of member to delete- Returns:
- http response object
- Throws:
Exception
- error processing request
-
deleteDsn
public Response deleteDsn(String dataSetName) throws Exception
Delete a dataset- Parameters:
dataSetName
- name of a dataset (e.g. 'DATASET.LIB')- Returns:
- http response object
- Throws:
Exception
- error processing request
-
getDataSetInfo
public Dataset getDataSetInfo(String dataSetName) throws Exception
Retrieves the information about a Dataset.- Parameters:
dataSetName
- sequential or partition dataset (e.g. 'DATASET.LIB')- Returns:
- dataset object
- Throws:
Exception
- error processing request
-
writeDsn
public Response writeDsn(String dataSetName, String member, String content) throws Exception
Replaces the content of a member of a partitioned data set (PDS or PDSE) with new content. A new dataset member will be created if the specified dataset member does not exist.- Parameters:
dataSetName
- dataset name of where the member is located (e.g. 'DATASET.LIB')member
- name of member to add new contentcontent
- new content- Returns:
- http response object
- Throws:
Exception
- error processing request
-
writeDsn
public Response writeDsn(String dataSetName, String content) throws Exception
Replaces the content of an existing sequential data set with new content.- Parameters:
dataSetName
- sequential dataset (e.g. 'DATASET.LIB')content
- new content- Returns:
- http response object
- Throws:
Exception
- error processing request
-
-