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 change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
How to print 10 to 1 if the input have only 10 digit number?
) How do u handle errors in BMS macro
Write a program to explain size error.
how do you reference the rrds file formats from cobol programs
Define cobol?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
how to move the records from file to array table. give with code example
i need a small 3d program using inline and outline.
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
how to access the file from prodution from changeman tool and to submit a file to production
What are the pertinent COBOL commands?
What is difference between static and dynamic call in cobol?
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.
Why occurs cannot be used in 01 level in COBOL?