Create a map with a detailed specification file
When you create a map, the onpladm utility creates a format object with the same name as the map. When you create a map with a specification file, you must create all associated High-Performance Loader (HPL) objects; the onpladm utility does not create these objects for you.
Use the syntax shown in Specification-file conventions to create maps with specification files.
Use the following syntax to creating a load map with
a specification file:
BEGIN OBJECT LOADMAP mapname
# Compulsory Attributes
PROJECT projectname
FORMAT formatname
DATABASE targetdatabasename
TABLE targettablename
BEGIN SEQUENCE
COLUMNNAME columnname
FIELDNAME fieldname
JUSTIFICATION justification
CASECONVERT caseconversion
DEFAULTVALUE defaultvalue
TRANSFERBYTES byte_transfer
COLUMNOFFSET column_offset
FIELDOFFSET field_offset
FIELDMINIMUM field_minimum
FIELDMAXIMUM field_maximum
FILLCHARACTER fillcharacter
PICTURE picture
FUNCTION record_function
STORAGECODING storage_format
BLOBCOLUMN blob_columnname
END SEQUENCE
END OBJECT
The following table lists the attributes
and their values.
Attribute | Attribute value |
---|---|
blob_columnname | The column that contains the name of the file where BYTE or TEXT data is stored |
byte_transfer | Number of bytes to transfer from record field to database column |
caseconversion | Enter UPPER for all uppercase data, LOWER for all lowercase data, and PROPER for data with an initial capital letter |
columnname | Name of the column to be mapped |
column_offset | Amount of offset from the beginning of the column to the location on the column from which data transfer begins |
defaultvalue | Value when no field is mapped to the column |
fieldname | Field corresponding to the record format to be mapped |
field_maximum | Largest acceptable numeric-column value |
field_minimum | Smallest acceptable numeric-column value |
field_offset | Amount of offset from the start of the field record to the location in the record from which data transfer begins |
fillcharacter | Character used to pad contents of a field |
formatname | Associated format name You must create the format; onpladm does not create it for you. |
justification | Enter left, right, or CENTER to position text within a record |
mapname | Map name |
picture | Reformats and masks data from the field of a record before data is transferred to database |
projectname | Name of existing project |
record_function | User-defined function in a shared library that is called for every record that is processed |
storage_format | The format in which to store BYTE or TEXT data |
targetdatabasename | Name of the database that the records will be loaded and unloaded to |
targettablename | Target-table name |
Use the following syntax to create an unload map with
a specification file:
BEGIN OBJECT UNLOADMAP mapname
# Compulsory Attributes
PROJECT projectname
FORMAT formatname
DATABASE targetdatabasename
QUERY queryname
BEGIN SEQUENCE
COLUMNNAME columnname
FIELDNAME fieldname
JUSTIFICATION justification
CASECONVERT caseconversion
DEFAULTVALUE defaultvalue
TRANSFERBYTES byte_transfer
COLUMNOFFSET column_offset
FIELDOFFSET field_offset
FIELDMINIMUM field_minimum
FIELDMAXIMUM field_maximum
FILLCHARACTER fillcharacter
PICTURE picture
FUNCTION record_function
STORAGECODING storage_format
BLOBCOLUMN blob_columnname
END SEQUENCE
END OBJECT
The following table lists the attributes
and their values.
Attribute | Attribute value |
---|---|
blob_columnname | The column that contains the name of the file where BYTE or TEXT data is stored |
byte_transfer | Number of bytes to transfer from record field to database column |
caseconversion | Enter UPPER for all uppercase data, LOWER for all lowercase data, and PROPER for data with an initial capital letter |
columnname | Name of the column to be mapped |
column_offset | Amount of offset from the beginning of the column to the location on the column from which data transfer begins |
defaultvalue | Value when no field is mapped to the column |
fieldname | Field corresponding to the record format to be mapped |
field_maximum | Largest acceptable numeric-column value |
field_minimum | Smallest acceptable numeric-column value |
field_offset | Amount of offset from the start of the field record to the location in the record from which data transfer begins |
fillcharacter | Character used to pad contents of a field |
formatname | Associated format name |
justification | Enter left, right, or CENTER to position text within a record |
mapname | Map name |
picture | Reformats and masks data from the field of a record before data is transferred to database |
projectname | Name of existing project |
queryname | Query name |
record_function | User-defined function in dynamically linked library that is called for every record that is processed |
storage_format | The format in which to store BYTE or TEXT data |
targetdatabasename | Name of the database that the records will be loaded and unloaded to |