Exec Statement

CHAPTER - 4  Exec Statement
EXEC statement is used to execute a program/procedure

A maximum of 255 EXEC statement can code in an single job

Syntax  - //stepname EXEC PGM=program-name,keyword parameters

            Positional parameter  -  Program-name


Keyword parameters for EXEC
  
            PARM  ACCT ADDRSPC DPRTY PERFORM RD

PARM

          PARAM parameter is used to pass information to program

          Syntax  ->  PARM=value
                 
                      Value is a string can be 1 to 100 characters long.


          
         PASSING PARAMETER USING PARM PARAMETER
 
Image
 
PARM-INDICATOR will contain "RAMESH"

         PARM-LENGTH contains length of string.             



Remaining parameters , We wont use much     

ACCT    - accounting information for that step

ADDRSPC - used to indicate to the system that the job step is use either 
          virtual or real storage
 
DPRTY   - used to assign priority to the job step

PERFORM - specifies the rate at which system resources used by job step

RD      - restart definition is used to specify automatic restart of a job 
          if it abends