01 ws-p pic 9(2).
01 ws-q pic 9(2) value 01.
01 ws-r pic 9(2) value 99.
p.d.
compute p = q + r
what will be result of p ans(00) but my question is that
how i got 10 on the place of 00.
(truncation will ocuure on right side not left).
please tell me ?
Answer Posted / jayaprabhu
simple always remember that for numeric it's Left
Justification ie TAKE FROM LEFT PLACE FIRST IN LEFT
SO P=100 but as per you it shd be 00 but it will be 10
1 IS FROM LEFT SIDE MOST THEN 00 so if we move as per above
then
p is pic9(02)
so 10 first 1 is moved from left to left then 0 is moved
but since pic 9(02) only to digits get moved
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
Write the code to count the sum of n natural numbers.
How do define dynamic array in cobol.
What is an in line perform? When would you use it? Anything else you wish to say about it.
I have a File that has duplicate records. I need only those records that occur more than thrice.?
What is link edit in cobol?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
i need a small 3d program using inline and outline.
How do get the result of your program directly on your pc?
Why would you use find and get rather than to obtain?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
Mention the guidelines to write a structured cobol program?
Difference between array and sub-script ?
What is the difference between next sentence and continue in cobol programing language?
What is the difference between goback, stop run and exit program in cobol?