Hi,
In case anyone's interested I've got an update back from OEL support regarding this issue:
"I made some tests, seems the behavior of "typeset -i" changed between ksh-2006 and ksh-2008.
In ksh-2006, the variable value setting by "typeset -i" could reach to "long" not the "int".
The behavior changed between ksh-20060214-1.7 and ksh-20080202-2.
# getconf -a|grep LONG
LONG_BIT 64
ULONG_MAX 18446744073709551615
# bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
18446744073709551615/2
9223372036854775807
quit
# rpm -q ksh
ksh-20060214-1.7
# ksh
# typeset -i a=9223372036854775807
# echo $a
9223372036854775807
# typeset -i a=9223372036854775808
# echo $a
-9223372036854775808
Although the changelog does not show anything between ksh-2006 and ksh-2008, but I assume/believe it is a bug in ksh-2006 and has been fixed in ksh-2008 and later."
Looks like I'm going to have to do some recoding!