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


Please Help Members By Posting Answers For Below Questions

how you will the direct the data to spool using sysout option?

1927


Explain how can an in-stream dataset be terminated?

800


What is the job entry system used in your project? based on what criteria the sequence of jobs are picked if priority is not mentioned in the job card?

1892


I want to JCL sort for Non-COMP and COMP-3 fields SORT FIELDS=(1,5,A,6,11,A,12,11,A,19,1,A,20,1,A),FORMAT=BI,EQUALS Length of comp bytes is 11 bytes which start at 6byte and 12 byte considering 11 bytes in comp-3 is 6 bytes. Can anyone tell if the above sort work SORT FIELDS=(1,5,A,6,6,A,12,6,A,19,1,A,20,1,A),FORMAT=BI,EQUALS does not works OK

1592


In sms datasets, what is the function of the dd mgmtclas keyword?

976






What is the difference between the positional and keyword parameters? Give examples.

807


How does jcl specify the job to the operating system?

851


is there any way to execute more than one proc in the same exec statement at the same time..?

2204


Are there any set of rules for the names of the steps used in a job? What are they?

682


how do you create a dataset in a jcl with the same file organisation as that of another existing dataset?

917


Explain how can the attributes of one sms dataset be copied to another dataset?

822


Explain how can a stopped job be started again?

742


Explain the function of //cntl statement?

747


how would you create a temporary dataset? And where will you use them?

854


what is use of disp parameter in dd statement?

740