Re: newbie question on cobol syntax



James J. Gavan wrote:
Mayer wrote:
<snip>

Not a very expansive explanation but if you are saying that RM/COBOL is
rejecting the following, then it might be useful to post the full source
that you are getting errors for, plus the error messasges in the following :-

main.
display "hello"
display "goodbye"
stop run
.


Just a thought, it's so long ago. Doesn't 'old' RM require something like :-

MAIN-SECTION.
FIRST-PARAGRAPH. ?????????

display "hello"
display "goodbye"
stop run
.

Mayer,

Pretty dumb of me - I should have checked the beginning of the program I extracted from :-

-----------------------------------------------------------------------
000340 COPY "\USR\CS\TEXT2\CSWSCOMM.CBL".

000670 PROCEDURE DIVISION
000680
000340 COPY "\USR\CS\TEXT2\CSERROR.CBL".
000710
000720 A010-MAIN-LINE SECTION.
000730 A010-BEGIN.
000740
IF WS-LABEL-CHECK NOT = "QQ"
STOP RUN

ELSE MOVE WS-PROGRAM-TITLE TO WS-SCREEN-TITLE
PERFORM X010-OPEN-FILES.

A010-NEXT.
----------------------------------------------------------------------

I think your problem with RM/COBOL will be resolved if you have :-

PROCEDURE DIVISION.
A010-MAIN-LINE SECTION.
A010-BEGIN (or MAIN-PARAGRAPH if you like).

Micro Focus compilers allow you to take 'shortcuts'.

Jimmy
.



Relevant Pages