com.ibm.cics.zos.comm
Interface IZOSConnection

All Superinterfaces:
IConnection, IZOSJobConnection

public interface IZOSConnection
extends IConnection, IZOSJobConnection

Abstraction of a connection to a z/OS system


Nested Class Summary
static class IZOSConnection.DataSetArguments
          Parameter object used when creating datasets
 
Field Summary
static java.lang.String CATEGORY_ID
          z/OS connection category ID
static java.lang.String COPYRIGHT
           
static java.lang.String FTP_DESCRIPTOR_ID
          z/OS FTP connection type ID
 
Method Summary
 void cancelJob(java.lang.String jobID)
          Cancels an active job
 boolean canPerform(java.lang.String actionID, java.lang.String iD)
          Returns a boolean indicating whether or not this z/OS connection is capable of performing the indicated action.
 void changePermissions(java.lang.String anHFSEntry, java.lang.String octal)
          Sets the permissions of an HFS resource
 void createDataSet(java.lang.String dataSetName, IZOSConnection.DataSetArguments dataSetArguments)
          Creates a new dataset using the supplied IZOSConnection.DataSetArguments.
 void createDataSet(java.lang.String dataSetName, java.lang.String basedOnDataSetPath, java.io.InputStream contents)
          Creates a new dataset based on an existing dataset
 ZOSConnectionResponse createDataSetMember(java.lang.String dataSetName, java.lang.String memberName)
          Creates a new member in an existing PDS.
 void createFolderHFS(java.lang.String aPath)
          Creates a new folder in HFS
 void deleteDataSet(java.lang.String dataSetName, java.lang.String memberName)
          Deletes a member of a PDS.
 void deleteJob(java.lang.String jobID)
          Deletes a job from the z/OS job queue
 void deletePathHFS(java.lang.String folderName)
          Deletes a named folder in HFS
 boolean existsHFS(java.lang.String aPath)
          Determines whether or not the supplied HFS path exists
 boolean existsHFSFile(java.lang.String path, java.lang.String aName)
          Determines whether a particular HFS file exists
 ZOSConnectionResponse getDataSet(java.lang.String dataSetName)
          Retrieve metadata for a named dataset.
 ZOSConnectionResponse getDataSetMember(java.lang.String dataSetName, java.lang.String memberName)
          Retrieve metadata for a dataset member.
 java.util.List<ZOSConnectionResponse> getDataSetMembers(java.lang.String dataSetName)
          Retrive a list of children of a dataset.
 java.io.ByteArrayOutputStream getFileHFS(java.lang.String fileName, FileType aFileType)
          Retrieve the contents of a file from HFS
 java.util.List<ZOSConnectionResponse> getHFSChildren(java.lang.String aPath, boolean includeHiddenFiles)
          Returns metadata for all children of a given HFS path.
 java.io.ByteArrayOutputStream getJobSpool(java.lang.String jobID)
          Return the job spool for a named job
 void perform(java.lang.String request, java.lang.String argument)
          Deprecated. not used
 void recallDataSetMember(java.lang.String dataSetName, java.lang.String memberName)
          Recalls a migrated dataset.
 java.io.ByteArrayOutputStream retrieveDataSetMember(java.lang.String dataSetName, java.lang.String memberName)
          Retrieve the contents of a PDS member.
 java.io.ByteArrayOutputStream retrieveSequentialDataSet(java.lang.String dataSetName)
          Retrieves the contents of a sequential dataset.
 void saveDataSetMember(java.lang.String dataSetName, java.lang.String memberName, java.io.InputStream dataSetContents)
          Saves the data provided by the supplied InputStream to the identified dataset member.
 void saveFileHFS(java.lang.String filePath, java.io.InputStream fileContents, FileType aFileType)
          Saves the contents of an InputStream to an HFS file.
 java.io.ByteArrayOutputStream submitDataSetMember(java.lang.String dataSetName, java.lang.String memberName)
          Submits a PDS member as a job.
 ZOSConnectionResponse submitJob(java.io.InputStream stream)
          Submits the contents of the supplied input stream to the z/OS job queue
 
Methods inherited from interface com.ibm.cics.zos.comm.IZOSJobConnection
getJob, getJobs, getJobSteps, getJobStepSpool
 
Methods inherited from interface com.ibm.cics.core.comm.IConnection
connect, disconnect, getConfiguration, getHost, getName, getPort, getUserID, isConnected, isSecure, setConfiguration
 

Field Detail

COPYRIGHT

static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

CATEGORY_ID

static final java.lang.String CATEGORY_ID
z/OS connection category ID

See Also:
Constant Field Values

FTP_DESCRIPTOR_ID

static final java.lang.String FTP_DESCRIPTOR_ID
z/OS FTP connection type ID

See Also:
Constant Field Values
Method Detail

getDataSetMembers

java.util.List<ZOSConnectionResponse> getDataSetMembers(java.lang.String dataSetName)
                                                        throws ConnectionException
Retrive a list of children of a dataset. The supplied dataSet name can reference a wildcarded filter, a set of qualifiers for sequential datasets, or the name of a PDS to list the members.

Parameters:
dataSetName - string to find the children for.
Returns:
a List of ZOSConnectionResponses, which may be empty.
Throws:
ConnectionException - if there is any problem completing the request.

retrieveDataSetMember

java.io.ByteArrayOutputStream retrieveDataSetMember(java.lang.String dataSetName,
                                                    java.lang.String memberName)
                                                    throws ConnectionException
Retrieve the contents of a PDS member.

Parameters:
dataSetName - name of the PDS
memberName - name of the member of the PDS
Returns:
a ByteArrayOutputStream containing the contents of the member
Throws:
ConnectionException - if a problem occurs retrieving the member contents

recallDataSetMember

void recallDataSetMember(java.lang.String dataSetName,
                         java.lang.String memberName)
                         throws ConnectionException
Recalls a migrated dataset.

Parameters:
dataSetName - name of the dataset to recall
memberName -
Throws:
ConnectionException - if there is any problem recalling the dataset

retrieveSequentialDataSet

java.io.ByteArrayOutputStream retrieveSequentialDataSet(java.lang.String dataSetName)
                                                        throws ConnectionException
Retrieves the contents of a sequential dataset.

Parameters:
dataSetName - name of the dataset
Returns:
the contents of the dataset
Throws:
ConnectionException - if there is a problem retrieving the contents

submitDataSetMember

java.io.ByteArrayOutputStream submitDataSetMember(java.lang.String dataSetName,
                                                  java.lang.String memberName)
                                                  throws ConnectionException
Submits a PDS member as a job.

Parameters:
dataSetName - containing dataset name
memberName - member to submit
Returns:
a response
Throws:
ConnectionException - if there is a problem submitting the member

saveDataSetMember

void saveDataSetMember(java.lang.String dataSetName,
                       java.lang.String memberName,
                       java.io.InputStream dataSetContents)
                       throws ConnectionException
Saves the data provided by the supplied InputStream to the identified dataset member.

Parameters:
dataSetName - the name of a dataset
memberName - the name of a member in that dataset
dataSetContents - data to write
Throws:
ConnectionException - if there is any problem writing data

deleteDataSet

void deleteDataSet(java.lang.String dataSetName,
                   java.lang.String memberName)
                   throws ConnectionException
Deletes a member of a PDS.

Parameters:
dataSetName - name of a dataset
memberName - name of the member
Throws:
ConnectionException - if there is a problem deleting the member

createDataSet

void createDataSet(java.lang.String dataSetName,
                   IZOSConnection.DataSetArguments dataSetArguments)
                   throws ConnectionException
Creates a new dataset using the supplied IZOSConnection.DataSetArguments.

Parameters:
dataSetName - dataset name
dataSetArguments - set of parameters to use when constructing the dataset
Throws:
ConnectionException - if there is a problem constructing the dataset

getDataSet

ZOSConnectionResponse getDataSet(java.lang.String dataSetName)
                                 throws ConnectionException,
                                        ZOSFileNotFoundException
Retrieve metadata for a named dataset.

Parameters:
dataSetName - name of a dataset
Returns:
a ZOSConnectionResponse containing metadata for that dataset.
Throws:
ZOSFileNotFoundException - if the named dataset can not be found.
ConnectionException - if there is a problem retrieving the metadata.

getDataSetMember

ZOSConnectionResponse getDataSetMember(java.lang.String dataSetName,
                                       java.lang.String memberName)
                                       throws ConnectionException,
                                              ZOSFileNotFoundException
Retrieve metadata for a dataset member.

Parameters:
dataSetName - name of a dataset
memberName - name of a member within the dataset
Returns:
a ZOSConnectionResponse containing metadata for that dataset.
Throws:
ZOSFileNotFoundException - if the dataset or member can't be found
ConnectionException - if a problem occurs retrieving the metadata

createDataSetMember

ZOSConnectionResponse createDataSetMember(java.lang.String dataSetName,
                                          java.lang.String memberName)
                                          throws ConnectionException
Creates a new member in an existing PDS.

Parameters:
dataSetName - name of a PDS
memberName - name of the member to create
Returns:
ZOSConnectionResponse containing metadata for the new dataset member
Throws:
ConnectionException - if a problem occurs when creating the new member

createDataSet

void createDataSet(java.lang.String dataSetName,
                   java.lang.String basedOnDataSetPath,
                   java.io.InputStream contents)
                   throws ConnectionException
Creates a new dataset based on an existing dataset

Parameters:
dataSetName - name of the new dataset
basedOnDataSetPath - name of an existing dataset to base the new dataset on
contents - contents to set to the new dataset
Throws:
ConnectionException - if a problem occurs when creating the new dataset

getHFSChildren

java.util.List<ZOSConnectionResponse> getHFSChildren(java.lang.String aPath,
                                                     boolean includeHiddenFiles)
                                                     throws ConnectionException
Returns metadata for all children of a given HFS path.

Parameters:
aPath - path
includeHiddenFiles - whether or not to include hidden files
Returns:
a List of ZOSConnectionResponse containing metadata for all applicable children
Throws:
ConnectionException - if a problem occurs

existsHFS

boolean existsHFS(java.lang.String aPath)
                  throws ConnectionException
Determines whether or not the supplied HFS path exists

Parameters:
aPath - path to investigate
Returns:
true if the supplied path exists, false if not
Throws:
ConnectionException - if a problem occurs

existsHFSFile

boolean existsHFSFile(java.lang.String path,
                      java.lang.String aName)
                      throws ConnectionException
Determines whether a particular HFS file exists

Parameters:
path - root path
aName - file name
Returns:
true if the named file exists at the named path, false if not
Throws:
ConnectionException - if a problem occurs

createFolderHFS

void createFolderHFS(java.lang.String aPath)
                     throws ConnectionException
Creates a new folder in HFS

Parameters:
aPath - path of the new folder to create
Throws:
ConnectionException - if a problem occurs

deletePathHFS

void deletePathHFS(java.lang.String folderName)
                   throws ConnectionException
Deletes a named folder in HFS

Parameters:
folderName - name of the folder to delete
Throws:
ConnectionException - if a problem occurs

saveFileHFS

void saveFileHFS(java.lang.String filePath,
                 java.io.InputStream fileContents,
                 FileType aFileType)
                 throws ConnectionException
Saves the contents of an InputStream to an HFS file.

Parameters:
filePath - path of the file to save to
fileContents - contents to save
aFileType - transfer type
Throws:
ConnectionException - if a problem occurs

getFileHFS

java.io.ByteArrayOutputStream getFileHFS(java.lang.String fileName,
                                         FileType aFileType)
                                         throws ConnectionException
Retrieve the contents of a file from HFS

Parameters:
fileName - name of the file
aFileType - transfer type
Returns:
a ByteArrayOutputStream containing the contents of the file
Throws:
ConnectionException - if a problem occurs

getJobSpool

java.io.ByteArrayOutputStream getJobSpool(java.lang.String jobID)
                                          throws ConnectionException
Return the job spool for a named job

Parameters:
jobID - ID of the target job
Returns:
a ByteArrayOutputStream containing the spool for the named job
Throws:
ConnectionException - if a problem occurs

submitJob

ZOSConnectionResponse submitJob(java.io.InputStream stream)
                                throws ConnectionException
Submits the contents of the supplied input stream to the z/OS job queue

Parameters:
stream - InputStream containing JCL for a job
Returns:
a ZOSConnectionResponse containing metadata for the job.
Throws:
ConnectionException - if a problem occurs

deleteJob

void deleteJob(java.lang.String jobID)
               throws ConnectionException
Deletes a job from the z/OS job queue

Parameters:
jobID - ID of the job to delete
Throws:
ConnectionException - if a problem occurs

cancelJob

void cancelJob(java.lang.String jobID)
               throws ConnectionException,
                      ZOSFileNotFoundException,
                      ZOSPermissionDeniedException
Cancels an active job

Parameters:
jobID - ID of the target job
Throws:
ConnectionException - if a problem occurs
ZOSPermissionDeniedException - if there was a permissions problem
ZOSFileNotFoundException - if a job with the supplied ID did not exist

canPerform

boolean canPerform(java.lang.String actionID,
                   java.lang.String iD)
Returns a boolean indicating whether or not this z/OS connection is capable of performing the indicated action. Actions are enumerated in IZOSConstants.

Parameters:
actionID - ID of an action to enquire
iD - ID of the action target
Returns:
true if the action is permitted, false if not.

perform

@Deprecated
void perform(java.lang.String request,
                        java.lang.String argument)
             throws ConnectionException
Deprecated. not used

Throws:
ConnectionException

changePermissions

void changePermissions(java.lang.String anHFSEntry,
                       java.lang.String octal)
                       throws ConnectionException
Sets the permissions of an HFS resource

Parameters:
anHFSEntry - target HFS resource
octal - octal permission value
Throws:
ConnectionException - if a problem occurs


Copyright © 2013 IBM Corp. All Rights Reserved.