If A>B
next sentence
end-if
display 1
display 2.
display 3.
If a>b, it will display only 3.(the next sentence,
ie., after fullstop/period)
____________________________________
if a>b
continue
end-if
display 1
display 2.
display 3.
If a>b, it Will display 1 2 3 (the next statement)
____________________________________
if a>b
continue
display 1
end-if
display 2
display 3.
display 4.
If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?
Answers were Sorted based on User's Feedback
Answer / muttaiah
Really, Did someone execute this code before posting your
answers..
If a novice goes through this chat he will get confused
like which answer is correct
The asnwer is 2 3 4 why because whenever control encounters
continue it will start executing the stmt only after scope
terminator which is end-if in this case.
so 2 3 4 is the answer i have executed the code also.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sakthi kumar
Actually Continue is a do nothing statement, so it will
proceed as it is.
It will display 1 2 3 4
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / supriya tenany
Displaying '1', depends actually on the 'if' condition, since it is in the 'if' loop.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / santy
for the first condition:-
If A>B
next sentence
end-if
display 1
display 2.
display 3.
If a>b, it will display only 3.(the next sentence,
ie., after fullstop/period)- is the Correct Answer.
for the second condition:-
if a>b
continue
end-if
display 1
display 2.
display 3.
If a>b, it Will display 1 2 3 (the next statement)
This is also correct answer, b'cos continue is doing
nothing other than passing control to next statement.
for the third condition:-
if a>b
continue
display 1
end-if
display 2
display 3.
display 4.
If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?
Correct answer is the 1 2 3 4.
b'cos here continue will excuite next statement and after
the 'display3.' is excuitute then control pass to 'display
4.' sentence.
hopes now you r clear ur idea.
Is This Answer Correct ? | 3 Yes | 2 No |
Hai friends why we need to read a file before re-write a record?
what is the size of W-REC in the following 01 W-REC 05 A PIC 9(4)V99 05 B READLINES A 10 C PIC XX 10 D PIC S9(4) 05 E OCCURS 7 PIC ZZ.ZZ 05 F OCCURS 5 10 G PIC ZZ.ZZZ99 10 H OCCURS 3 15 J PIC 9(3) 15 K PIC V99
how to create temporary data set in jcl? what is the use?
3 Answers Cap Gemini, Temenos,
I have two files , file1 is input file it contains 10,20,30,....,records but i want to display the records in file 2 as reverse order .how can we do by using jcl& cobol(dont use array) please any one can tell me the answer
how to transfer the file from pc to mainframe??
Please let me know at which Scenarios we will go for STATIC call or DYNAMIC
how to convert vsam table into DB2 table?
In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?
What is an in-line perform ?
What are the cobol coding sheets?
What is the difference between write & move in COBOL?
what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?