perform I from 0 by 1 until I=5?How maney times it will
executes

Answers were Sorted based on User's Feedback



perform I from 0 by 1 until I=5?How maney times it will executes..

Answer / varun v

I agree with Answr #3 and Answer # 3 is correct..

PERFORM I FROM 0 BY 1 UNTIL I=5
........................
........................

END-PERFORM.

would give syntax error.
************************************************************
Correct one is given as below...

PERFORM varying i from 0 by 1 until i = 5
.............
.............
END-PERFORM.

and this should get executed 5 times....

Is This Answer Correct ?    6 Yes 1 No

perform I from 0 by 1 until I=5?How maney times it will executes..

Answer / tiny,roshini,divya

Syntax error in inline perform.

PERFORM varying i from 0 by 1 until i = 5
.............
.............
END-PERFORM.
There is no 'varying ' with perform in the question.

Is This Answer Correct ?    4 Yes 1 No

perform I from 0 by 1 until I=5?How maney times it will executes..

Answer / satya

In this PERFORM loop, I is subscript. Minimum value for the
subscript is 1. As the subscript starting value is zero in
this loop, the program will not compile successfully. It
will show compilation error.

Is This Answer Correct ?    3 Yes 1 No

perform I from 0 by 1 until I=5?How maney times it will executes..

Answer / pradeep

IT WILL EXECUTE 5 TIMES

COBOL CODE:
IDENTIFICATION
DIVISION.
PROGRAM-ID.
MOVEPGM.
DATA
DIVISION.
WORKING-STORAGE
SECTION.
01 WS-I PIC 9
(2).
PROCEDURE
DIVISION.
A1000-MAIN-
PARA.
PERFORM PARA-X VARYING WS-I FROM 0 BY 1 UNTIL WS-
I=5
STOP
RUN.
PARA-
X.
DISPLAY "TEST2".


OUTPUT:

COMMAND INPUT ===>
********************************* TOP OF DATA ***
TEST2
TEST2
TEST2
TEST2
TEST2
******************************** BOTTOM OF DATA *

Is This Answer Correct ?    2 Yes 0 No

perform I from 0 by 1 until I=5?How maney times it will executes..

Answer / ananta

it will not excute because perform is not start from 0.

Is This Answer Correct ?    1 Yes 0 No

perform I from 0 by 1 until I=5?How maney times it will executes..

Answer / amit tomer

Infinite Times

Is This Answer Correct ?    2 Yes 2 No

perform I from 0 by 1 until I=5?How maney times it will executes..

Answer / guest

it will execute 5 times

Is This Answer Correct ?    3 Yes 3 No

perform I from 0 by 1 until I=5?How maney times it will executes..

Answer / vineet

your syntax is wrong

varun is right here and it will execute 5 times.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More COBOL Interview Questions

why occurs clause not mentioned in 01 level

6 Answers   HCL, NIIT, TCS, Tesco,


perform I from 0 by 1 until I=5?How maney times it will executes

8 Answers  


I have a COBOL main program which is calling sub program, the number of calling parameters used in main program are 4 whereas in sub program it's 5. Sub program is passing 5 parameters back to main program Will there be any compilation error? Or main program parameters displays junk values?

1 Answers  


How to read a record from bottom of a file which is indexed by 'A'.

4 Answers   Oracle,


can i give 9(10) in comp 3 instead of s9(10) ? if i can give wht would be ths ans

2 Answers   DELL,






What are the divisions in a cobol program?

1 Answers  


How to open and see copy book ?

3 Answers  


Q:what is the difference between the variable length and fixed lenght.how it varies in the cobol.

12 Answers   CTS, Wipro,


Describe the cobol database components?

0 Answers  


In COBOL "BEFORE" advancing is there or not ?

3 Answers  


how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?

4 Answers   TCS,


I am getting S00F abend when i try to compare two variable of different pic class,one variable is of 9(09) and another is S9(09) comp-3. First i moved the data from S9(09) comp-3 to 9(09), but no luck. So i tried to move the data from S9(09) comp-3 to X (09) and move to 9(09). I am getting same error message, Please help me to find solution for this ptoblem. ERROR MESSAGE - "The system or user abend S00F R=NULL was issued."

1 Answers  


Categories