Thanks, Wirt. Big oops on my part. Just reviewed the Cobol manual and this function is looking for alphabetic/alphanumeric data only, no integers in the buffer string. Thanks again, Brian. On Sun, 23 Jan 2005 22:21:40 EST, Wirt Atmar <[log in to unmask]> wrote: >I just wrote: > >> Because you're not differentiating what part of the buffer is legimately >text >> and what part are binary encodings, the upshift operation is being applied >> against every byte that falls in the decimal range 97 ("a") to 122 ("z"), >> thus you're also transmogrifying your binary-encoded COBOL-integer >> values. > >Let me finish up what I just wrote and say that the decimal value 609 is >written as: > > 02 61 > >-- in hex. It's the "61" value that's getting you in trouble. That is the >ASCII code for the little-a character. When "upshifted," which is an operation >that it was never meant to have done to it and is one of those "unnatural acts" >that get the people in the red states so up-in-arms, it becomes a "41": > > 02 41 > >-- which, when translated back into the real world, equals 577, the value >that you are obtaining. > >Wirt Atmar > >* To join/leave the list, search archives, change list settings, * >* etc., please visit http://raven.utc.edu/archives/hp3000-l.html * * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *