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 |
I have a PS file and I would like to manually insert the binary values (like a COMP format) into the file. How can i do that? the way do in COMP-3 format.. suppose i want to insert -12345 in to file in comp-3 format. simply we can open a file in edit mode and do HEX-ON and insert the value . SEE BELOW-- 135 24D in 3 bytes - this will be COMP-3 presenatation of -12345.
What are all the divisions of a COBOL program?
How do pass the values to the parameters in cobol
if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error
What is a report item?
I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??
Write a program to enter and display the names of students in a class using the occurs clause.
What is the use of EVALUATE statement?
i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?
If i have a variable A pic 9(2) value 10 Compute A = a - 100 what will be the value of A and will there be any error becoz of the Negative value
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?