Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR..

Answer / islam

Ans is : 10.2115 is stored as .10211500000000000E 02 in
ecobol.

Is This Answer Correct ?    3 Yes 1 No

WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR..

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

WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR..

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

Post New Answer

More COBOL Interview Questions

what is the difference between perform varying and perform until

4 Answers   TCS,


How do get the result of your program directly on your pc?

0 Answers   UST,


1.What is the default print format in cobol?

5 Answers   HSBC,


i want to learn mainframes. i completed MCA ,whats the future of mainframes

5 Answers  


01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?

3 Answers   Mind Tree,


How to concatenation one or more string?

4 Answers   Temenos,


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

0 Answers   IBM,


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.

3 Answers   IBM,


WHAT IS SOC3?HOW IT CAN BE RESOLVED?

1 Answers  


What is LENGTH in COBOL II?

2 Answers   CSC,


why do u need inspect verb?

3 Answers   Patni,


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.

3 Answers   CTS,


Categories