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



consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PAR..

Answer / guest

10

Is This Answer Correct ?    12 Yes 0 No

consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PAR..

Answer / vineet pasricha

It will execute 10 times

Is This Answer Correct ?    6 Yes 0 No

consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PAR..

Answer / rams

I tried this code. It executed 11 times...

Is This Answer Correct ?    6 Yes 2 No

consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PAR..

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

consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PAR..

Answer / raj

10 times

Is This Answer Correct ?    3 Yes 0 No

consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PAR..

Answer / rehan

I think it'll execute infinite times

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More COBOL Interview Questions

What is the use of EVALUATE statement?

4 Answers   Tesco,


I want to declare a field with data type Double in my COBOL program. how shall i do that ?

5 Answers  


Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS

2 Answers  


I got user abend U4038 while compiling my runjcl.. can anyone help me?

10 Answers   CGI,


What is the default value of DISP parameter?

3 Answers   IBM,






WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?

4 Answers   CSC, TCS,


01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'abcde' to var1 then waht is the value of var1 and var2

9 Answers   HSBC,


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

0 Answers   IBM,


If we use GO BACK instead of STOP RUN in cobol?

1 Answers   Temenos,


Hi Devolopers.. i need ur help.. i have 3 years of exp in Manual testing and SQL, next month onwards i shifted in to MAINFRAME TESTING... i have ZERO Knowledge abt mainframes.... PLS SUGGEST ME WHAT I LEARN in AMEERPET? mainframe testing or mainframe total devolopment subject... AS a devoloper u know every thing tester what to do PLSSSSSSSSS help me ITS VERY URGENT...

1 Answers  


In INITIALIZE what is Repalcing Word will do

1 Answers   CTS,


Categories