ENTER Statement - COBOL

The ENTER statement provides a means of allowing the use of more than one language in the same program. In RM/COBOL, no other source language is allowed in the source program.

ENTER language-name-1 [routine-name-1 ]

language-name-1 may be any COBOL word.

routine-name-1 is a COBOL word and may be referred to only in an ENTER sentence.

The ENTER statement must appear only in a sentence by itself.

The sentence ENTER COBOL must follow the last statement of the other language in order to indicate to the compiler where a return to COBOL source language takes place. It must be followed by a separator period.

The statements of the other language are executed in the object program as if they had been compiled into the object program following the ENTER statement.

No other languages may appear in a COBOL source program following an ENTER statement.

routine-name-1 indicates the portion of other-language coding to be executed at this point in the procedure sequence when the entered language cannot be written in-line.If the other language statements are written in-line, routine-name-1 is not used.

The ENTER statement is accepted as commentary for compatibility with other COBOL implementations.The CALL statement may be used to execute object programs from other language processors.

ENTER Statement Examples

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

COBOL Topics