Subject octets handling
Author Nick Upson
I need to construct a string, within an SP and preserve all values,
including nulls.

declare variable payload Char(29) character set OCTETS;
declare variable i1 Integer;
declare variable i2 Integer;
declare variable i3 Integer;
declare variable i4 Integer;

i1 = 6;
i2 = 0;
i3 = 60;
i4 = 1;

payload = ascii_char(i1) || ascii_char(i2) || ascii_char(i3) || ascii_char(i4);

results in payload = '063C00000...'

whereas I would expect & need '06003C01000...'

I thought that putting everything into an octets field would avoid the
db chopping at null but it's still not correct either.