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

q value is 01
r value is 99

after compute p value is 100

normally value is printed left to right so u get 10
place of p

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

890


What is the utilization of copybook in cobol?

866


What is length is cobol?

850


What is the difference between Call and a Link?

875


Write a program to enter and display the names of students in a class using the occurs clause.

907


How to use the same COBOL program in Batch and CICS on lines? explain with an example

2098


what is the use of outrecord?

1960


Write down the divisions of cobol program?

827


How are the next sentence and continue different from each other?

996


How do you reference the fixed block file formats from cobol programs

901


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

2000


How do you differentiate between cobol and cobol-ii?

839


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

1069


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

614


What is the difference between structured cobol programming and object alternativelyiented cobol?

976