Mixed Input Records
The input file to the load process can contain different types of input records. For example, the input file might contain an EMPLOYEE record, followed by a DEPARTMENT record, followed by an OFFICE record and so on; to distinguish the different types of records, you must include a record identifier (in this example, at the end of the record):
0574SMITH JOHN 254 WILLOW ST NEEDHAM MA 4035 415 4001PERSONNEL MASON PAULA 5538 0020 410 0020CHICAGO 3 CORPORATE PLACE 450
Note: By including record identifiers at the end of the input records, you may be able to avoid listing individual column definitions in the LOAD statement.
Loading Multiple Tables
You can load more than one table in the same load operation by using one of the following techniques:
Identifying Columns Implicitly
If, in the LOAD statement, you do not explicitly list the columns in the table to be loaded, CA IDMS/DB assumes that values are supplied for all columns in the table. It starts with position 1 of the input record and extracts input values for each column of the table. To be successful, the input data must match the order, data type, length, and null criteria specified in the table definition. Columns that allow null values must be represented by a data field and an indicator field, which is described under "Null values".
Identifying Columns Explicitly
If you supply values for only some of the columns within the table or if the order or data types of the values in the input file do not match that of the columns in the table, you must tell CA IDMS/DB:
If you omit a column name, the column must either:
Data Types
If you explicitly list the columns to be loaded, the data type of the value to be stored can be different from the data type defined for the column provided the data types are compatible. For example, a column defined as CHARACTER is compatible with data types VARCHAR, DATE, TIME, and TIMESTAMP.
Note: For more information about compatible data types, see the CA IDMS SQL Reference Guide.
Null Values
Null values in an input file can be represented as either:
If you do not explicitly list the columns to be loaded, then all columns that permit null values must be followed by a 4-byte indicator field.
|
Copyright © 2014 CA.
All rights reserved.
|
|