Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

MODULE 7: COBOL Control statements


Inline PERFORM

  • As name suggests, Inline PERFORM is used to execute those set of instructions which are coded in line between PERFORM and END-PERFORM.
  • This format of PERFORM doesn’t require any separate PARAGRAPH or SECTION to be coded to enclose the set of instructions.
  • Scope terminator(END-PERFORM) must be coded to mark end of PERFORM statement
  • Syntax:-
  • PERFORM <statemens> END-PERFORM

  • Example:-
    In PROCUEDURE DIVISION,

    PARA-0. PERFORM DISPLAY 'INLINE PERFORM' DISPLAY 'CAN BE CODED' DISPLAY 'LIKE THIS' END-PERFORM. STOP RUN.

    SYSOUT display (output):-

    INLINE PERFORM CAN BE CODED LIKE THIS



Advertisements






© copyright mainframebug.com
Privacy Policy