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 / vish
the syntax is wrong..a couple of mistakes...
1. The level of C is 02 which means it is a sublevel of B.
hat being the case B becomes the group level item and hence
the PIC clause for B is invalid.
2. The conditional statement is wrong, correct sysntax can
be either ib below:
IF (B IS NUMERIC)
ADD 10 TO C
IF B IS NUMERIC
ADD 10 TO C
Basically 'IS' is missing from the statement.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Why would you use find and get rather than to obtain?
What are the different rules of SORT operation?
In which area will you utilize 88 level items in cobol?
Explain the configuration section of a cobol program with examples of syntax.
What are the different rules for performing sort operation?
What is the difference between perform … with test after and perform … with test before?
how to move the records from file to array table. give with code example
What are declaratives and what are their uses in cobol?
What is rmode(24)
Write a program that uses move corresponding.
how do you reference the variable block file formats from cobol programs
how do you reference the printer file formats from cobol programs
A table has two indexes defined. Which one will be used by the SEARCH?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?