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
What is the usage of comp fields in cobol?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
Are you comfortable in cobol or jcl?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
what is the use of outrecord?
State the various causes of s0c1, s0c5 and s0c7.
How you can read the file from bottom?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
Write the code to count the sum of n natural numbers.
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
What is a report item?