Code Comments
Programming Forum and web based access to our favorite programming groups.What is the ASCII equivalent of a field with a PIC of "S9(09)v99 Comp-3"?
Post Follow-up to this messageGARY wrote: > What is the ASCII equivalent of a field with a PIC of "S9(09)v99 > Comp-3"? There isn't one. There's no "ASCII equivalent" of any data definition. Perhaps you could rephrase? I can tell you the above PIC defines (usually) six bytes with a decimal digit in each half-byte and the last half-byte contains the algebraic sign of the number. i.e., 12 34 56 78 91 2S = 123,456,789.12
Post Follow-up to this messageHow many text (ASCII) characters are contained in each of the following fields? In the "COMP-3" fields, how are negative numbers (for example, -00000048612) shown? PIC X(01) PIC 9(09) PIC 9(04) PIC 9(02) PIC 9(07) PIC 9(02) PIC 9(02) PIC 9(04) PIC 9(01) PIC 9(06) PIC 9(07) PIC S9(09)V99 COMP-3 PIC S9(05)V99 COMP-3 PIC S9(02)V99 COMP-3 PIC S9(05)V99 COMP-3 PIC 9(04) PIC 9(04) PIC S9(09) COMP-3 PIC S9(09)V99 COMP-3 PIC S9(03)V99 COMP-3 PIC S9(03)V99 COMP-3 PIC S9(03)V99 COMP-3 PIC S9(09)V99 COMP-3 PIC 9(08) PIC X(01) PIC 9(02) PIC X(02) PIC S9(07)V99 COMP-3 PIC X(04) PIC 9(07) PIC 9(04) PIC 9(05) PIC S9(09)V99 COMP-3 PIC S9(09)V99 COMP-3 PIC S9(03)V99 COMP-3 PIC S9(03)V99 COMP-3 PIC S9(07)V99 COMP-3 PIC X(01) PIC X(02)
Post Follow-up to this messageWhat operating system? What compiler? What compiler options specified? and w hat do you think the answers are? -- Bill Klein wmklein <at> ix.netcom.com "GARY" <gcotterl@co.riverside.ca.us> wrote in message news:1153077136.934457.120940@i42g2000cwa.googlegroups.com... > How many text (ASCII) characters are contained in each of the following > fields? > In the "COMP-3" fields, how are negative numbers (for example, > -00000048612) shown? > > PIC X(01) > PIC 9(09) > PIC 9(04) > PIC 9(02) > PIC 9(07) > PIC 9(02) > PIC 9(02) > PIC 9(04) > PIC 9(01) > PIC 9(06) > PIC 9(07) > PIC S9(09)V99 COMP-3 > PIC S9(05)V99 COMP-3 > PIC S9(02)V99 COMP-3 > PIC S9(05)V99 COMP-3 > PIC 9(04) > PIC 9(04) > PIC S9(09) COMP-3 > PIC S9(09)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(09)V99 COMP-3 > PIC 9(08) > PIC X(01) > PIC 9(02) > PIC X(02) > PIC S9(07)V99 COMP-3 > PIC X(04) > PIC 9(07) > PIC 9(04) > PIC 9(05) > PIC S9(09)V99 COMP-3 > PIC S9(09)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(07)V99 COMP-3 > PIC X(01) > PIC X(02) >
Post Follow-up to this messageMy "guess" is: PIC X(01) 1 PIC 9(09) 9 PIC 9(04) 4 PIC 9(02) 2 PIC 9(07) 7 PIC 9(02) 2 PIC 9(02) 2 PIC 9(04) 4 PIC 9(01) 1 PIC 9(06) 6 PIC 9(07) 7 PIC S9(09)V99 COMP-3 11 PIC S9(05)V99 COMP-3 7 PIC S9(02)V99 COMP-3 4 PIC S9(05)V99 COMP-3 7 PIC 9(04) 4 PIC 9(04) 4 PIC S9(09) COMP-3 9 PIC S9(09)V99 COMP-3 11 PIC S9(03)V99 COMP-3 5 PIC S9(03)V99 COMP-3 5 PIC S9(03)V99 COMP-3 5 PIC S9(09)V99 COMP-3 11 PIC 9(08) 8 PIC X(01) 1 PIC 9(02) 2 PIC X(02) 2 PIC S9(07)V99 COMP-3 9 PIC X(04) 4 PIC 9(07) 7 PIC 9(04) 4 PIC 9(05) 5 PIC S9(09)V99 COMP-3 11 PIC S9(09)V99 COMP-3 11 PIC S9(03)V99 COMP-3 5 PIC S9(03)V99 COMP-3 5 PIC S9(07)V99 COMP-3 9 PIC X(01) 1 PIC X(02) 2 Note: The "Comp-8" LRECL = 160; the LRECL of my "guess" = 214
Post Follow-up to this messageGARY wrote: > How many text (ASCII) characters are contained in each of the following > fields? It may be 'none' if this is on an EDCIDC machine. Fields need not be represented as ASCII characters, for example binary or packed decimal are bit patterns which need to be examined as bits or hexadecimal nibbles. COMP-3 may be packed decimal* and thus each digit is a nibble (4 bits - half byte). > In the "COMP-3" fields, how are negative numbers (for example, > -00000048612) shown? Sign is probably in last in last nibble. * COMP-3 can be anything the compiler writer wants it to be. You need to specify the compiler and possibly the system it is used on. In many cases COMP-3 is packed decimal with the sign in the last nibble.
Post Follow-up to this message(On an IBM mainframe - and many - not all - other platforms) PIC S9(09)V99 COMP-3 11 takes 6 bytes AS DOES PIC S9(08)V99 COMP-3 Can you figure out why? There is NOTHING about any of this that has to do with "ASCII CHARACTERS" - but it does have to do with "information contained" (10 or 11 digits and a sign) and how many bytes it takes to store it. -- Bill Klein wmklein <at> ix.netcom.com "GARY" <gcotterl@co.riverside.ca.us> wrote in message news:1153080213.610225.323410@p79g2000cwp.googlegroups.com... > My "guess" is: > > PIC X(01) 1 > PIC 9(09) 9 > PIC 9(04) 4 > PIC 9(02) 2 > PIC 9(07) 7 > PIC 9(02) 2 > PIC 9(02) 2 > PIC 9(04) 4 > PIC 9(01) 1 > PIC 9(06) 6 > PIC 9(07) 7 > PIC S9(09)V99 COMP-3 11 > PIC S9(05)V99 COMP-3 7 > PIC S9(02)V99 COMP-3 4 > PIC S9(05)V99 COMP-3 7 > PIC 9(04) 4 > PIC 9(04) 4 > PIC S9(09) COMP-3 9 > PIC S9(09)V99 COMP-3 11 > PIC S9(03)V99 COMP-3 5 > PIC S9(03)V99 COMP-3 5 > PIC S9(03)V99 COMP-3 5 > PIC S9(09)V99 COMP-3 11 > PIC 9(08) 8 > PIC X(01) 1 > PIC 9(02) 2 > PIC X(02) 2 > PIC S9(07)V99 COMP-3 9 > PIC X(04) 4 > PIC 9(07) 7 > PIC 9(04) 4 > PIC 9(05) 5 > PIC S9(09)V99 COMP-3 11 > PIC S9(09)V99 COMP-3 11 > PIC S9(03)V99 COMP-3 5 > PIC S9(03)V99 COMP-3 5 > PIC S9(07)V99 COMP-3 9 > PIC X(01) 1 > PIC X(02) 2 > > > > Note: The "Comp-8" LRECL = 160; the LRECL of my "guess" = 214 >
Post Follow-up to this messageOn 16 Jul 2006 10:37:35 -0700, "GARY" <gcotterl@co.riverside.ca.us> wrote: >What is the ASCII equivalent of a field with a PIC of "S9(09)v99 >Comp-3"? Your question doesn't make any sense.
Post Follow-up to this messageGARY wrote: > How many text (ASCII) characters are contained in each of the > following fields? None. ASCII has nothing to do with it. > In the "COMP-3" fields, how are negative numbers (for example, > -00000048612) shown? A hex F, A, C, or E in the last nibble indicates a positive number, D and B indicate negative. > > PIC X(01) > PIC 9(09) > PIC 9(04) > PIC 9(02) > PIC 9(07) > PIC 9(02) > PIC 9(02) > PIC 9(04) > PIC 9(01) > PIC 9(06) > PIC 9(07) > PIC S9(09)V99 COMP-3 > PIC S9(05)V99 COMP-3 > PIC S9(02)V99 COMP-3 > PIC S9(05)V99 COMP-3 > PIC 9(04) > PIC 9(04) > PIC S9(09) COMP-3 > PIC S9(09)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(09)V99 COMP-3 > PIC 9(08) > PIC X(01) > PIC 9(02) > PIC X(02) > PIC S9(07)V99 COMP-3 > PIC X(04) > PIC 9(07) > PIC 9(04) > PIC 9(05) > PIC S9(09)V99 COMP-3 > PIC S9(09)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(07)V99 COMP-3 > PIC X(01) > PIC X(02)
Post Follow-up to this message"GARY" <gcotterl@co.riverside.ca.us> wrote in message news:1153077136.934457.120940@i42g2000cwa.googlegroups.com... > How many text (ASCII) characters are contained in each of the following > fields? > In the "COMP-3" fields, how are negative numbers (for example, > -00000048612) shown? > > PIC X(01) > PIC 9(09) > PIC 9(04) > PIC 9(02) > PIC 9(07) > PIC 9(02) > PIC 9(02) > PIC 9(04) > PIC 9(01) > PIC 9(06) > PIC 9(07) > PIC S9(09)V99 COMP-3 > PIC S9(05)V99 COMP-3 > PIC S9(02)V99 COMP-3 > PIC S9(05)V99 COMP-3 > PIC 9(04) > PIC 9(04) > PIC S9(09) COMP-3 > PIC S9(09)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(09)V99 COMP-3 > PIC 9(08) > PIC X(01) > PIC 9(02) > PIC X(02) > PIC S9(07)V99 COMP-3 > PIC X(04) > PIC 9(07) > PIC 9(04) > PIC 9(05) > PIC S9(09)V99 COMP-3 > PIC S9(09)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(03)V99 COMP-3 > PIC S9(07)V99 COMP-3 > PIC X(01) > PIC X(02) > How about DISPLAYing LENGTH OF
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.