WORKING-STORAGE SECTION.
01 VAR1 COMP-2 VALUE 0.
PROCEDURE DIVISION.
MOVE 10.2115 TO VAR1.
DISPLAY 'VAR1 =' VAR1.
GOBACK.
10.2115 is stored as .10211499999999996E 02 in OS VS Cobol
10.2115 is stored as .10211500000000000E 02 in ecobol.
Any reason why?
Answers were Sorted based on User's Feedback
Answer / islam
Ans is : 10.2115 is stored as .10211500000000000E 02 in
ecobol.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / jennifer victor
comp-2 is pre defined that it stores all the data values in hexadecimal format, using 8 bytes, hence its displayed in hexa format.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / mani
comp-1 and comp-2 values can not be handled as above.
they are meant to be used for simple incrementation and i
think we can not move values like the above.
Is This Answer Correct ? | 0 Yes | 2 No |
What is static and dynamic call in cobol?
88 level entry is used for (a) data items in WORKING-STORAGE SECTION (b) items with RENAMES clause (c) condition-names (d) None of the above
How to read records in reverse order in flat file? I know we can do it by reading all records into an array.... Then read records in reverse order by using subscript or index but can any body give me the exact code.
What will happen if we generate GDG +2 version instead of +1 version?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
what is record label is empty or standard in file description of data division?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
I have 100 records in a file.. i want to sort the records from 5 to 5o... give the syntax...
What does EXIT do ?
copy 100 records without using ibm utilities
How many maximum number of procedures can we write in one COBOL program?
Suppose, file A has 100 records and file B has 500 records. We want to write records common to both A and B into file C and records which are present only in either A or B into another file D. What should be the logic of Cobol program to achieve this?
7 Answers Bank Of America, Mind Tree,