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
Write the code to count the sum of n natural numbers.
What are declaratives and what are their uses in cobol?
How do you reference the fixed block file formats from cobol programs
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.
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
how do you reference the rrds file formats from cobol programs
Define cobol?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
How do you reference the following file formats from cobol programs?
What rules are to be followed while using the corresponding options?
What is the use of intialize verb?
What are the different data types in cobol?
What is amode(24)?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
Which Search verb is equivalent to PERFORM…VARYING?