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 to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
Name some of the examples of COBOl 11?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
What is cobol?
What are the rules of the move verb?
what is amode(24), amode(31), rmode(24) and rmode(any)?
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
what is difference between cobol and cobol/400
Which division and paragraphs are mandatory for a COBOL program?
Which Search verb is equivalent to PERFORM…VARYING?
What is the difference between binary search and sequential search?
What is the difference between next sentence and continue in cobol programing language?
Difference between cobol and cobol-ii?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?