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 reference the variable block file formats from cobol programs

0 Answers  


01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??

1 Answers  


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

0 Answers  


how can i see junk values in dclgen or in hostvariable of comp ?

0 Answers   DELL,


I have a variable account-number declared as comp-3, s9(10) comp-3 in a file. How do i find a particular account number say 123456 in that file?

3 Answers  






What is different between variable length and fixed length?

2 Answers   TCS,


how do you reference the variable unblock file formats from cobol programs

0 Answers  


what is a load module ?

3 Answers   TCS,


When can the USING phrase be included in the call statement ?

2 Answers  


how to pass 100 to s9(4) how r they inserted ?

3 Answers   TCS,


hi is there any means of deletin a record from a ps usin cobol not using jcl?eg if i am reading a record and if some condition is matched tat particular record must be deletd fom the ps

5 Answers   iNautix,


What is ASKTIME, SUSPEND

1 Answers   IBM,


Categories