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
What are literals?
Why did you choose to work with ibm mainframe cobol programming?
What are different data types in cobol?
) how do u code after getting data?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
What kind of error is trapped by on size error option?
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
How do you reference the fixed block file formats from cobol programs
what happens if parmparameter passes zero bytes to the program
What is the difference between goback, stop run and exit program in cobol?
Explain how you can characterize tables in cobol?
What is Pic 9v99 Indicates in COBOL?
What are all the divisions of a COBOL program?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?