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

With in these three which one is the default one Call Reference, Call By Value, Call By Content.-Which one is default?

4 Answers   IBM,


What is SQL Code -904 and -903 in DB2 And how to handle it?

1 Answers   IBM,


How do you define a table/array in COBOL?

5 Answers   Hexaware,


What will happen if we try to create GDG (+2) generaton instead of (+1) generation?

1 Answers  


What is the use of EVALUATE statement?

4 Answers   Tesco,






wht happens if we dnt give scope terminator ?

4 Answers   TCS,


I have dataset DS1 which has records say 1 2 3 4 5 ... ... etc And also I have second dataset DS2 whcih has records 1 3 4 5 6 8 .. ... Both the files are sorted and now I want to compare these files and write it into the third files if the records are matching.

4 Answers   FIS, Wipro,


What are differences between COBOL and java ? why we are giving more preference to COBOL ?

3 Answers   TCS,


When can the USING phrase be included in the call statement ?

2 Answers  


without performing any operations on a file how can i know whether it contains data or not

2 Answers  


Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.

3 Answers   iGate,


what will happen if i give program name and member name as different? program runs successful or w'll abend?

5 Answers   CTS,


Categories