genFixedLengthSqlLike
The genFixedLengthSqlLike build descriptor option indicates whether a host value used in an SQL LIKE clause includes trailing blanks to conform to the fixed length of the value, if the value is of type CHAR, MBCHAR, or UNICODE. The option applies to COBOL and Java™ generation and to behavior at debug time.
For example, the
myVar variable in the following
code has the value abc with two blanks: myVar UNICODE(5) = "abc";
The genFixedLengthSqlLike build descriptor
option indicates whether the following SQL statement processes "abc"
with or without the two blanks:
get myRecord with #sql{
select COLUMN01 from MY_TABLE
where COLUMN02 like :myVar
}
into myOtherVar;Values
- NO (the default value)
- Removes trailing blanks when the variable is used in a LIKE clause.
- YES
- Retains trailing blanks. The variable is treated as having a fixed length. However, if the sqlVariableLen property is set to YES on the field, the trailing blanks are removed when the variable is used in a LIKE clause, regardless of the value of the genFixedLengthSqlLike build descriptor option.