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
Answers were Sorted based on User's Feedback
Answer / 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 |
What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?
write a program to eliminate duplicate records in a input file and send them to output file.
TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr
should I use Go back in the main program ? Yes we can use Go back in main program as well.
what is subscript in cobol?give realtime example?
can we declare occurs in 01 level?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
db2 variable decimal(15,2) what is the equalent size of cobol variable
) How do you access the migrate the data from production region to development region
I have a sequential file. How do I access a record in this sequential file randomly in my program ?
How do you come out of an EVALUATE statement?
How to know whether the module is dynamical or statistical?