APPEND Statement
Overview
Append RAW Alpha or Group or Literal to RAW Alpha or Group
- This is the current implementation – no changes needed here.
Append UNICODE Alpha or NATIONAL Alpha to UNICODE Alpha or NATIONAL Alpha
- The trailing UTF-32 space characters in the destination field are replaced by the UTF-32 characters from the UTF-32 source field
- If necessary, the destination field is padded with UTF-32 space characters after appending the source field.
- If necessary, the result is truncated to the length of the destination field when appending the source field.
Append Raw Alpha to UNICODE Alpha or NATIONAL Alpha
- The RAW Alpha operand must be transcoded from an 8859-1 encoding to a UTF-32 encoding before the append can be performed
- The operation is performed by appending the resulting UTF-32 characters to the destination field using the same logic as above where a UNICODE Alpha is appended to a UNICODE Alpha.
Append Literal to UNICODE Alpha or NATIONAL Alpha
- A Literal operand is consider to be a RAW Alpha and must therefore be transcoded from an 8859-1 encoding to a UTF-32 encoding before the operation be performed.
- If a literal operand contains embedded Unicode escape sequences, the corresponding UTF-32 characters will replace the Unicode escape sequences in the resulting UTF-32 literal
- The operation is performed by appending the resulting UTF-32 characters to the destination field using the same logic as above where a UNICODE Alpha is appended to a UNICODE Alpha.
Append UNICODE Alpha or NATIONAL Alpha to RAW Alpha
- Each UTF-32 character in the source field is transcoded to the equivalent 8859-1 encoded character
- If a UTF-32 character is encountered that cannot be transcoded to an equivalent 8859-1 character, a data exception error occurs.
- The append operation is performed by appending the resulting 8859-1 encoded string to the destination field using the same logic as appending a Raw Alpha to a Raw Alpha.
Append Group to UNICODE Alpha or NATIONAL Alpha
- This combination of operands will not be allowed, at least not initially.
- The process compiler should report an error
- Since we are going to redefine many Alpha PDF fields and TEMP fields to be UNICODE Alpha fields, this decision will break any application that appends a Group field to any of these fields.
Append UNICODE Alpha or NATIONAL Alpha to Group
- This combination of operands will not be allowed, at least not initially.
- The process compiler should report an error
- Since we are going to redefine many Alpha PDF fields and TEMP fields to be UNICODE Alpha fields, this decision will break any application that any of these fields to a Group field.
Test Plan
- APPEND Unicode/National to Unicode/National
- APPEND Raw to Unicode and National
- APPEND Unicode/National to Raw
- APPEND literal to Unicode/National
- APPEND Group to Unicode/National
- APPEND Unicode/National to Group
Bugs
- APPEND statement with Unicode Destination and Raw Source appends extra junk to the end of the field * FIXED *
- APPEND statement with Raw Destination and Unicode Source fails with ILF runtime error, ie, APPEND --- WIDGET LABEL 0 --- TEMP 80 * FIXED ***
- APPEND Truncates incorrectly. APPEND 15 byte RAW alpha (contains string FIELD) to 15 character Unicode or National (contains string NORMAL) results in NORMAL FIEL in the Unicode/National field. * FIXED* March 31 engine
- APPEND Group to Unicode/National does not produce compiler error * FIXED * April 5 engine
- APPEND National/Unicode to Group field does not produce compiler error * FIXED * April 5 engine
- When appending literals to National field, it accepts and displays any Unicode character, not just ones in the National set ** Not a bug FAD**
- When using invalid literals, ie, \U with only 4 hex digits or \u with non hex characters, process does not run (no errors, just nothing happens). Second attempt at running process crashes Appx. * FIXED * April 5 engine. Invalid literals create compile time errors.
--
SteveFrizzell - 2011-03-08