period is missing in the cobol program which error we
getting
Answers were Sorted based on User's Feedback
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 |
Answer / prashanth
end scope terminator missing ,or period missing
| Is This Answer Correct ? | 6 Yes | 2 No |
What kind of error is trapped by on size error option?
What is the difference between comp and comp-3 usage? Explain other COBOL usage?s.
What is inspect in cobol ?
If you were passing a table via linkage, which is preferable - a subscript or an index?
Why occurs can not be used in 01 level ?
. How do we cast a variable in COBOL
I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What is the difference between next sentence and continue in cobol programing language?
Read filea And file b write the same records in both files? Records in a but not in b record in b but not in a
WHY LRECL NEEDS TO BE 4 EXTRA THEN THE COBOL FILE LENGTH & WHAT IT CONTAIN IN THAT LENGTH
What is the difference between a subscript and an index in a table definition?