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 is the significance of addrspc parameter in exec statement?
what happens in conversion stage in job processing?
Mention the types of job control statements?
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
What is use of restart and how to use it?
Can I send output of job to my remote device careerride123?
how can you check if a file is empty using jcl?
Define concatenating?
What is condition checking in jcl? Is this possible?
What parameter of the job statement is used to limit the cpu time consumed by the job?
What are the 4 fields in dd statement?
what is SOC4 error?
What statement marks the beginning of an in-stream or cataloged procedure in jcl and assigns default values to parameters defined in the procedure?
When space is allocated for an output dataset, what units can be used?
what is the compile process of cobol program expalin with code