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
Explain how to differentiate call by context by comparing it to other calls?
When is inspect verb is used in cobol?
How do u write test cases?
What is report-item in COBOL?
Define cobol?
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
Write a program that uses move corresponding.
What is the difference between binary search and sequential search?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
How do you differentiate between cobol and cobol-ii?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What is cobol?