perform I from 0 by 1 until I=5?How maney times it will
executes
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Answer / ananta
it will not excute because perform is not start from 0.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vineet
your syntax is wrong
varun is right here and it will execute 5 times.
| Is This Answer Correct ? | 1 Yes | 1 No |
what is internal sort and external sort ? which is preferable ?
Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $
What is difference between com and com3? Eg. s9(4) so what is the memory it will occupy com and com3.
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
what is dynamic array in cobol? what is the difference b/w array and table in cobol?
can we use COPY statement in w-s section? how?
Define REDEFINE clause and Is it possible to have the redefine clause anywhere in the working storage section for a data name?
consider the following two IF statements: IF X AND NOT Y MOVE A TO B IF Z=1 OR 9 MOVE A TO B select one of the following data divusion entries which gives identical results for both the above IF statements a.01 Z PIC 9 88 X VALUE 1.9 88 Y VALUE 0.2 THRU 8 b.01 Z PIC 9 88 X VALUE 0.2 THRU 8 Y VALUE 1.9 c.01 Z PIC 9 88 X VALUE 1.9 88 NOT-Y VALUE 0.2 THRU 1.9 d.none of yhe above
Difference between ps, esds
how to access the file from prodution from changeman tool and to submit a file to production
what is the difference between occurs and occurs depending on? i dont think so there is the difference in storage..then why we should use occurs depending on?
What is the purpose of Identification Division?