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 |
Whats the difference between search & search ALL?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
what is the coding difference between COBOL and CICS.
can we display comp-3 variables. if we want to display what we have to do . give me one example
A cobol program to read a file , match it with other if. If match occurs then write it to an output file. If no match then no need to write it.Error log created by program to track any error.
What is the difference between performing a SECTION and a PARAGRAPH?
why do u need inspect verb?
Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?
6 Answers ABC, IBM, Mphasis, Wipro,
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?
what is the purpose of linkage section?