public class KeyedFile extends RemotableResource
This is the implementation class for the KeyedFile interface.
com.ibm.cics.server.API for general restrictions on using the JCICS API.,
Serialized Form| Constructor and Description |
|---|
KeyedFile()
Construct a default KeyedFile object.
|
KeyedFile(java.lang.String name)
Construct a KeyedFile with a specific name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
read(byte[] key,
RecordHolder holder)
Read a specific record from a file.
|
void |
read(byte[] key,
SearchType searchType,
RecordHolder holder)
Read a record from a file using the specified type of search.
|
void |
readForUpdate(byte[] key,
RecordHolder holder)
Read a specific record from a file, locking it for update.
|
void |
readForUpdate(byte[] key,
SearchType searchType,
RecordHolder holder)
Read a record from a file using the specified type of search, locking
it for update.
|
void |
readGeneric(byte[] key,
RecordHolder holder)
Read a record from a file using a generic key.
|
void |
readGeneric(byte[] key,
SearchType searchType,
RecordHolder holder)
Read a record from a file using a generic key and specifying the type
of search..
|
void |
readGenericForUpdate(byte[] key,
RecordHolder holder)
Read a record for update from a file using a generic key.
|
void |
readGenericForUpdate(byte[] key,
SearchType searchType,
RecordHolder holder)
Read a record for update from a file using a generic key.
|
void |
rewrite(byte[] data)
Update a record in a file.
|
KeyedFileBrowse |
startBrowse(byte[] key)
Create a browse against the file.
|
KeyedFileBrowse |
startBrowse(byte[] key,
SearchType searchType)
Create a browse against the file with a starting position determined
by the type of search specified.
|
KeyedFileBrowse |
startGenericBrowse(byte[] key,
int fullKeyLength)
Create a browse against the file using a generic key to specify the
starting position.
|
KeyedFileBrowse |
startGenericBrowse(byte[] key,
int fullKeyLength,
SearchType searchType)
Create a browse against the file with a starting position determined
by the type of search specified.
|
void |
unlock()
Unlock a file.
|
getSysId, setSysIdgetDescription, getName, setDescription, setNamegetCICSServerApiVersionpublic KeyedFile()
public KeyedFile(java.lang.String name)
name - The name of the KeyedFilepublic void read(byte[] key,
RecordHolder holder)
throws FileDisabledException,
DuplicateKeyException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
RecordNotFoundException,
NotOpenException,
InvalidSystemIdException,
ChangedException,
LockedException,
LoadingException,
RecordBusyException
key - The key for the record.
Make sure that the byte array is not shorter than the key length of the file you are reading;
otherwise, the results are unpredictable.holder - A RecordHolder in which is returned a byte array containing
the record.
If you know in advance the size of the object to be returned you can
initialise the holder with a byte array of the correct size and CICS will
not then allocate one.
If you pass in a byte array shorter than is necessary CICS will ignore it
and allocate an array of the correct size.
The reference to the original array will be lost.FileDisabledException - DISABLEDDuplicateKeyException - DUPKEYFileNotFoundException - FILENOTFOUNDLogicException - ILLOGICInvalidRequestException - INVREQIOErrorException - IOERRISCInvalidRequestException - ISCINVREQNotAuthorisedException - NOTAUTHRecordNotFoundException - NOTFNDNotOpenException - NOTOPENInvalidSystemIdException - SYSIDERRRecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void read(byte[] key,
SearchType searchType,
RecordHolder holder)
throws FileDisabledException,
DuplicateKeyException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
RecordNotFoundException,
NotOpenException,
InvalidSystemIdException,
LockedException,
ChangedException,
LoadingException,
RecordBusyException
key - The key for the record.
Make sure that the byte array is not shorter than the key length of the file you are reading;
otherwise, the results are unpredictable.searchType - the SearchTypeholder - The recordFileDisabledException - DISABLEDDuplicateKeyException - DUPKEYFileNotFoundException - FILENOTFOUNDLogicException - ILLOGICInvalidRequestException - INVREQIOErrorException - IOERRISCInvalidRequestException - ISCINVREQNotAuthorisedException - NOTAUTHRecordNotFoundException - NOTFNDNotOpenException - NOTOPENInvalidSystemIdException - SYSIDERRRecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void readForUpdate(byte[] key,
RecordHolder holder)
throws FileDisabledException,
DuplicateKeyException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
RecordNotFoundException,
NotOpenException,
InvalidSystemIdException,
LockedException,
ChangedException,
LoadingException,
RecordBusyException
key - The key for the record.
Make sure that the byte array is not shorter than the key length of the file you are reading; otherwise,
the results are unpredictable.holder - the RecordFileDisabledException - DISABLEDDuplicateKeyException - DUPKEYFileNotFoundException - FILENOTFOUNDLogicException - ILLOGICInvalidRequestException - INVREQIOErrorException - IOERRISCInvalidRequestException - ISCINVREQNotAuthorisedException - NOTAUTHRecordNotFoundException - NOTFNDNotOpenException - NOTOPENInvalidSystemIdException - SYSIDERRRecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void readForUpdate(byte[] key,
SearchType searchType,
RecordHolder holder)
throws FileDisabledException,
DuplicateKeyException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
RecordNotFoundException,
NotOpenException,
InvalidSystemIdException,
LockedException,
ChangedException,
LoadingException,
RecordBusyException
key - The key to be used when searching for the record.
Make sure that the byte array is not shorter than the key length of the file you are reading; otherwise,
the results are unpredictable.searchType - A value specifying the type of search to use.
Possible values are:
holder - A RecordHolder in which is returned a byte array containing
the record.FileDisabledException - This exception is
thrown if the file is disabled.DuplicateKeyException - This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException - This exception is
thrown if the file is not found in the File Definitions (FD).LogicException - This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException - This exception is
thrown in the following circumstances:
IOErrorException - This exception is
thrown if an I/O error occurs.ISCInvalidRequestException - This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException - This exception
is thrown in the following situations:
RecordNotFoundException - This exception
is thrown if a record could not be found with the key specified.NotOpenException - This exception
is thrown if the file is not open.InvalidSystemIdException - This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void readGeneric(byte[] key,
RecordHolder holder)
throws FileDisabledException,
DuplicateKeyException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
RecordNotFoundException,
NotOpenException,
InvalidSystemIdException,
LockedException,
ChangedException,
LoadingException,
RecordBusyException
key - The generic key. The length of the generic key must be
less than the full key length.holder - A RecordHolder in which is returned a byte array containing
the record.FileDisabledException - This exception is
thrown if the file is disabled.DuplicateKeyException - This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException - This exception is
thrown if the file is not found in the File Definitions (FD).LogicException - This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException - This exception is
thrown in the following circumstances:
IOErrorException - This exception is
thrown if an I/O error occurs.ISCInvalidRequestException - This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException - This exception
is thrown in the following situations:
RecordNotFoundException - This exception
is thrown if a record could not be found with the key specified.NotOpenException - This exception
is thrown if the file is not open.InvalidSystemIdException - This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void readGeneric(byte[] key,
SearchType searchType,
RecordHolder holder)
throws FileDisabledException,
DuplicateKeyException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
RecordNotFoundException,
NotOpenException,
InvalidSystemIdException,
ChangedException,
LockedException,
LoadingException,
RecordBusyException
key - The generic key. The length of the generic key must be
less than the full key length.searchType - A value specifying the type of search to use.
Possible values are:
holder - A RecordHolder in which is returned a byte array containing
the record.FileDisabledException - This exception is
thrown if the file is disabled.DuplicateKeyException - This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException - This exception is
thrown if the file is not found in the File Definitions (FD).LogicException - This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException - This exception is
thrown in the following circumstances:
IOErrorException - This exception is
thrown if an I/O error occurs.ISCInvalidRequestException - This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException - This exception
is thrown in the following situations:
RecordNotFoundException - This exception
is thrown if a record could not be found with the key specified.NotOpenException - This exception
is thrown if the file is not open.InvalidSystemIdException - This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void readGenericForUpdate(byte[] key,
RecordHolder holder)
throws FileDisabledException,
DuplicateKeyException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
RecordNotFoundException,
NotOpenException,
InvalidSystemIdException,
ChangedException,
LockedException,
LoadingException,
RecordBusyException
key - The generic key. The length of the generic key must be
less than the full key length.holder - A RecordHolder in which is returned a byte array containing
the record.FileDisabledException - This exception is
thrown if the file is disabled.DuplicateKeyException - This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException - This exception is
thrown if the file is not found in the File Definitions (FD).LogicException - This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException - This exception is
thrown in the following circumstances:
IOErrorException - This exception is
thrown if an I/O error occurs.ISCInvalidRequestException - This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException - This exception
is thrown in the following situations:
RecordNotFoundException - This exception
is thrown if a record could not be found with the key specified.NotOpenException - This exception
is thrown if the file is not open.InvalidSystemIdException - This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void readGenericForUpdate(byte[] key,
SearchType searchType,
RecordHolder holder)
throws FileDisabledException,
DuplicateKeyException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
RecordNotFoundException,
NotOpenException,
InvalidSystemIdException,
ChangedException,
LockedException,
LoadingException,
RecordBusyException
key - The generic key. The length of the generic key must be
less than the full key length.searchType - A value specifying the type of search to use.
Possible values are:
holder - A RecordHolder in which is returned a byte array containing
the record.FileDisabledException - This exception is
thrown if the file is disabled.DuplicateKeyException - This exception is
thrown if a record is retrieved by way of an alternate index that
supports non-unique keys, and another alternate index record with the
same key follows.FileNotFoundException - This exception is
thrown if the file is not found in the File Definitions (FD).LogicException - This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException - This exception is
thrown in the following circumstances:
IOErrorException - This exception is
thrown if an I/O error occurs.ISCInvalidRequestException - This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.NotAuthorisedException - This exception
is thrown in the following situations:
RecordNotFoundException - This exception
is thrown if a record could not be found with the key specified.NotOpenException - This exception
is thrown if the file is not open.InvalidSystemIdException - This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void rewrite(byte[] data)
throws FileDisabledException,
DuplicateRecordException,
FileNotFoundException,
LogicException,
InvalidRequestException,
IOErrorException,
ISCInvalidRequestException,
LengthErrorException,
NoSpaceException,
NotAuthorisedException,
NotOpenException,
InvalidSystemIdException,
ChangedException,
LockedException,
LoadingException,
RecordBusyException
data - The data comprising the new value of the record.FileDisabledException - This exception is
thrown if the file is disabled.DuplicateRecordException - This exception is
thrown if the underlying file has an active alternate index that
accepts only unique keys, and the record to be updated for this index
has a key that duplicates an existing value.FileNotFoundException - This exception is
thrown if the file is not found in the File Definitions (FD).LogicException - This exception is thrown
if an error occurs that does not map to any other exception.InvalidRequestException - This exception is
thrown in the following circumstances:
IOErrorException - This exception is
thrown if an I/O error occurs.ISCInvalidRequestException - This exception
is thrown if a remote system indicates a failure that does not correspond
to a known condition.LengthErrorException - This exceptionNoSpaceException - This exceptionNotAuthorisedException - This exception
is thrown in the following situations:
NotOpenException - This exception
is thrown if the file is not open.InvalidSystemIdException - This exception
is thrown if the SYSID used to construct the File object is not defined
in the Communications Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic KeyedFileBrowse startBrowse(byte[] key) throws FileDisabledException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException, LockedException, RecordBusyException, LoadingException, ChangedException
key - The key of the record at which to start the browse.
This key must be an exact key.FileDisabledException - The file is disabled.FileNotFoundException - The file is not defined in the File
Definitions (FD).LogicException - An error not covered by any other exception
occurred.InvalidRequestException - This exception is thrown for the
following reasons:
IOErrorException - This exception is thrown if there is an
I/O error during the file control operation.ISCInvalidRequestException - This exception is thrown
if the remote system indicates a failure that does not correspond to a
known condition.NotAuthorisedException - This exception is thrown
for the following reasons:
RecordNotFoundException - This exception is thrown
if an attempt is made to start the browse positioned on a record which
cannot be found.NotOpenException - This exception is thrown
for the following reasons:
InvalidSystemIdException - This exception is thrown
if the named connection cannot be found in the Communications
Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic KeyedFileBrowse startBrowse(byte[] key, SearchType searchType) throws FileDisabledException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException, LockedException, ChangedException, LoadingException, RecordBusyException
key - The key of the record at which to start the browse.
This key must be a full-length key but it is not necessary for the key
to exactly match a record in the file if the search type is GTEQ.searchType - A value specifying the type of search to use.
Possible values are:
FileDisabledException - The file is disabled.FileNotFoundException - The file is not defined in the File
Definitions (FD).LogicException - An error not covered by any other exception
occurred.InvalidRequestException - This exception is thrown for the
following reasons:
IOErrorException - This exception is thrown if there is an
I/O error during the file control operation.ISCInvalidRequestException - This exception is thrown
if the remote system indicates a failure that does not correspond to a
known condition.NotAuthorisedException - This exception is thrown
for the following reasons:
RecordNotFoundException - This exception is thrown
if an attempt is made to start the browse positioned on a record which
cannot be found.NotOpenException - This exception is thrown
for the following reasons:
InvalidSystemIdException - This exception is thrown
if the named connection cannot be found in the Communications
Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic KeyedFileBrowse startGenericBrowse(byte[] key, int fullKeyLength) throws FileDisabledException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException, LockedException, ChangedException, LoadingException, RecordBusyException
key - The key of the record at which to start the browse.
This key must be a generic key, that is be shorter than the full key.fullKeyLength - The length of the full key of the file.FileDisabledException - The file is disabled.FileNotFoundException - The file is not defined in the File
Definitions (FD).LogicException - An error not covered by any other exception
occurred.InvalidRequestException - This exception is thrown for the
following reasons:
IOErrorException - This exception is thrown if there is an
I/O error during the file control operation.ISCInvalidRequestException - This exception is thrown
if the remote system indicates a failure that does not correspond to a
known condition.NotAuthorisedException - This exception is thrown
for the following reasons:
RecordNotFoundException - This exception is thrown
if an attempt is made to start the browse positioned on a record which
cannot be found.NotOpenException - This exception is thrown
for the following reasons:
InvalidSystemIdException - This exception is thrown
if the named connection cannot be found in the Communications
Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic KeyedFileBrowse startGenericBrowse(byte[] key, int fullKeyLength, SearchType searchType) throws FileDisabledException, FileNotFoundException, LogicException, InvalidRequestException, IOErrorException, ISCInvalidRequestException, NotAuthorisedException, RecordNotFoundException, NotOpenException, InvalidSystemIdException, LockedException, ChangedException, LoadingException, RecordBusyException
key - The key of the record at which to start the browse.
This key must be a generic key, that is, be shorter than the full key.fullKeyLength - The length of the full key of the file.searchType - A value specifying the type of search to use.
Possible values are:
FileDisabledException - The file is disabled.FileNotFoundException - The file is not defined in the File
Definitions (FD).LogicException - An error not covered by any other exception
occurred.InvalidRequestException - This exception is thrown for the
following reasons:
IOErrorException - This exception is thrown if there is an
I/O error during the file control operation.ISCInvalidRequestException - This exception is thrown
if the remote system indicates a failure that does not correspond to a
known condition.NotAuthorisedException - This exception is thrown
for the following reasons:
RecordNotFoundException - This exception is thrown
if an attempt is made to start the browse positioned on a record which
cannot be found.NotOpenException - This exception is thrown
for the following reasons:
InvalidSystemIdException - This exception is thrown
if the named connection cannot be found in the Communications
Definitions (CD).RecordBusyException - RECORDBUSYLoadingException - LOADINGLockedException - LOCKEDChangedException - CHANGEDpublic void unlock()
throws FileDisabledException,
FileNotFoundException,
LogicException,
IOErrorException,
ISCInvalidRequestException,
NotAuthorisedException,
NotOpenException,
InvalidSystemIdException
FileDisabledException - DISABLEDFileNotFoundException - FILENOTFOUNDLogicException - ILLOGICIOErrorException - IOERRISCInvalidRequestException - ISCINVREQNotAuthorisedException - NOTAUTHNotOpenException - NOTOPENInvalidSystemIdException - SYSIDERR