CALL statement

The CALL statement causes control to be transferred to a specific program within the run unit.

Format.

          CALL { identifier-1 }
               { literal-1    }

                [ USING { [ BY ] { REFERENCE } { identifier-2 } ... } ... ]
                                 { VALUE     } { literal-2    }
                                 { CONTENT   }

                [ { RETURNING } identifier-3 ]
                  { GIVING    }

                [ [ ON ] EXCEPTION imperative-statement-1 ]
                [ NOT [ ON ] EXCEPTION imperative-statement-2 ]

                [ END-CALL ]

Notes.

Only programs generated by Kobol can be called using identifier-1.