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
) How do u handle errors in BMS macro?
How to use the same COBOL program in Batch and CICS on lines? explain with an example
What is the utilization of copybook in cobol? Could we utilize a similar copybook?
Define cobol?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Why did you choose to work with ibm mainframe cobol programming?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
What is the difference between PIC 9.99 and PIC9v99?
what is the use of outrecord?
What are declaratives and what are their uses in cobol?
Can you please let me know the centre name of INS certification in Kolkata.
Name the sections present in data division.
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
What is the problem of ordered sequential files access?