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

I have the file which is having the extension no as records. sample file will look like below. 2310 3410 3256 4350 3781 5408 I need to replace the record which is starting with 3 to 5 (i.e) 3410 to 5410. How can we do it through cobol and cobol-db2 program? I need the possible logic?

5 Answers   RBS,


how do u indetify files succesfully executed or not ?

4 Answers   TCS,


What type of SDLC u followed? Why?

0 Answers   IBM,


01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

11 Answers   FirstApex, NIIT,


wht happens if we dnt give scope terminator ?

4 Answers   TCS,


What are 77 levels used for?

0 Answers  


WE HAVE 5 DIFFERENT RECORDING MODE IN COBOL.FIXED, FIXEDBLOCK, VARIABLE, VARIABLEBLOCK AND UNDEFINED. WHAT IS THE DIFFERENCE AMONG ALL AND WHICH TYPE OF FORMAT SHOULD BE USED WHEN

3 Answers   Infosys,


hie everyone.i just completed my b.tech in electronics and joined mainframes course.am i doing right course for my better future?please help me with your suggestions.ill be very thankful to you guys.

2 Answers  


how to transfer the file from pc to mainframe??

5 Answers   TCS,


Can we put move statement in COBOL copybook

3 Answers   Global Logic,


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

0 Answers  


can any one help -s806

6 Answers  


Categories