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 do you move only numeric data from A to B 01 A pic x(10) value 'a1b2c34d5e'. 01 B pic x(5).

2 Answers   DELL, Mind Tree,


i am a btech cs 2009 passout. i am opting for mainframe course. is it good to do this course? pls. anyone suggest me

4 Answers  


what is Reentrancy and Quasi-reentrancy?

1 Answers  


which is faster either static call or dynamic call ? and specify the reasons for it ? reply fast

1 Answers  


What is length is cobol?

0 Answers  






How can we increase the size of an existing PDS to include more no. of modules.

3 Answers  


if one main program ,n -subprograms are then which call you follow ?why reasonuhg

4 Answers   UHG,


How many bytes S(8) comp field occupy and its maximum value?

0 Answers  


In a COBOL program, 2 tables TABLE1 and TABLE2 are defined that are indexed by INDEX1 and INDEX2 respectively. Can we use INDEX1 with TABLE2 and INDEX2 with TABLE1?

1 Answers  


whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?

9 Answers  


Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?

4 Answers  


At the minimum, which division of COBOL is enough to be coded?

3 Answers   CTS,


Categories