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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is amode(24), amode(31), rmode(24) and rmode(any)?

691


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

2656


What is the difference between perform … with test after and perform … with test before?

877


Write down the divisions of cobol program?

665


) what is the difference between AID and HANDLE AID?

1630






What are all the divisions of a COBOL program?

660


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5052


What the difference is between continue and next sentence?

651


What is the difference between structured cobol programming and object alternativelyiented cobol?

751


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

704


How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?

695


Explain how to differentiate call by context by comparing it to other calls?

683


What is the difference between comp and comp-3?

694


What is perform what is varying?

701


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

672