Consider the following COBOL entries:
05 X PIC 99 VALUE 10.
SUBTRACT 20 FROM X.
The resultant value of X wil be
Answer Posted / rajiv gupta
Answeer would be 10. as 20 -10 should be -10 but X is not
declared as signed variable as S9(2)so answer is 10.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
how do you define single dimensional array and multidimensional array in your cobol?
A table has two indexes defined. Which one will be used by the SEARCH?
what is amode(24), amode(31), rmode(24) and rmode(any)?
Give some examples of command terminators?
What are the different rules of SORT operation?
What is perform what is varying?
Can we change the password using ALTER? anyone tried and changed?
Write a cobol program making use of the redefine clause.
What is the difference between external and global variables in COBOL?
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
Which division and paragraphs are mandatory for a COBOL program?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
What are the different rules to perform a Search?