Okay, I am truly lost here. I am missing something really simple.
this is a quick test program that fails when called by the exit with
RNQ0115 when it does the upper=sqlstuff
RNQ0115 is Length of varying length variable is out of range.