01 a pic s9(5) value '-12345' how it will be stored
Answers were Sorted based on User's Feedback
Answer / nagaraj ramammorthy
here the usage clause is DISPLAY which is default. so each
digit takes one byte to store and the sign is punched with
the last digit..
so it will be stored as 1234N.
note:
numbers punched with '+' sign
0 - {
1 - A
2 - B
3 - C
4 - D
5 - E
6 - F
7 - G
8 - H
9 - I
numbers punched with '-' sign
0 - }
1 - J
2 - K
3 - L
4 - M
5 - N
6 - O
7 - P
8 - Q
9 - R
hope this is clear
Is This Answer Correct ? | 6 Yes | 1 No |
Answer / shekhar
as from -1 to -9 uses from j to r....
and signed trailing is default...
so the ans is 1234n....
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sachin
I think from -1 to -9 uses the letter
J to onward
and for +1 to +9
uses the A to H
Is This Answer Correct ? | 3 Yes | 1 No |
01 a pic s9(5) value '-12345' how it will be stored
It will be stored :
1234u
In data files Negative Values are Stored as per the
following manner
0-p 1-q 2-r 3-s 4-t 5-u 6-v 7-w 8-x 9-y
The Last Digit of the No. is stored like this in the
following example.
Example: 01 a pic s9(4)v99
move -3456.23 to a.
display a.
Output is : 34562s
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / dave
I have verified the Nagaraj Ramammorthy's answer this seems
to be correct...
Is This Answer Correct ? | 0 Yes | 0 No |
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B>2 AFTER C FROM 2 BY -1 UNTIL C<2 How many times the paragraph ACCUMULATE-TOTALS would be exicuted?
how can you identify wheather the program is using search or search all in the cobol program?
COMPUTE X = A * B - C * D and COMPUTE X = (A * B) - (C * D) (a) Are not the same (b) Are same (c) Syntactically wrong (d) Will yield a run time error
What is report-item in COBOL?
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
A s9(4). B v9(4) value 0.21 can i move this?
How you can delete a record from a ps file in cobol?
can we use go to statement inline-perform?
Define static linking and dynamic linking.
What are ISOLATION LEVELS? Where do we need to specify them?
what are the limitations of Inline Perform?