consider the following progrm statements
MOVE 0 TO SW.NO.OF.REC
PERFORM PRI-OUT UNTIL SW=1
DISPALY NO.OF.REC
STOP RUN
PRE-OUT
READ IN-FILE AT END
MOVE 1 TO SW
WRITE OUO-REC FROM IN-REC
ADD 1 TO NO.OF REC
if the IN-FILE contains 1000 records what value will be
displayedafter the
PERFORM is over?assume that N0.OF.REC has PIC 9(4)
a.1000
b.1001
c.1
d.none of the above since there is a syntex error

Answers were Sorted based on User's Feedback



consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 ..

Answer / santhosh

please be in attention.Read the code thoroughly for syntax
errors.Here in this code he is performing a paragraph which
is not defined (i,e.)he is performing pri-out paragraph &
defined pre-out paragraph.

Is This Answer Correct ?    5 Yes 0 No

consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 ..

Answer / satyaprem

the programmer need to pay attention to code ...syntax
error ..looks ans 1 but not true ...

Is This Answer Correct ?    0 Yes 0 No

consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 ..

Answer / islam

the correct answer is : c (i.e. 1)

Is This Answer Correct ?    0 Yes 1 No

consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 ..

Answer / divakar

correct ans is D.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

how to run sub programs using static and dynamic call ...

3 Answers   TCS,


Can we use icetool in cobol program?

3 Answers  


What are the different open modes available in cobol?

0 Answers  


I have a Main Program which is calling Sub-Program which is a DB2 pgm. What will happen if I am not closing the cursor used in the Sub-program? Please advise..

3 Answers   iGate,


What are some examples of command terminators?

1 Answers  






Can 88 level variable be declared in FD section..?

1 Answers   Infosys,


What is report-item?

1 Answers   IBM,


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

1 Answers   Syntel,


can we use the two 01 level in file discription ?

6 Answers  


soc-7 is a bad data,invalid data. when ever we are moving the alphabets in the position of numeric then we got this abend. so my question is if o1 ws-data pic 9(1) value passing the alphabet some x. then we got soc-7 or not? i want clarification ?

7 Answers   CitiGroup, IBM,


What is the difference between a binary search and a sequential search?

3 Answers  


copy 100 records without using ibm utilities

3 Answers  


Categories