It's not clear from your post what you're trying to do. In fact, I can't make any sense out of it at all. You show three values for input (19,32,20) and three completey different values for output (10,29,39). Where did those output values come from?
You need to explain clearly what you're trying to do. Give an example of the records in your input file and what you expect for output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of the relevant fields.