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

here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

2 Answers   IBM,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?

3 Answers   Xansa,


what will happen if pass values more than 100 using PARM parameter?

1 Answers  


We have 3 programms A,B,C.In the middle of the program A the controls goes to program B and in the middle of the program B control wants to go program C,after completion of program C again control comes to program B and again after completion of program B control comes to program A.How the process will takes and what are the controls we use for that process.If it is possible anybody of you explain with example?

5 Answers   IBM,


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,






What is perform what is varying?

0 Answers  


WORKING-STORAGE SECTION. 01 VAR1 COMP-2 VALUE 0. PROCEDURE DIVISION. MOVE 10.2115 TO VAR1. DISPLAY 'VAR1 =' VAR1. GOBACK. 10.2115 is stored as .10211499999999996E 02 in OS VS Cobol 10.2115 is stored as .10211500000000000E 02 in ecobol. Any reason why?

3 Answers   TCS,


what is the difference between implicit and explicit scope terminator with example? 

1 Answers  


wirte a pgm in using files in which we hav 10 ,20,30 40...100 records in inputfile and i want them to be send to outputfile in reverse order. PLZ HELP ME OUT .........THIS IS A RECENT QUESTION IN IGATE..

5 Answers   iGate,


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  


how will u pass dadta to cobol+db2 program...?

4 Answers   IBM,


what is sysncpoint?

1 Answers   IBM,


Categories