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 the difference between perform varying and perform until
How do get the result of your program directly on your pc?
1.What is the default print format in cobol?
i want to learn mainframes. i completed MCA ,whats the future of mainframes
01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?
How to concatenation one or more string?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.
WHAT IS SOC3?HOW IT CAN BE RESOLVED?
What is LENGTH in COBOL II?
why do u need inspect verb?
If there are two copybooks which have same variables and we are using both the copybooks in our program. will there be an error and if i move values to the variable which copybook varibales gets the values i move in.