COBOL Snippet: Tell where the control will when the below
code execute
IF (A=B)
CONTINUE
ELSE
NEXT SENTENCE
PERFORM <IMP-STMT>
END-IF.
Answers were Sorted based on User's Feedback
Answer / lu
First of all, when you code , you have to know what do you
want to do....
Perform after next sentence doesn't make sense ..it never
executes....
Is This Answer Correct ? | 9 Yes | 2 No |
Answer / manj
CONTINUE inside IF loop searches for the first terminator
END-IF and comes out.
NEXT SENTENCE searches for the first FULL STOP and goes to
the next line after that.
The above code does nothing. IF A=B, control comes to the
next line after END-IF and same for ELSE part too.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / hitesh karnani
First of all, when you code , you have to know what do you
want to do....
Perform after next sentence doesn't make sense ..it never
executes....
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / meg
Lu is very correct no body code like
NEXT SENTENCE
PERFORM <IMP-STMT>
this
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / chandrababu naidu
if both values A and B values are equal, then control go to
'perform' statement, if both values A and B values are not
equal then control come out of if condition.
Is This Answer Correct ? | 3 Yes | 5 No |
Answer / niveditha
This code looks funny.but still some times it is useful. If
A=B the control will be start immediately from after end-if.
If A not = B then perform loop will executes. there is no
meaning of next sentence
Is This Answer Correct ? | 1 Yes | 8 No |
why do u need inspect verb?
How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB
The hierarchy of the execution of logical operators is (a) NOT AND OR (b) AND OR NOT (c) OR AND NOT (d) OR NOT AND
10 Answers Huawei, IBM, TCS,
What is SQL Code -904 and -903 in DB2 And how to handle it?
How do pass the values to the parameters in cobol
Can we change the password using ALTER? anyone tried and changed?
What are the different data types available in COBOL?
what is meant by binary search?
what are the error codes in cobol, db2, cics, vsam , and jcl
how can we find total no of records in a file ....is there any utility......?
Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?
How do you define a table/array in COBOL?