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 |
consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
Define in-line perform?
What is an index for tables?
What is tne need to use sub programs in Cobol?
Difference between lrecl, blksize among PS, PDS issues? i.e in jcl at dcb
how to access vsam files in cobol and how to differentiate that this is ESDS file
I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......
how to transfer the file from pc to mainframe??
What is XDC ?
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.