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

what are the working storage fields in BMS macro?

2 Answers   IBM,


What is Static and Dynamic linking ?

3 Answers  


Can the OCCURS clause be at the 01 level?

8 Answers   Oracle,


Why occurs can not be used in 01 level ?

2 Answers   TCS,


Explain how you can characterize tables in cobol?

0 Answers  






TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr

1 Answers   MNC,


Can we redefine the field of x(200) to less than 200?

0 Answers  


in cobol i have one file it contains records like 10,4,23,98,7,90..... total records 100. iwant 10 to 20 in reverse order in cobol environ ment any one please give the answer......

2 Answers   IBM,


hai friends ,i have HSBc exam on this sunday,my platform is Mainframe,i have 1 year exp,pls any one send me placement papers of Hsbc and technical questions on mainframe

6 Answers   Citi Bank, CitiGroup, HSBC, iNautix, Wipro,


What will happen if we generate GDG (+2) version without generating (+1) version?

2 Answers   IBM, T systems,


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,


what is Pic 9v99 Indicates?

2 Answers  


Categories