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 |
can we redefine 77 level item is it possible
How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)
Explain fixed length record in cobol? with suitable example
Identify the invalid dataname from the following: (A) savings-account (B) annual-allocation-for-overhead (C) samount250 (D) 12demand
In an EVALUATE statement, can I give a complex condition on a when clause?
What is file status 39 ?
The disposition parameter in the jcl is share ( DISP+SHR ) and the program opens file in extend mode what will happen?
How to pass return codes from cobol to jcl?
what are the limitations of Inline Perform?
I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??
How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning.
What is the significance of the PROGRAM-ID paragraph? If this name doesnt match with the name of the COBOL program, does it make a difference? Is the name specified in the PROGRAM-ID paragraph used as a name for the load module or any such thing?