What is the difference between comp comp 1 and comp 3
Comp is a binary usage, while comp-3 indicates packed decimal. The other common usages are binary and display. Display is the default. Interview Candidate Sep 30th, 6 First Prev Next Last.
Showing Answers 1 - 6 of 6 Answers. Give your answer: If you think the above answer is not correct, Please select a reason and add your answer below. Open Questions Answered. Latest News. It looks like you are using an AD Blocker! Disable Ad Blocker Learn More. Login GeekInterview Login. COMP-1 takes 8 bytes of storage. PIC creates relation between data name and data type. So no relation is required using PIC clause.
COMPIn this case the data is represented in the decimal form, but one digit takes half a byte. COMP usage clause applicable to Numeric data type only.
COMP usage is a binary representation of data. The data in COMP variables stored memory in pure binary format. COMP-1 usage clause will be called as Floating point. COMP-1 usage clause is applicable to single floating point data type.
COMP-1 is specified for internal floating point items which is single precision. COMP-1 items are 4 bytes long. COMP-1 allows Signed floating point item where the sign will store on leftmost byte first bit which is allocated to exponent. In the 4 bytes, leftmost 8 bits to store exponent and remaining 24 bits stores mantissa.
The COMP-1 memory calculations like below.
0コメント