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
What is the usage of comp fields in cobol?
Whats the difference between search & search ALL?
how can i see junk values in dclgen or in hostvariable of comp ?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
) How do u handle errors in BMS macro?
How do u write test cases?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
i want a program using by if, evaluate , string, unstring, perform, occurs?
how do you reference the variable block file formats from cobol programs
What do you understand by psb and acb?
how do you define single dimensional array and multidimensional array in your cobol?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?