Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cobol doubt

9 views
Skip to first unread message

vaishna...@yahoo.com

unread,
Mar 4, 2008, 5:00:34 AM3/4/08
to
3.Consider the following code snippet:
01 A PIC 9(2) value 20.
01 B PIC 9(2) value 90.
01 C PIC 9(2).
ADD A to B GIVING C ON SIZE ERROR DISPLAY 'OVERFLOW'

What will be the value of C?
can any one pls explain the above question .
and pls let me know what value C will be having at the end.
thanx

vaishna...@yahoo.com

unread,
Mar 4, 2008, 5:02:01 AM3/4/08
to
5 Consider the following code snippet
01 VAR-A PIC X(5) VALUE SPACES.
01 VAR-B PIC 9(5) COMP-3.
MOVE VAR-A TO VAR-B
What will be the value of VAR-B?
a)ZEROS
b)Program abends with SOC4
c) SPACES
d)None of the listed options
e) Program abends with SOC7

can any one explain the above question

thanx.

vaishna...@yahoo.com

unread,
Mar 4, 2008, 5:25:16 AM3/4/08
to
12 Consider the following code snippet
PERFORM VARYING X FROM 1 BY 1 UNTIL X<3
MOVE X TO A
END-PERFORM.

How many times the following code will be executed?
a)0
b)infinite
c)3
d)2
e)None of the listed options

can any one pls explain the above question.

thanx

0 new messages