Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree

3 Answers   Merrill Lynch,


What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,


how do you reference the variable block file formats from cobol programs

0 Answers  


There is a variable with value 19446. Requirement is to convert it to 194.46. I tried it by doing divide by 100 and my receiving field data type is 9(03)v99. But the output is 194. I am not getting the decimal value. Could anyone pls let me know how to get this done?

2 Answers  


SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.

3 Answers   Lehman Brothers,


where do u use low-value and high value in cobol

3 Answers   CGI,


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

4 Answers   Accenture,


What is Static and Dynamic linking ?

3 Answers  


Consider the following: 77 A PIC 9(10) 77 B PIC 9(10) 77 C PIC 9(19) MULTIPLY AB BY B GIVING C Which of the following is true ? (a) The execution of the above may result in size error. (b) The execution of the above will result in size error. (c) The definition of C is invalid resulting in compilation error. (d) No error will be thee and the program would proceed correctly.

4 Answers   TCS,


what is the purpose of linkage section?

10 Answers  


Why we should use cursor ?

3 Answers  


what is meaning by design document? who can repared for this?

5 Answers   TCS,


Categories