Consider the following:

77 W-NUM PIC 9 VALUE 0
------
MOVE 1 TO W-NUM
PERFORM PARA-X UNTIL W-NUM > 9.
------
PARA-X
ADD 1 TO W-NUM

How many times PARA-X is executed ?

Answer Posted / guna

9 times.
Initially, W-Num value will be 1.
1>9, so para will be executed. - 1 time
2>9, so para will be executed. - 2 times
3>9, so para will be executed. - 3 times
4>9, so para will be executed. - 4 times
5>9, so para will be executed. - 5 times
6>9, so para will be executed. - 6 times
7>9, so para will be executed. - 7 times
8>9, so para will be executed. - 8 times
9>9, so para will be executed. - 9 times
10>9, so para will not be executed

so para is executed for 9 times.

Is This Answer Correct ?    7 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is inspect verb is used in cobol?

690


What is the local-storage section?

700


What is comp-1 and comp-2?

776


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3739


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1676






Can you please let me know the centre name of INS certification in Kolkata.

1731


What is the difference between a binary search and a sequential search what are the pertinent cobol?

745


What are various search techniques in cobol? Explain.

664


What are the cobol coding sheets?

681


) how do u code after getting data?

1590


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

5717


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

437


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

949


How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2747


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

699