what if any ,is the syntex error in the following piece of code
01 B PIC A(7)
02 C PIC 9(4)
........
IF(B NUMERIC)
ADD 10 TO C
a.the condition in the if statement is wrong
b.noting is wrong
c.because C is initialised.ADD 10 TO C is wrong
d.both B and C shoud have same size.

Answer Posted / shri

Field 'B' is a group level field (Since field 'C' is
defined under it at 02 level. Now field 'B' being a group
level field cannot have PIC clause. This is first syntex
error.
Further the condition IF (B Numeric) is not a system error
and is a correct cobol statement

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are 77 levels used for?

661


Name some of the examples of COBOl 11?

2688


What is the difference between Global and External Variables?

666


how do you define single dimensional array and multidimensional array in your cobol?

682


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

720






how do you reference the printer file formats from cobol programs

669


Can we redefine the field of x(200) to less than 200?

822


how do you reference the fixed unblock file formats from cobol programs

712


What is the compute verb? How is it used?

665


Describe the cobol database components?

683


Why did you choose to work with ibm mainframe cobol programming?

631


Write a program that uses move corresponding.

676


how do you reference the variable unblock file formats from cobol programs

752


What is the difference between structured cobol programming and object alternativelyiented cobol?

757


How do you reference the following file formats from cobol programs?

698