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 |
how do you move only numeric data from A to B 01 A pic x(10) value 'a1b2c34d5e'. 01 B pic x(5).
i am a btech cs 2009 passout. i am opting for mainframe course. is it good to do this course? pls. anyone suggest me
what is Reentrancy and Quasi-reentrancy?
which is faster either static call or dynamic call ? and specify the reasons for it ? reply fast
What is length is cobol?
How can we increase the size of an existing PDS to include more no. of modules.
if one main program ,n -subprograms are then which call you follow ?why reasonuhg
How many bytes S(8) comp field occupy and its maximum value?
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?
whn do i get soc7 abend while moving alphanumeric to numeric or while moving numeric to aplhanumeric please reply ASAP?
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?
At the minimum, which division of COBOL is enough to be coded?