Some thoughts: - at our site we too use "packed decimal without sign nibble" heavily in our ASSEMBLER applications, and we have a macro to deal with those fields (e.g. add a x'0c' at the end to it, just to "activate" them for computing) - this is old legacy stuff from the 70s. DECIMAL (8,0) UNSIGNED is converted to DECIMAL (9,1) SIGNED this way - very easy.
- I could imagine flavors of COBOL and PL/1 which support this, doing the same thing under the cover. DB2 DATE fields are internally structured this way. We had a similar problem with one byte binary length fields - also legacy stuff from the 70s - until PL/1 came up with BIN FIXED(8) UNSIGNED. - If my language of choice doesn't support UNSIGNED for a particular data format and I find in the database or somewhere else fields which are unsigned and I need to work on them, I always will consider them to be implicitly positive (what else?), and so I will convert them to positive signed values of the same type which I can work on with my language of choice. This is what the OP IMHO should do, given the situation, that no real unsigned packed decimal data in COBOL exists. Maybe I got the question of the OP wrong, but I thought that he really talks of UNSIGNED decimal data, and due to my limited knowledge of COBOL, I was not sure if this possibly exists today. Kind regards Bernd Am 24.04.2013 19:26, schrieb Steve Comstock:
I actually had read that stuff about unsigned packed decimal some years ago but decided to ignore it because it was not practical from the standpoint of the audience I work with, z/OS applications developers. Perhaps I was wrong in that perception. Let me put it out now: how many people are using decimal floating point in Assembler? I suppose there are some who use it from a high level language, most likely Java, but I suspect it has not caught on in a big way yet, in any language. Clearly the OP was not including what I think I will start calling 'pseudo-packed-decimal' in his question.
---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
