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
Name some of the examples of COBOl 11?
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?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
How do you differentiate between cobol and cobol-ii?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
Explain the configuration section of a cobol program with examples of syntax.
Write the code to count the sum of n natural numbers.
When is inspect verb is used in cobol?
What is the difference between PIC 9.99 and PIC9v99?
Discuss about changing dataset name in proc.
How arrays can be defined in COBOL?
Why did you choose to work with ibm mainframe cobol programming?
Explain how you can characterize tables in cobol?
What are all the divisions of a COBOL program?
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?