8.9.19 fixtext_option statement (specification of output data during creation of input data file in fixed-size data format)

When an input data file in the fixed-size data format is created with the -W fixtext option, the fixtext_option statement specifies information about the output data.

Criteria
When an input data file in the fixed-size data format is created (with the -W fixtext operand), the fixtext_option statement is specified in order to edit the output data.
Rules
  1. Only one fixtext_option statement can be specified.
  2. When you specify multiple operands, delimit them with the space character (0x20).
  3. Do not specify the fixtext_option statement without any operand specified.
Organization of this subsection
(1) Format
(2) Explanation

(1) Format

 fixtext_option [cntlcode={nocheck|check|replace[,replacement-character]}]

              [enclose=enclosing-character]

              [format=data-type,output-format]

(2) Explanation

(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
  1. When you omit the replacement character, the system assumes a colon.
  2. None of the following characters can be specified as the replacement character:
    space, tab, asterisk, underscore
  3. None of the following characters is suitable for the replacement character because they may be the same as codes used in the output data:
    [Figure]Characters used in the output data
    [Figure]Numeric data sign characters (+ and -)
    [Figure]Characters whose code is the same as that of a multi-byte character ([Figure], [Figure], [Figure], [Figure], [Figure], [Figure], [Figure], [Figure], [Figure])
    [Figure]Hyphen used in date interval, time interval, and time stamp data
    [Figure]Colon used in time and time stamp data
    [Figure]Period used in numeric value, date interval, time interval, and time stamp data
Rules for the cntlcode operand
  1. When the cntlcode operand or fixtext_option statement is omitted, cntlcode=nocheck is assumed.
  2. You can specify only one cntlcode operand in the fixtext_option statement.
  3. 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:
    Conditionpdrorg's processing
    Whether or not there are control characters in column datacntlcode operand valueChecking for control charactersData output method
    YescheckY*Resumes processing without outputting the corresponding row (pdrorg terminates normally with return code 4).
    replaceReplaces the control characters and then outputs the data.
    nocheckNOutputs the data in the database as is.
    NocheckY*Outputs the data in the database as is.
    replace
    nocheckN
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:
DataOutput data
enclose operand omittedenclose="
0-byte characters[Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure]""[Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure]
Null value[Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure]
All space characters[Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure]"[Figure][Figure][Figure][Figure][Figure][Figure][Figure][Figure]"
Legend:
[Figure]: One space character
Rules for the enclose operand
  1. Only one enclose operand can be specified in the fixtext_option statement.
  2. The following table describes whether or not the enclosing character is used when the enclose operand is specified:
    Data type of columnData value in columnWhether or not enclosing character is used
    CHAR, VARCHAR, NCHAR, NVARCHAR, MCHAR, and MVARCHRNull valueNot used (padding character is used)*
    Real valueUsed*
    OtherNull valueNot 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
  1. The same data type cannot be specified more than once (value of data-type).
  2. 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.