what if any ,is the syntax 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 / dimpy19
"B (ALPHABETIC)" did not have a valid type for the specified class condition. T
nformational Warning Error Severe Terminating
WORKING-STORAGE SECTION.
01 B PIC A(7) VALUE '1'.
01 C PIC 9(4) VALUE 2.
PROCEDURE DIVISION.
IF(B NUMERIC)
ADD 10 TO C.
STOP RUN.
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
what are the statements that are not valid to be included in an include statement?
Explain the purpose of the dd keylen parameter?
What is the use of disp parameter?
How to find the UNIT and VOLUME of a (a) KEPT (b) UNCATALOGED and (c) CATALOGED dataset - using (i) JCL and using (ii) ISPF ?
Can an individual step be restricted from using all the jobs allowed cpu time?
I want to join to input files and write the matching fields on to an output file but i dont want the output file a sorted one
What is the purpose of dd * statement in jcl?
Explain dd statement in jcl?
List the different jcl statements that are not permitted in the procedures?
Step 1 RC 4 Step 2 Step 3 I want to know the COND parameter which can be coded in step 2 or 3. Step 2 should be executed based on Step 1 RC and Step 3 should not be executed based on step 1's RC
What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?
State the uses of syspring, sysin, sort fields, sum fields and dummy.
Is automatic restart possible in jcl?
which utility is used a dummy utility?
what is the compile process of cobol program expalin with code