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
What guidelines should be followed to write a structured cobol prgm?
how to move the records from file to array table. give with code example
What are the pertinent COBOL
What is the difference between comp and comp-3?
IF I mention stop run in CICS what happens?
Give some examples of command terminators?
Explain what you understand by passing by value.
how do you reference the ksds vsam file formats from cobol programs
What is the difference between binary search and sequential search?
What the difference is between continue and next sentence?
What is the local-storage section?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
How do you differentiate between cobol and cobol-ii?
What is the usage of comp fields in cobol?
how do you reference the fixed unblock file formats from cobol programs