How would the number +1234 be stored if a PIC clause of
PICTUREs9(4) comp-3 were used?
Answers were Sorted based on User's Feedback
Answer / rama krishna
It will be stored as follows:
01 23 4C
This is only internal storage representation. But if you
display the variable then you will see 1234 not even '+'.
| Is This Answer Correct ? | 13 Yes | 1 No |
Answer / veni
A mistake in answer 2.
It will be stored as follows:
12 34 C
2nd half of the 3rd byte will be left blank.
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / suputhru
9(4) comp-3 takes 3 byets
each digit takes half byte.
-- -- -- 3bytes
numeric alignment is right to left <-----
first sign will store in half byte right. right.
c
-- -- --
then next 4 will store.
4c
-- -- -- like that
01 23 4c
-- -- -- will store.
Fonda is sign will store right most half byte.
-SK.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / santosh khot
The comp-3 Variables are called packed decimals the values
internally stored in two digits in single byte and 0.5 byte
stores the Sign ie -or + so for ur Question S9(4) Comp-3
takes 3 bytes of space
1234 will occupy Two bytes and Sign takes 0.5 bytes
| Is This Answer Correct ? | 4 Yes | 3 No |
How do we get current date from system with century in COBOL?
A cobol program to read a file , match it with other if. If match occurs then write it to an output file. If no match then no need to write it.Error log created by program to track any error.
In COBOL CALL-CALLING,if a program A is calling 3 sub- programs, dynamically, then it is said sub-programs will always will always in Initial Mode. My question is : Do we need to code CANCEL or (IS INITIAL) for dynamically called sub-programs or it is the property of Dynamically called pgms so every time sub-pgms are called they will be in initial mode. ***This question is only Dynamic call****, Please reply. Thank you in advance.
What is an in line PERFORM? When would you use it? Anything else to say about it?
A table has two indexes defined. Which one will be used by the SEARCH?
what is SYNCHRONIZATION?
Can you please let me know the centre name of INS certification in Kolkata.
Have you code any new programs in COBOL ? What is the functionality of the programs?
What COBOL construct is the COBOL II EVALUATE meant to replace?
What is Alternate Index ? How is it different from regular index ?
01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?
Program A calls program B. Will the working storage variables declared in program B be initialized every time it is called by program A or will the values be retained until the end of program A?