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 / minhaj
01 p pic 9(02) value zero.
01 q pic 9(02) value 99.
01 r pic 9(02) value 1.
p = q+r.
actual p value = 100. but p value is numeric so it writes
from right to left tuncations will be taken left side.
so p value = 00 if u want p = 10 then use justifications
| Is This Answer Correct ? | 8 Yes | 1 No |
Post New Answer View All Answers
How you can read the file from bottom?
What are the different rules of SORT operation?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
What is the difference between PIC 9.99 and 9v99 in COBOL?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
what is search and searchall?what is the diffrence between them?give an best example?
Which mode is used to operate the sequential file?
What are the different open modes available in cobol?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
What is length is cobol?
What are the access modes of START statement?
Explain about different table spaces.
Why occurs cannot be used in 01 level in COBOL?