Re: Identifting sign in COMP data



Follow up on this and your previous note.

You really are going about this entire process "backwards" (and the hardest way
possible).

If you move your COMP, COMP-3, COMP-4, Binary, and Packed-Decimal fields (on the
mainframe) to
Usage Display - Sign is Separate - fields
and
Move your COMP-1 and COMP-2 fields to "external floating point" i.e.
PIC +9.9(15)E+99
fields

BEFORE you down-load your files (using EBCDIC/ASCII conversion) then you won't
have any of these problems/questions. If you want them in COMP-xxx format on
the Workstation, then simply reverse the MOVE statements of the mainframe
program.

P.S. On the mainframe, A, B, and E *are* valid sign-nibbles for packed fields,
they are just never produced by COBOL - but COBOL can handle them.

P.P.S. On the mainframe, there is a difference between "unsigned" and
"signed-positive" nibbles, this doesn't exist on the workstation.

P.P.P.S. You can only use the "most-significant" bit for deterring the sign of
a Binary fields, if the COBOL program defines it with a "S". If the PICTURE is
unsigned, then that bit is part of the number/data.

--
Bill Klein
wmklein <at> ix.netcom.com
"kimi" <mraghu83@xxxxxxxxx> wrote in message
news:1183006609.523437.181340@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi ppl,
Can anyone tell me how to recognize whether the COMP
variables are negative or positive.
For instance in COMP-3 data , if the last nibble is 'C' then we say it
is positive and if it is 'D' or 'F' we say it is negative.

Similarly how can we recognize whether the number is positive or
negative in COMP , COMP-1 and COMP-2 data.



.



Relevant Pages

  • Comments on Re: Is there a mainframe skills shortage?
    ... The following posting is a comment on an article about mainframe ... believes both COBOL and mainframes are on life support and that there ... this Gartner report failed to identify which specific skills were ... this mainframe skills shortage problem is geographical; ...
    (bit.listserv.ibm-main)
  • Re: Could this save COBOL?
    ... about OO and the mainframe. ... COBOL, unlike the other languages was not a major part of most ... to a database. ... The Dot NET environment is all ...
    (comp.lang.cobol)
  • Re: Is there a mainframe skills shortage?
    ... The logic is that as baby-boomer mainframe coders and administrators leave ... their mainframe environments or maintaining legacy COBOL code. ... this Gartner report failed to identify which specific skills were ... Administrators and managers (with CICS, zOS, and systems management ...
    (comp.lang.cobol)
  • Re: Further discussion on "Something has to be maintained" and lack of OO acceptance.
    ... I noted there is much concern over "documentation" in some ... creating and storing documentation than does much of the IBM mainframe ... The resistance came from the Priests of COBOL, ...
    (comp.lang.cobol)
  • Re: Possibly stupid question for you IBM mainframers... :-)
    ... > I've been out of work for a while, and while I know COBOL well enough ... > both of those environments now), most of the mainframe work I see out ... JCL and the IBM mainframe "utilities". ...
    (comp.lang.cobol)