COBOL Program

In Cobol, Why we have to give one blank space between program-id and program name?

Questions by vikaswagh

Showing Answers 1 - 2 of 2 Answers


  • Aug 19th, 2010

It's not nessary to give a space after PROGRAM-ID & before program name because every COBOL statement ends with a period (.) which signifies the end of a statement. If you do not give space between PROGRAM-ID & program name then the COBOL compiler will assume space between the two statements and compile the COBOL program. All the following syntax will execute in a COBOL program:

1) PROGRAM-ID.'PROGRAM-NAME'.   --->(This will only generate a Return code of 4. But the progra will execute.)

  Was this answer useful?  Yes


  • Jan 7th, 2015

That is the syntax of the language. Why do we begin English sentences with a capital letter?

That is how we are taught.

In the same way, you need a space.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions