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 difference between Call and a Link?
For rewrite, why is it mandatory that file needs to be opened?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the difference between structured cobol programming and object alternativelyiented cobol?
What the difference is between continue and next sentence?
What are the different rules of SORT operation?
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.
What are all the divisions of a COBOL program?
What are the different open modes available in cobol?
What is the difference between binary search and sequential search?
What is the difference between external and global variables in COBOL?
What guidelines should be followed to write a structured cobol prgm?
Mention the guidelines to write a structured cobol program?
What are the pertinent COBOL
What is the difference between a binary search and a sequential search what are the pertinent cobol?