period is missing in the cobol program which error we
getting

Answers were Sorted based on User's Feedback



period is missing in the cobol program which error we getting..

Answer / vish

Unfortunately none of the answers are complete. A missing
period doesn't always give compilation errors rather it
depends upon at which place the period is missing. Ending a
sentence with a period in COBOL is rather a good practice
than a mandate for most of the code otherwise the code may
be logically gonig in wrong way. But true, COBOL mandates
that a period must be given at some places. for example,
see the below syntax:

000000-PARA.
IF ABC
DISPLAY 'ABC'
END-IF
<COBOL SYNTAXES>
<COBOL SYNTAXES>
DISPLAY 'AT THE END OF PARA'
000000-EXIT.
EXIT.

here it will give the compilation error as the compiler
expects the last executable sentence before the 000000-EXIT
to be ended with a period (.). However, if we end the last
DISPLAY sentence with a period then the compilation will go
fine without any error or warning.

consider some other examples...
case#1
000000-PARA.
IF ABC = 0
DISPLAY 'ABC'
ELSE
NEXT SENTENCE
END-IF
DISPLAY 'BCD'
DISPLAY 'CDE'
DISPLAY 'AT THE END OF PARA'.
DISPLAY 'BYE'.
000000-EXIT.
EXIT.

case#2
000000-PARA.
IF ABC = 0
DISPLAY 'ABC'
ELSE
NEXT SENTENCE
END-IF.
DISPLAY 'BCD'.
DISPLAY 'CDE'.
DISPLAY 'AT THE END OF PARA'.
DISPLAY 'BYE'.
000000-EXIT.
EXIT.

Suppose ABC has a value 1 then we will get the output as
follws:
for case#1
BYE

for case#2
BCD
CDE
AT THE END OF PARA
BYE

These are just some examples...bottomline is - if we don't
give the scope terminator with periods then we may get
compilation errors or we may get logical errors, depending
upon where you missed the period. Enjoy!

Is This Answer Correct ?    12 Yes 3 No

period is missing in the cobol program which error we getting..

Answer / m.prabhu

you will get maxcc 8 while doing compaile

Is This Answer Correct ?    7 Yes 1 No

period is missing in the cobol program which error we getting..

Answer / prashanth

end scope terminator missing ,or period missing

Is This Answer Correct ?    6 Yes 2 No

period is missing in the cobol program which error we getting..

Answer / karimulla

we get soc1 error

Is This Answer Correct ?    0 Yes 3 No

period is missing in the cobol program which error we getting..

Answer / sasikanth

we get a soc 8 error

Is This Answer Correct ?    2 Yes 10 No

Post New Answer

More COBOL Interview Questions

how to run sub programs using static and dynamic call ...

3 Answers   TCS,


What are decleratives in COBOL ?

1 Answers   Xansa,


What is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?

4 Answers  


What is inspect in cobol ?

0 Answers   Infosys,


What are the different rules for performing sort operation?

0 Answers  






can internal sort be applied to sort ksds files?

1 Answers  


What is a scope terminator? Give examples.

2 Answers  


In CICS/VSAM every file that is accessed should be defined in FCT. we have CICS READ, WRITE, BROWSE commands for VSAM files. How does it work with DB2 tables. It know it has to do with the plan. Please expain with examples.

1 Answers  


i have a file which contains records like 10,30,90,50,20,40,80,60,70 i want to display these records in reverse order like 70,60,80,40,20,50,90,30,10 please give me the cobol code (do not sort the records)

3 Answers   Cap Gemini, Mind Tree,


How To move a value to an array using move verb?

3 Answers   IBM,


Name the divisions in a COBOL program ?

7 Answers  


what is the difference between COBOL2 AND COBOL390?

0 Answers   L&T,


Categories