DB2FileReference class

The com.ibm.db2.jcc.DB2FileReference class is an abstract class that defines methods that support insertion of data into tables from file reference variables. This class applies only to IBM® Data Server Driver for JDBC and SQLJ type 2 connectivity to Db2® for z/OS® Version 9 or later.

DB2FileReference fields

The following constants define types codes only for the IBM Data Server Driver for JDBC and SQLJ.

public static final short MAX_FILE_NAME_LENGTH = 255
The maximum length of the file name for a file reference variable.

DB2FileReference methods

The following methods are defined only for the IBM Data Server Driver for JDBC and SQLJ.

getDriverType
Format:
public int getDriverType()

Returns the server data type of the file reference variable. This type is one of the values in com.ibm.db2.jcc.DB2Types.

getFileEncoding
Format:
public String getFileEncoding()

Returns the encoding of the data in the file for a DB2FileReference object.

getFileName
Format:
public String getFileName()

Returns the file name for a DB2FileReference object.

getFileCcsid
Format:
public int getFileCcsid()

Returns the CCSID of the data in the file for a DB2FileReference object.

setFileName
Format:
public String setFileName(String fileName)
  throws java.sql.SQLException

Sets the file name in a DB2FileReference object.

Parameter descriptions:
fileName
The name of the input file for the file reference variable. The name must specify an existing HFS file.