Answered Questions

  • Describe the EXEC statement, its meaning, syntax and keywords?

    The EXEC statement identifies the program to be executed via a PGM=program name keyword. Its format is //jobname EXEC PGM=program name. The PARM= keyword can be used to pass external values to the executing program.

    JOSEPH P JOHN

    • Oct 25th, 2007

    EXEC statement refers to a PROGRAM or a PROCEDURE to be executed Syntax: //stepname    EXEC   PGM=pgm-name,parametersOR //stepname     EXEC    procedure-name,parametersParameters are1.Positional(pgm-name,procedure name) 2.Keyword (PARM,REGION,ACCT,COND,TIME)

    Daryljax

    • Aug 27th, 2007

    The EXEC statement is used to specify either the program (PGM) or the Procedure (PROC) to execute.  The format is://aaaaaaaa EXEC PGM=xxxxxxxxor //aaaaaaaa EXEC zzzzzzzzWhere xxxxxxxx is the program name and zzzzzzzz is the PROC nameand aaaaaaaa is the stepname.

  • What is an in line PERFORM? When would you use it? Anything else to say about it?

    The PERFORM and END-PERFORM statements bracket all COBOL II statements between them. The COBOL equivalent is to PERFORM or PERFORM THRU a paragraph. In line PERFORMs work as long as there are no internal GO TOs, not even to an exit. The in line PERFORM for readability should not exceed a page length - often it will reference other PERFORM paragraphs.

    sudhakar chandu

    • Sep 28th, 2007

    In-line perform is a concept where the control will execute a block of statements residing in a same paragraph and here the control will not shift form one paragraph to another paragraph.