10 Points – Instream and Cataloged Procedures of JCL

SriniForum
SriniForum|Best IT Forum

There are many rules to modify a Instream or Cataloged procedures: I have given here important rules.

In-stream Procedures :

  • Do not place any JCL statements (other than the ones listed in this topic) or any JES2 or JES3 control statements in the procedure.
  • Do not define one in-stream procedure within another, that is, do not use nested in-stream procedures. Refer to Nested procedures for information on methods for nesting procedures.
  • Do not use an in-stream procedure if the procedure will be run as a started job under the MASTER subsystem, that is, includes a JOB statement and is started via a START command such as S membername,SUB=MSTR.

Cataloged Procedures:

We can modify a procedure by-

  • Overriding, nullifying, or adding EXEC statement parameters
  • Overriding, nullifying, or adding parameters to DD or OUTPUT JCL statements
  • Adding DD or OUTPUT JCL statements
  • If a keyword parameter is to override the parameter or be added to every EXEC statement in the procedure, code the parameter in the usual way. For example, the ACCT parameter applies to all steps:

//STEP1 EXEC PROC=RPT,ACCT=5670

  • If the keyword parameter is to override the parameter or be added to only one EXEC statement in the procedure, code .procstepname immediatelyfollowing the keyword. Theprocstepname is the name field of the procedure EXEC statement containing the keywordparameterto be overridden. For example, theACCTparameter applies to only stepPSTEPWED:
    //STEP1  EXEC  PROC=RPT,ACCT.PSTEPWED=5670
    • You cannot modify a PGM parameter.
    • The calling EXEC statement can contain changes for more than one parameter and for the same parameter in more than one step in a called procedure. (If you code multiple overrides for any parameter in the same step, only the last specification will be effective.)
    • Modifyingparameters should appear in the following order:
      • Parameters without a procstepname qualifier.
      • All parameters modifying the first step, then the second step, then the third step, and so forth.
    • You do not need to code the parameters for each step in the same order as they appear on the procedure EXEC statement.
    • You must code an entire overriding parameter even if you are changing only part of it.
  • To override, nullify, or addparameters to a procedure OUTPUT JCL or DD statement, code in the name field of the overriding OUTPUT JCL or DD statement the name of the procedure step containing the overridden statement, followed by a period, followed by the name of the procedure OUTPUT JCL statement or theddname of the procedure DD statement.
    //pstepname.name   OUTPUT parameters
       //pstepname.ddname DD     parameters
    • To nullify all parameters but the DCB parameter, code DUMMY on the overriding DD statement.
    • Special rules apply when overriding aDCBparameter:
      • Code only the keyword subparameters to be changed; the other DCB subparameters remain unchanged.
      • If a positional subparameter is needed, code it, regardless of whether it appears in the overridden DCB parameter. If a positional subparameter is not needed or is to be nullified, omit it from the overriding DCB parameter.
      • To nullify the entire DCB parameter, nullify each subparameter appearing in the overridden DCB parameter.
    • To nullify aDUMMYparameter on the procedure statement, code one of the following on the overriding statement:
      • A DSNAME parameter with a name other than NULLFILE
      • A SYSOUT parameter
      • A * or DATA parameter
      • A SUBSYS parameter.
  • Supplyinstream data foraProc
    //PROCSTP1.ANYNAME DD *
       //PROCSTP2.PREDEFN DD DATA
    
  • Instream andCatalogedprocedures:
    
    
    /HELLO     PROC
    //STEPA     EXEC  PGM=IEBGENER 
    //SYSIN     DD    DUMMY
    //SYSPRINT  DD    SYSOUT=A
    //SYSUT2    DD    SYSOUT=A
    //SYSUT1    DD    DATA 
    HELLO WORLD 
    /* 
    //          PEND

Check here for more rules.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.