How many times the loop runs here
01 a pic 9(2) value 1.
perform para1 until a=10
move 1 to a.
stop run.
para1:
move 10 to a.
Answers were Sorted based on User's Feedback
Answer / priyanka
Para1 would be executed 1 time. after 1st time the value of
a is 10 and it comes out of loop.
it move 1 to a and stop execution.
| Is This Answer Correct ? | 23 Yes | 0 No |
Answer / vikas
Just once. The 'move 1 to a' is not in the para1. So its is NOT infinite loop.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / harish
It depends on two coditions with PERFORM WITH TEST BEFORE/AFTER.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vinod
it dirctly move 10 to a when perform para1 until a=10
after that it moves to the para the condition is checked
and pass the a value to 10.
again the perform is check the condion its true move the
value to 1.agin it passes the same so it is a infinite loop.
| Is This Answer Correct ? | 3 Yes | 23 No |
What is the file organization clause ?
What is the Importance of GLOBAL clause According to new standards of COBOL?
how to display comp3 variables reply soon ?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
What is the difference between comp and comp-3?
WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??
Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc.
what is the use of comp2 ? where can we use it with example ?
how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?
How do you reference the fixed block file formats from cobol programs