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 compute verb? How is it used?

0 Answers  


what are the control characters used in reports

1 Answers  


Name the divisions, which are available in a cobol program?

0 Answers  


How is sign stored in a COMP field ?

3 Answers   Accenture,


What will happen if we try to create GDG (+2) generaton instead of (+1) generation?

1 Answers  


how to know that the file has 300 records how to acess it?

0 Answers   Hewitt, TCS,


consider the following FD FILE-1 01 REC-1 PIC X(80) ...... WORKING-STORAGE SECTION 01 W-REC PIC X(90) ........ PROCEDURE DIVISION FIRST-PARA ....... READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG which of the following is true with respect to the above? a.REC-1 will contain nothing and W-REC will contain the contains of the record read b.REC-1 and W-REC contain the same data c.syntex is invalid and error will occur d.REC-1 and W-REC must be of same size

1 Answers   TCS,


Why there is no questions in this column?

6 Answers  


CAN ANY ONE HELP WHAT IS QTP? why it is nessery AND WEN IT IS USED?

1 Answers  


) How do you access the migrate the data from production region to development region

1 Answers   IBM,


What is the Purpose of POINTER Phrase in STRING command in COBOL?

0 Answers   Winsol Solutions,


Why occurs cannot be used in 01 level in COBOL?

0 Answers   Arigo Infotech,


Categories