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...

There is a variable with value 19446. Requirement is to
convert it to 194.46. I tried it by doing divide by 100 and
my receiving field data type is 9(03)v99. But the output is
194. I am not getting the decimal value. Could anyone pls
let me know how to get this done?

Answer Posted / kiro

When COBOL does a divide it uses the format of the item
which in this case is integer only that is why the
fractional part is missing. You need to move the value
19446 to a 9(5)v99 item first and then do the divide using
the 9(5)v99 item.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

2476


Can we redefine the field of x(200) to less than 200?

1377


What are different data types in cobol?

1322


Difference between cobol and cobol-ii?

1282


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

1209


What is perform what is varying?

1179


how to move the records from file to array table. give with code example

2679


what is difference between cobol and cobol/400

22929


What is the problem of ordered sequential files access?

1167


What is the LINKAGE SECTION used in COBOL?

1530


how to convert the recors form vsam file to db2 table tru file aid

3268


Write a cobol program making use of the redefine clause.

1186


how can i see junk values in dclgen or in hostvariable of comp ?

3003


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

2134


Difference between array and sub-script ?

1669