Re: Identifting sign in COMP data
- From: "Rick Smith" <ricksmith@xxxxxxx>
- Date: Thu, 28 Jun 2007 04:32:05 -0400
"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.
Actually 'F' is unsigned, assumed positive.
Similarly how can we recognize whether the number is positive or
negative in COMP , COMP-1 and COMP-2 data.
For IBM mainframe and Micro Focus, COMP is
the same as BINARY. The most significant bit of
the most significant byte is the sign.
For IBM mainframe, COMP-1 and COMP-2
floating-point items, the most significant bit of
the most significant byte is the sign.
For Micro Focus, COMP-1 and COMP-2
floating-point items in IEEE format on Intel-type
processors, the most significant bit of the least
significant byte is the sign.
For COBOL, "we" use a conditon, such as,
IF ITEM IS NEGATIVE
...
END-IF
..
.
- Follow-Ups:
- Re: Identifting sign in COMP data
- From: Howard Brazee
- Re: Identifting sign in COMP data
- References:
- Identifting sign in COMP data
- From: kimi
- Identifting sign in COMP data
- Prev by Date: Identifting sign in COMP data
- Next by Date: Re: Identifting sign in COMP data
- Previous by thread: Identifting sign in COMP data
- Next by thread: Re: Identifting sign in COMP data
- Index(es):
Relevant Pages
|
|