Tags:
create new tag
view all tags

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

  1. Test SET TEMP with group fields, should produce compiler errors
  2. Test SET TEMP from National/Unicode
  3. Test SET TEMP from Raw
  4. Test SET TEMP from Literal
  5. Test SET TEMP into National/Unicode
  6. Test SET TEMP into Raw

Bugs

  1. SET TEMP into a Raw Alpha does not appear to set any characters. * FIXED * March 28 engine
  2. 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
  3. SET TEMP from a literal does not recognize \uxxxx or \UXXXXXXXX character sequences * FIXED * tested with May 23 engine
  4. Does not throw transcode errors when setting unicode characters into a national field. ** Not a bug FAD**
  5. 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.
  6. 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

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2011-06-15 - JeanNeron
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback