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 JCL?
How is the record format of an output dataset specified?
how can you check if a file is empty using jcl?
When space is allocated for an output dataset, what units can be used?
what is the compile process of cobol program expalin with code
How does the jcl specify the job to os?
Explain how can an in-stream dataset be terminated?
what is the purpose of coding class parameter in job statement?
What are s0c1, s0c4, s0c5, s0c7 and socb?
why should SYSIN DD * statement should not be included inside a PROCedure snippet??? please answer this.. i need to know.
whats the diff bw the evaluate also and and?
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
how can the same proc be re-used and called by many jobs?
Is automatic restart possible in jcl? If yes, how?
I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.