Suppose a program has the following code. What will be the
output?

MAIN-PARA.
DISPLAY 'MAIN-PARA'
PERFORM SECTION-A.
STOP RUN.

SECTION-A.
PARA-A1.
DISPLAY 'SECTION A PARA A1'.
PARA-A2.
DISPLAY 'SECTION A PARA A2'.

Answers were Sorted based on User's Feedback



Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY '..

Answer / deependra

The output is as follow:-
MAIN-PARA
SECTION A PARA A1
SECTION A PARA A2

Is This Answer Correct ?    24 Yes 1 No

Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY '..

Answer / brij

the above one is correct

Is This Answer Correct ?    5 Yes 0 No

Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY '..

Answer / wairagade

Output = MAIN-PARA

See the Main-Para. the flow is like , it will display MAIN-
PARA text and then perform SECTION-A in which nothing is
coded, it will give control back to OS.

If PERFORM SECTION-A thru PARA-A2

Then
O/P
MAIN-PARA
SECTION A PARA A1
SECTION A PARA A2

Please correct me if I stated wrong

Is This Answer Correct ?    3 Yes 3 No

Suppose a program has the following code. What will be the output? MAIN-PARA. DISPLAY '..

Answer / suresh ramaiyan

The output is :
---------------
MAIN-PARA
SECTION A PARA A1
SECTION A PARA A2

Because, There is no THRU command in PERFORM statement. So
it will execute still it reaches the 'EXIT' command or it
will perform the full section or until the next section
reaches.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

What is the difference between CONTINUE & NEXT SENTENCE ?

2 Answers  


What is rmode(any) ?

0 Answers  


The maximum number of dimensions that an array can have in COBOL-85 is ?

11 Answers  


I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

0 Answers  


how to resolve the file status 47.......

1 Answers   MMM,






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

3 Answers   Lehman Brothers,


can any one give good example for cond 88 level number and for renames pls urgent dudes ?

3 Answers   DELL,


What is the use of LINKAGE SECTION?

1 Answers  


Which mode is used to operate the sequential file?

0 Answers  


What are the pertinent COBOL

0 Answers   IBM,


What is the difference between write & move in COBOL?

3 Answers   CSC, HHB,


wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

2 Answers   EDS,


Categories