C API Syntax
/* File: sqlutil.h */ /* API: Import */ /* ... */ SQL_API_RC SQL_API_FN sqluimpr ( char * pDataFileName, sqlu_media_list * pLobPathList, struct sqldcol * pDataDescriptor, struct sqlchar * pActionString, char * pFileType, struct sqlchar * pFileTypeMod, char * pMsgFileName, short CallerAction, struct sqluimpt_in* pImportInfoIn, struct sqluimpt_out* pImportInfoOut, long * pNullIndicators, void * pReserved, struct sqlca * pSqlca); /* ... */ |
Generic API Syntax
/* File: sqlutil.h */ /* API: Import */ /* ... */ SQL_API_RC SQL_API_FN sqlgimpr ( unsigned short DataFileNameLen, unsigned short FileTypeLen, unsigned short MsgFileNameLen, char * pDataFileName, sqlu_media_list * pLobPathList, struct sqldcol * pDataDescriptor, struct sqlchar * pActionString, char * pFileType, struct sqlchar * pFileTypeMod, char * pMsgFileName, short CallerAction, struct sqluimpt_in* pImportInfoIn, struct sqluimpt_out* pImportInfoOut, long * NullIndicators, void * pReserved, struct sqlca * pSqlca); /* ... */ |
API Parameters
For more information, see "SQLU-MEDIA-LIST " in the Administrative API Reference.
A location pair with both locations equal to zero indicates that a nullable column is to be filled with NULLs.
For more information, see "SQLDCOL" in the Administrative API Reference.
The character array is of the form:
{INSERT | INSERT_UPDATE | REPLACE | CREATE | REPLACE_CREATE} INTO {tname[(tcolumn-list)] | [{ALL TABLES | (tname[(tcolumn-list)][, tname[(tcolumn-list)]])}] [IN] HIERARCHY {STARTING tname | (tname[, tname])} [UNDER sub-table-name | AS ROOT TABLE]} [DATALINK SPECIFICATION datalink-spec]
Attention: If an error occurs after the existing data is deleted, that data is lost.
Attention: If an error occurs after the existing data is deleted, that data is lost.
The tname and the tcolumn-list parameters correspond to the tablename and the colname lists of SQL INSERT statements, and have the same restrictions.
The columns in tcolumn-list and the external columns (either specified or implied) are matched according to their position in the list or the structure (data from the first column specified in the sqldcol structure is inserted into the table or view field corresponding to the first element of the tcolumn-list).
If unequal numbers of columns are specified, the number of columns actually processed is the lesser of the two numbers. This could result in an error (because there are no values to place in some non-nullable table fields) or an informational message (because some external file columns are ignored).
For more information, see "SQLCHAR" in the Administrative API Reference.
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 (Import).
If the initial call or any subsequent call returns and requires the calling application to perform some action prior to completing the requested import operation, the caller action must be set to one of the following:
REXX API Syntax
IMPORT FROM datafile OF filetype [MODIFIED BY :filetmod] [METHOD {L|N|P} USING :dcoldata] [COMMITCOUNT :commitcnt] [RESTARTCOUNT :restartcnt] MESSAGES msgfile {INSERT|REPLACE|CREATE|INSERT_UPDATE|REPLACE_CREATE} INTO tname [(:columns)] [OUTPUT INTO :output] CONTINUE IMPORT STOP IMPORT |
REXX API Parameters