C API Syntax
/* File: sqlutil.h */ /* API: Load */ /* ... */ SQL_API_RC SQL_API_FN sqluload ( sqlu_media_list * pDataFileList, sqlu_media_list * pLobPathList, struct sqldcol * pDataDescriptor, struct sqlchar * pActionString, char * pFileType, struct sqlchar * pFileTypeMod, char * pLocalMsgFileName, char * pRemoteMsgFileName, short CallerAction, struct sqluload_in * pLoadInfoIn, struct sqluload_out * pLoadInfoOut, sqlu_media_list * pWorkDirectoryList, sqlu_media_list * pCopyTargetList, sqlint32 * pNullIndicators, void * pReserved, struct sqlca * pSqlca); /* ... */ |
Generic API Syntax
/* File: sqlutil.h */ /* API: Load */ /* ... */ SQL_API_RC SQL_API_FN sqlgload ( unsigned short FileTypeLen, unsigned short LocalMsgFileNameLen, unsigned short RemoteMsgFileNameLen, sqlu_media_list * pDataFileList, sqlu_media_list * pLobPathList, struct sqldcol * pDataDescriptor, struct sqlchar * pActionString, char * pFileType, struct sqlchar * pFileTypeMod, char * pLocalMsgFileName, char * pRemoteMsgFileName, short CallerAction, struct sqluload_in * pLoadInfoIn, struct sqluload_out * pLoadInfoOut, sqlu_media_list * pWorkDirectoryList, sqlu_media_list * pCopyTargetList, sqlint32 * pNullIndicators, void * pReserved, struct sqlca * pSqlca); /* ... */ |
API Parameters
The information provided in this structure depends on the value of the media_type field. Valid values (defined in sqlutil) are:
Wherever a file name is provided, it should be fully qualified. For more information, see "SQLU-MEDIA-LIST " in the Administrative API Reference.
The information provided in this structure depends on the value of the media_type field. Valid values (defined in sqlutil) are:
For more information, see "SQLU-MEDIA-LIST " in the Administrative API Reference.
If the pFileType parameter is set to SQL_ASC, the dcolmeth field of this structure must be set to SQL_METH_L. The user specifies the start and end locations for each column to be loaded.
If the file type is SQL_DEL, dcolmeth can be either SQL_METH_P or SQL_METH_D. If it is SQL_METH_P, the user must provide the source column position. If it is SQL_METH_D, the first column in the file is loaded into the first column of the table, and so on.
If the file type is SQL_IXF, dcolmeth can be one of SQL_METH_P, SQL_METH_D, or SQL_METH_N. The rules for DEL files apply here, except that SQL_METH_N indicates that file column names are to be provided in the sqldcol structure.
For more information, see "SQLDCOL" in the Administrative API Reference.
The character array is of the form:
"INSERT|REPLACE|RESTART|TERMINATE INTO tbname [(column_list)] [DATALINK SPECIFICATION datalink-spec] [FOR EXCEPTION e_tbname]"
The load terminate option will not remove a backup pending state from table spaces.
For more information about file formats, see Appendix C, Export/Import/Load Utility File Formats.
Not all options can be used with all of the supported file types.
For more information, see "SQLCHAR" in the Administrative API Reference, and File Type Modifiers (Load).
If the initial call or any subsequent call returns and requires the calling application to perform some action prior to completing the requested load operation, the caller action must be set to one of the following:
The values provided in this structure depend on the value of the media_type field. Valid values for this field (defined in sqlutil) are:
For more information, see "SQLU-MEDIA-LIST " in the Administrative API Reference.
REXX API Syntax
This API can be called from REXX through the SQLDB2 interface. See the Application Development Guide. For a description of the syntax, see LOAD Command.