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 |
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length
I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?
What should be the sorting order for SEARCH ALL?
How to read the last 100 records from a COBOL file. The file contains N number of records.
What is the point of the REPLACING option of a copy statement?
What is Alternate Index ? How is it different from regular index ?
which of the following can be used as a check protection symbol a.Z b.S c.* d.+
what are the diferences b/w sub-script and index?
TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr
What is comp-1 and comp-2?
What is the default value of DISP for temp datasets
how to submit a jcl by cobol program. clear me with an example.