Summary -

In this topic, we described about the Simple PERFORM with detailed example.

Simple perform used to execute the statements-block/procedures. Simple PERFORM was categorized to both in-line or out-of-line.In simple PERFORM, the statements-block/procedures executed only once and control passed to the next executable statement.

Syntax -

Simple PERFORM Syntax

In-line PERFORMOut-of-line PERFORM
PERFORM procedure-name-1

procedure-name-1, procedure-name-2 -

Must name a section or paragraph in the procedure division. If one of the procedures is in a declarative procedure and both procedures are specified, the other procedure also must be procedure-names in the same declarative procedure.

If procedure-name-1 is specified, imperative-statement-1 and the END-PERFORM phrase must not be specified. If procedure-name-1 is omitted, imperative-statement-1 and the END-PERFORM phrase must be specified.

imperative-statement-1 -

The statements-block to be executed for an in-line PERFORM. Whenever an out-of-line PERFORM statement is executed, control is transferred to the first statement of the procedure named procedure-name-1. Control is always returned to the statement following the PERFORM statement.

Practical Example:

A simple program shows the Simple PERFORM coding in COBOL program.

Code -

Simple Perform Example Code

The above example describes about outline simple PERFORM which will display student class based on inputs.

Jcl -

Simple Perform Example Jcl

Output -

Simple Perform Example Output