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'.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different open modes available in cobol?

713


What is the problem of ordered sequential files access?

690


) How do u handle errors in BMS macro

1500


Whats the difference between search & search ALL?

5243


Name some of the examples of COBOl 11?

2673






Can a Search can be done on a table with or without Index?

798


Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.

5049


What is the difference between comp and comp-3?

692


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

885


Why occurs cannot be used in 01 level in COBOL?

707


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1105


Explain the configuration section of a cobol program with examples of syntax.

650


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

848


What is the local-storage section?

673


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2049