Joined: 30 Nov 2013 Posts: 672 Location: The Universe
I presume the text you are showing is text defined as "zoned decimal." The hexadecimal form of your field is F0F3D2.
Now be patient with me, because we are going back to ancient history.
Back in the days of punched card based data processing we had machines called card sorters. You have probably seen them in old movies. The operator puts a bunch of (presumably) punched cards into the machine and presses the start button. The machine sucks up the cards and distributes them to various pockets. The actor pulls out one of the cards, which presumably has the information he needs and the action continues.
Now what happened.
A traditional punched card has 80 "columns" of data, in 12 "rows." By convention, from the top of the card, the first two rows were not punched for numeric data, and were punched for letters and punctuation. The top row was called a 12 punch, and the next row an 11 punch. The remaining rows were punched for numbers, 0 through 9. Another convention: for numeric, signed data, the top row for the last column of a number was punched to indicate a positive number, and the second row was punched to indicate a negative number. Again, by convention, a column with 12-1 punched is the letter A, 11-1 is the letter J, 11-2 is K, and so on.
Each run through of a card sorter sorted one column. It could be set to distinguish the 12/11 punches, or the numeric fields.
Now when a punched card reader read cards, it would translate a 0 punch to F0, a 1 punch to F1, a 12-1 punch to C1, an 11-1 punch to D1, and so on.
Now, get out your Principles of Operation and turn to where it describes signs for packed decimal and zoned decimal data. In zoned decimal data the sign is the first 4 bits of the last byte of data: Cx or Fx is positive, Dx is negative. Similarly, with packed decimal data xF or xC is positive, xD is negative in the last byte of packed decimal data.
Now, I hope you see where this convention comes from.
To complement what Steve has said, you have a PIC S999 (or S9*3), same thing).
If you DISPLAY that, or otherwise include it in any output, it will appear as 3K when it contains the value -32. When you look at a value like that, you need to "decode" it yourself to know that it contains (in this case) -32. If you look in this forum you will see a "Sticky" which maps the values. You can experiment with COMP-3/PACKED-DECIMAL and COMP/COMP-4/COMP-5/BINARY as well. With positive numbers you just get a di fferent set of "letters". Note the representation of +/- zero.
With unsigned numeric PICtures, you just have the numbers, as there is no other information to show you.