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 / jayaprabhu
simple always remember that for numeric it's Left
Justification ie TAKE FROM LEFT PLACE FIRST IN LEFT
SO P=100 but as per you it shd be 00 but it will be 10
1 IS FROM LEFT SIDE MOST THEN 00 so if we move as per above
then
p is pic9(02)
so 10 first 1 is moved from left to left then 0 is moved
but since pic 9(02) only to digits get moved
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
) How do u handle errors in BMS macro
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is the local-storage section?
how to convert the recors form vsam file to db2 table tru file aid
What is amode(24)?
How do define dynamic array in cobol.
Which mode is used to operate the sequential file?
For rewrite, why is it mandatory that file needs to be opened?
What is the usage of comp fields in cobol?
Write a program to explain size error.
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
What guidelines should be followed to write a structured cobol prgm?
What is inspect in cobol ?
Why would you use find and get rather than to obtain?