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 is redefines? where it can be effectively use for the purpose of memory utilization? give an example?
Can we move SPACES to numeric field and ZEROES to alphabetic field? If yes what are the way doing this?
1.Can we define condition-name conditions in FD entry.
consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayedafter the PERFORM is over?assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above since there is a syntex error
can we use variable picture clause as xx.99 in cobol.
Can anyone explain me CALL procedure in COBOL.Does it carries similarities like call by reference in C.
what is the difference between PA & PF keys?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
9(2).99 how many bytes take? Why . consider as a byte?
Which mode is used to operate the sequential file?
If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....
what is the diff b/w select stsmt and cursor ?