consider the following two statements
MOVE 10 TO N
PERFORM PARA-X N TIMES
STOP RUN
PARA-X
MOVE 5 TO N
how many times PARA-X willbe exicuted?
a.10
b.5
c.infinate
d.execution error
Answer Posted / pradeep
It will execute only 10 Times only
See Below Code
IDENTIFICATION DIVISION.
PROGRAM-ID. MOVEPGM.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-COUNT PIC 9(2).
PROCEDURE DIVISION.
A1000-MAIN-PARA.
MOVE 10 TO WS-COUNT
PERFORM PARA-X WS-COUNT TIMES.
STOP RUN.
PARA-X.
DISPLAY "TEST1".
MOVE 5 TO WS-COUNT.
Output Looks like this:
COMMAND INPUT ===>
********************************* TOP OF DATA *****
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
TEST1
******************************** BOTTOM OF DATA ***
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
Write a program to explain size error.
What is perform what is varying?
What is the LINKAGE SECTION used in COBOL?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
In COBOL, what is the different between index and subscript?
Can we redefine the field of x(200) to less than 200?
What is an in line perform? When would you use it? Anything else you wish to say about it.
What are the different types of condition in cobol and write their forms.
How do u write test cases?
What are all the divisions of a COBOL program?
How do get the result of your program directly on your pc?
Whats the difference between search & search ALL?
What are the different data types in cobol?
How you can characterize tables in cobol?