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
I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?
How does jcl act on a cobol code?
what is “Cond= even” and “Cond=only”?
What is the function of the dd avgrec keyword in sms datasets?
A dd statement consists of 4 fields. Name them?
If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
How to pass the parameter in parm using linkage section ? (syntax)?
How to alter the parameters for the existing gdg?
Explain how can a stopped job be started again?
how to compare two datasets without using superce because output is limited to 133 bytes
what is DSN in JCL and what are the parameters to declare the DSN?
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
how you will the direct the data to spool using sysout option?
Give the syntax of job specifying jcl statement.