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 / vaneesh

To make this we require to use redefines.

01 ws-value-change
05 WS-ALPHANUMERIC PIC X(5).
05 WS-NUMERIC REDEFINES WS-ALPHANUMERIC PIC 9(3)
V99.
011 WS-EDITED-NUMERIC PIC 9(3).99.

PROCEDURE DIVISION

MOVE '19446' TO WS-ALPHANUMERIC
MOVE WS-NUMERIC TO WS-EDITED-NUMERIC
DISPLAY WS-EDITED-NUMERIC

STOP RUN

You will get the value as 194.46

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you reference the printer file formats from cobol programs

1191


What is amode(31)

1148


What the difference is between continue and next sentence?

1141


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

1095


how do you reference the fixed unblock file formats from cobol programs

1211


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2421


I have a File that has duplicate records. I need only those records that occur more than thrice.?

9843


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

3246


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2519


How do you get the data to code the BMS macro?

1950


What is the compute verb? How is it used?

1120


Mention the guidelines to write a structured cobol program?

1071


What is the usage of comp fields in cobol?

1166


What are the various section in data division and briefly explain them.

1149


What is an in line perform? When would you use it? Anything else you wish to say about it.

1058