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
i need a small 3d program using inline and outline.
Explain how you can characterize tables 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.
Define static linking and dynamic linking.
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
How to remove 2 duplicate records and copy only one using job control language?
What is the difference between external and global variables in COBOL?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
Write a program that uses move corresponding.
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
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning