SET TEMP Statement
Overview
All TEMP fields in --- have been changed to have an encoding type of UNICODE.
Since all TEMP fields are now UNICODE fields, SET TEMP will always operate on Characters, not Byte of raw data.
SET TEMP "FROM"
- UNICODE or NATIONAL alpha fields:
- Characters are set into the respective locations as UTF-32 characters.
- Any mismatch in lengths will result in normal trucation or UTF-32 space padding.
- RAW alpha fields:
- Each byte of the RAW data in the source field is transcoded from its 8859-15 character into the equivalent UTF-32 character and set into the TEMP field character location.
- Any mismatch in lengths will result in normal trucation or UTF-32 space padding.
- Literals:
- A literal operand is considered to be a RAW alpha and must be transcoded from 8859-15 to UTF-32 before setting into the TEMP field character location.
- A literal can include unicode scape sequences \u#### or \U######## for special unicode characters.
- Any mismatch in lengths will result in normal trucation or UTF-32 space padding.
- Group fields:
- Group fields are not allowed with SET TEMP as they can have a mixture of data types.
- The process compiler should report this error.
- This may break some existing applications.
SET TEMP "INTO"
- UNICODE and NATIONAL alpha fields:
- The specifid characters in the UTF-32 TEMP field are set into the specified characters in the UTF-32 destination field.
- Any mismatch in lengths will result in normal trucation or UTF-32 space padding.
- RAW alpha fields:
- The UTF-32 characters in the TEMP field are transcoded into the equivalent 8-bit 8859-15 singly byte characters in the range of 0x00 to 0xFF and then set into the specified location in the RAW alpha field.
- If the UTF-32 charactrer can't be mapped using the 8859-15 character set then a data exception error will occur at runtime.
- Group fields:
- Group fields are not allowed with SET TEMP as they can have a mixture of data types.
- The process compiler should report this error.
- This may break some existing applications.
Test Plan
- Test SET TEMP with group fields, should produce compiler errors
- Test SET TEMP from National/Unicode
- Test SET TEMP from Raw
- Test SET TEMP from Literal
- Test SET TEMP into National/Unicode
- Test SET TEMP into Raw
Bugs
- SET TEMP into a Raw Alpha does not appear to set any characters. * FIXED * March 28 engine
- Process Compiler does not report errors when using Group fields. Executing the SET TEMP with group fields will cause input to crash or hang on exit. * FIXED * tested with May 23 engine
- SET TEMP from a literal does not recognize \uxxxx or \UXXXXXXXX character sequences * FIXED * tested with May 23 engine
- Does not throw transcode errors when setting unicode characters into a national field. ** Not a bug FAD**
- Stops moving characters when it hits a unicode in the from field and the to field is a raw type. Just ignores remaining characters. * FIXED * tested with May 23 engine.
- When SET TEMP from a literal containing \uxxxx or \UXXXXXXXX, if you use a start position or length other than 1, you get incorrect results in the destination field.* FIXED * tested with June 9 engine.
--
SteveFrizzell - 2011-03-08