Page 1 of 1

regarding comp-5

PostPosted: Wed Jul 28, 2010 1:32 pm
by Kal El
We all know that pic s9(1)- pic s9(4) comp-5 has 2 bytes of data.
But why is it so why can it not incorporate 1 byte of data? does this have anything to do with IBM mainframe registers?

Also could anyone give me in simple terms the difference between comp-3 and comp-5 and packed decimal?

Re: regarding comp-5

PostPosted: Wed Jul 28, 2010 3:13 pm
by Robert Sample
Packed decimal is COMP-3 -- the terms can be used interchangeably.

COMP-5 is COMP -- but COMP may obey the PICTURE size, based on compiler options, while COMP-5 always provides the binary values not the PICTURE size.

But why is it so why can it not incorporate 1 byte of data? does this have anything to do with IBM mainframe registers?
This makes no sense as stated -- you need to ask your question in a clearer way. You also need to spend some time in the COBOL manuals learning the internal formats for numeric variables.

Re: regarding comp-5

PostPosted: Thu Jul 29, 2010 12:59 am
by dick scherrer
Hello,

But why is it so why can it not incorporate 1 byte of data? does this have anything to do with IBM mainframe registers?
As Robert mentioned, you need to clarify what you want to know.

I'm completly unable to relate to the "mainframe registers" in this question.

If you find something in the manual that is not clear, post what you found and your doubt. SOmeone will be able to clarify.