what is the minimum number of lines a Cobol program should
have to successfully compile and run

Answers were Sorted based on User's Feedback



what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / anoop

only two. identification division & program-id

Is This Answer Correct ?    26 Yes 1 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / shailendra

only the first ans is right
(ans of anoop)
because in the question is mention the minimum line
required to compile and execute

Is This Answer Correct ?    5 Yes 1 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / ravikumar. r

Identification division.
program-id. ABCDE.
Procedure division.
display 'abcd'.
stop run.

Is This Answer Correct ?    9 Yes 6 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / sivakumar sekharannair

IDENTIFICATION DIVISION.
PROGRAM-ID. TEST1.
are the minumum number of lines a cobol program should have
to successfully compile and run.

Without program id the compiler gave the following error
IGYDS1003-E A "PROGRAM-ID" paragraph was not found.
Total Informational Warning Error Sever
1 1

Is This Answer Correct ?    2 Yes 0 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / abzal

anoop is right,

bcoz question asked is min. lines of code,so anoop is
right.

Is This Answer Correct ?    1 Yes 0 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / anjibabu

in #2 no need to use display statement.

IDENTIFICATION DIVISION.
PROGRAM-ID. A.
PROCEDURE DIVISION.
STOP RUN.

Is This Answer Correct ?    3 Yes 2 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / harish

hi i will accept both #1 and #2

#1 we will get compilation successful but in runtime
without procedure we may get some prob i am not sure

#2 answer is absolutely right buddy.....

pls correct me if anything wrong

HARISH POOMGAME SHIVAPPA(hassan,karnataka)
NIIT TECHNOLOGY
KOLKATA

Is This Answer Correct ?    3 Yes 3 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / guest

Milind , your answer is absolutely wrong .

If you compile yoru program - with a only"procedure
division - you will get belwo erros -
E A "IDENTIFICATION DIVISION" header was not found in
this program. It was assumed present.


E A "PROGRAM-ID" paragraph was not found. Program-
name "CBLNAM01" was assumed.

Otherwise - ans#1 andans#2 are absolutely
correct .

Is This Answer Correct ?    0 Yes 1 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / saravanan

#9 anjibabu answer is correct

In cobol program ID Division and procedure Division is mandontary.......

Is This Answer Correct ?    0 Yes 1 No

what is the minimum number of lines a Cobol program should have to successfully compile and run..

Answer / sagar lahulkar

I think four lines are required

Identification division
Progam I'd..
Procedure division
Display

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

Which of the following files can be OPENed in all the 4 modes? The four modes are INPUT, I-O, OUTPUT and EXTEND. (a) INDEXED (b) RELATIVE (c) SEQUENTIAL (d) All of the above

7 Answers   TCS,


i WANT ALL ERROR codes IN CICS and DB2

2 Answers  


What is COMP SYNC?

3 Answers  


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

1 Answers   L&T,


what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?

4 Answers   CSE, TCS, Wipro,


i have n records in one file and in this file there is some fields and i want to count that how many sharma in my file so plz give the coding that how we read sharma ?

2 Answers  


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

5 Answers   CTS,


Discuss about changing dataset name in proc.

0 Answers  


What is level 66 used for ?

3 Answers   TCS,


I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different ways to update this column thru COBOL-DB2 program?

5 Answers  


Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.

6 Answers   EDS,


consider the following two statements MOVE 10 TO N PERFORM PARA-X N TIMES STOP RUN PARA-X MOVE 5 TO N how many times PARA-X willbe exicuted? a.10 b.5 c.infinate d.execution error

6 Answers   ABCL, TCS,


Categories