(a) cntlcode={nocheck|check|replace[,replacement-character]}
For the character string data, national character data, and mixed character string data types, specifies how to control data output when the character string data contains control characters (ASCII codes 0x00 through 0x1f).
- nocheck:
- Output the column data in the database as is without checking for control characters. You specify this operand in order to output the column data in the database as is.
- check:
- Check for control characters; if the column data contains a control character, do not output the corresponding row to the unload data file. You specify this operand to suppress output of rows that contain control characters.
- replace[,replacement-character]:
- Check for control characters; if the column data contains a control character, replace it with the specified replacement character and then output the corresponding row to the unload data file. You specify this operand to output column data containing control characters in such a manner that the control characters can be viewed by a program such as Text Viewer.
- Specify the replacement character as a 1-byte character.
- Specification rules for the replacement character
- When you omit the replacement character, the system assumes a colon.
- None of the following characters can be specified as the replacement character:
space, tab, asterisk, underscore
- None of the following characters is suitable for the replacement character because they may be the same as codes used in the output data:
Characters used in the output data
Numeric data sign characters (+ and -)
Characters whose code is the same as that of a multi-byte character (
,
,
,
,
,
,
,
,
)
Hyphen used in date interval, time interval, and time stamp data
Colon used in time and time stamp data
Period used in numeric value, date interval, time interval, and time stamp data
- Rules for the cntlcode operand
- When the cntlcode operand or fixtext_option statement is omitted, cntlcode=nocheck is assumed.
- You can specify only one cntlcode operand in the fixtext_option statement.
- The following table explains the relationships between whether or not there are control statements in column data, the cntlcode operand value, and the pdrorg processing:
Condition | pdrorg's processing |
---|
Whether or not there are control characters in column data | cntlcode operand value | Checking for control characters | Data output method |
---|
Yes | check | Y# | Resumes processing without outputting the corresponding row (pdrorg terminates normally with return code 4). |
replace | Replaces the control characters and then outputs the data. |
nocheck | N | Outputs the data in the database as is. |
No | check | Y# | Outputs the data in the database as is. |
replace |
nocheck | N |
- Legend:
- Y: Checks for control characters
- N: Does not check for control characters
- #: Checks for 1-byte characters only; does not check for multi-byte characters.
(b) enclose=enclosing-character
When a column data item is to be enclosed with a character in order to identify the data, specifies the 1-byte enclosing character to be used. Rules for the enclosing character are the same as for the replacement character in the cntlcode operand.
- Criteria
- Specify this operand when you wish to identify a column data item by enclosing it with a particular character. When a variable-length character string (character string data, national character data, or mixed character string data type) is shorter than the length defined for the column data or is the null value, the system pads the data up to the defined length (the default uses the space character). If the length of the column data is 0 bytes, the resulting data cannot be identified from 0-byte character string data, null value data, or data consisting of only space characters. By specifying the enclose operand, the column data in such cases can be identified because it will be enclosed with the specified enclosing character.
- The following table shows output examples when the data type is varchar(8) and the padding character is the space character:
Data | Output data |
---|
enclose operand omitted | enclose=" |
---|
0-byte characters | ![[Figure]](figure/zueng02h.gif) | ""![[Figure]](figure/zueng02h.gif) |
Null value | ![[Figure]](figure/zueng02h.gif) | ![[Figure]](figure/zueng02j.gif) |
All space characters | ![[Figure]](figure/zueng02h.gif) | " " |
- Legend:
: One space character
- Rules for the enclose operand
- Only one enclose operand can be specified in the fixtext_option statement.
- The following table describes whether or not the enclosing character is used when the enclose operand is specified:
Data type of column | Data value in column | Whether or not enclosing character is used |
---|
CHAR, VARCHAR, NCHAR, NVARCHAR, MCHAR, and MVARCHR | Null value | Not used (padding character is used)# |
Real value | Used# |
Other | Null value | Not used |
Real value |
- #: The output length increases by 2 bytes.
(c) format=data-type,output-format
Specifies that the output format for column data is to be changed. The supported data types are INTEGER and SMALLINT.
- data-type:
- Specifies the data type of the column or parameter (constructor parameter reverse creation function) whose output format is to be changed. Specify either INTEGER or SMALLINT.
- Rules
- The same data type cannot be specified more than once (value of data-type).
- If the table does not contain the specified data type, the specification is ignored.
- output-format:
- Specifies the output format for the data type, as either type1 or type2.
- When this operand is omitted, type1 is assumed. If the data type is neither INTEGER nor SMALLINT, type 1 is assumed.
- For details about type1 and type2, see 8.3.3(3)(a) Output format.