when COMP-3 is preferrable?
Answers were Sorted based on User's Feedback
Answer / sunny kalra
Packed Decimal representation. Two digits are stored in each byte. Last nibble is for
sign. (F for unsigned positive, C for signed positive and D for signed negative)
Formula for Bytes: Integer ((n/2) + 1)) => n is number of 9s.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / sunny kalra
Also, if you need more than 18 decimal digits, you must use COMP-3 (or DISPLAY) as COMP variables cannot exceed 18 digits while COMP-3 can be up to 31 digits.
Is This Answer Correct ? | 5 Yes | 1 No |
Answer / kiran
Hi friends Both are correct and you can make use of them as
your reference.
Packed Decimal representation. Two digits are stored in
each byte. Last nibble is for
sign. (F for unsigned positive, C for signed positive and D
for signed negative)
Formula for Bytes: Integer ((n/2) + 1)) => n is number of
9s.
if you need more than 18 decimal digits, you must use COMP-
3 (or DISPLAY) as COMP variables cannot exceed 18 digits
while COMP-3 can be up to 31 digits.
Is This Answer Correct ? | 2 Yes | 0 No |
what are the working storage fields in BMS macro?
A table has two indexes defined. Which one will be used by the SEARCH?
What is the difference between SEARCH and SEARCH ALL?
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
IF there 5 to 6 files in a JCL and there is some space abends, how can we identify which file has space abend and what can be done to get off that abend or rectify that abend.
When the working storage variables get allocated? a.At Compile time b.At starting of the run time c.At end of the run time. d.None of these
Explain call by context by comparing it to other calls.
How can you submit a job from COBOL programs?
What compiler option would you use for dynamic linking?
If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will display only 3.(the next sentence, ie., after fullstop/period) ____________________________________ if a>b continue end-if display 1 display 2. display 3. If a>b, it Will display 1 2 3 (the next statement) ____________________________________ if a>b continue display 1 end-if display 2 display 3. display 4. If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?
How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?