Previous Topic: 2.3.3.2.1.8 JCLGEN Parameter Sharing

Next Topic: 2.3.3.2.3 Input DD Statements for SMF (INPUTRDR)

2.3.3.2.2 Job and JES Definitions (USERJCL)

The USERJCL parameter member exists at both the complex
(sharedprefix) and unit (prefix) levels.  Use the USERJCL
parameter member to add JCL comments and/or JES control
statements prior to the first EXEC JCL statement of each job
generated by JCLGEN.  A worksheet for coding USERJCL is
provided in Figure 2-23.  You may also supply a JOB card to
be used by CA MICS rather than have it generate one from the
parameters described in the previous section.  (You have a
limited symbolic-parameter substitution capability in
specifying these cards, as described below.)

For example, if your installation supported a special
//PROCLIB control card and also a /*PASSWORD JES2 control
card, they could both be incorporated in every job generated
by JCLGEN by placing the following in MICS.PARMS(USERJCL):

    //@ USER DEFINED JCL
    /@PASSWORD XYZ
    //PROCLIB DD DISP=SHR,DSN=&PROCLIB

Symbols beginning with an "&" will be substituted immediately
by the JCLGEN processor.  They will not be present in the
final generated job stream.  If a symbol is meant to be
present in the generated member, it must be prefixed with a
question mark (?REGION) which will be translated to an "&"
(&REGION) before the member is written.

The JOB card will be created in one of two ways.  It can be
automatically created by JCLGEN from the Extended Job card
Definitions described in the previous section or from the
specification you place into MICS.PARMS(USERJCL).  If your
site has standards defining the order or placement of
statements on a job card, the second method of JOB card
creation must be used.  When the first line in the USERJCL
member is "JOBCARD INCLUDED," JCLGEN will not automatically
create a job card.  This allows you to define the exact order
and placement of JOB parameters in the USERJCL member.  The
"JOBCARD INCLUDED" keywords must start in column 1.

The JOB card can be created with constant data or with a
combination of constant data and symbolic references to the
values defined in the extended JOB card definitions defined
in Section 2.3.3.2.1.6, "Database Unit Extended Jobcard
Definitions."

The simplest example of a defined job card would have the
minimum required parameters for the installation provided as
constants.  For example:

   JOBCARD INCLUDED
   //&JOBNAME JOB (10,21,44248,SCM),'MURPHY',CLASS=A
   /@JOBPARM LINECT=0,LINES=20,COPIES=1

Note the reference to &JOBNAME.  This allows CA MICS to
supply the JOBNAME appropriate to the job (e.g., DAILY) being
generated.  The generated name in the symbol "&JOBNAME" will
include any JOBNAME prefix you defined in JCLDEF/JCLDEFC.

If you used all of the parameters from the extended JOB card
definitions (in a JES2 installation), the USERJCL member
could contain:

   JOBCARD INCLUDED
   :SET SEQ=&JOB7380
   //&JOBNAME JOB (&ACCOUNT),'&PROG',CLASS=&CLASS,
   // GROUP=&GROUP,MSGCLASS=&MSGCLASS,MSGLEVEL=(&MSGLEVEL),
   // PRTY=&PRTY,NOTIFY=&NOTIFY,PASSWORD=&PASSWORD,
   // PERFORM=&PERFORM,RD=NC,REGION=&REGION,TIME=(&JOBTIME),
   // USER=&USER,RESTART=*
   /@JOBPARM LINECT=0,LINES=&JOBLINES,COPIES=&JOBCOPIES

Since some of the extended JOB card definition variables are
long, abbreviations have been provided.  Using the
abbreviations in a JES3 installation, the USERJCL member
would contain:

   JOBCARD INCLUDED
   :SET SEQ=&JOB7380
   //&JOBNAME JOB (&A),'&PRO',GROUP=&G,
   // MSGCLASS=&MSC,MSGLEVEL=(&MSL),NOTIFY=&N,PASSWORD=&PA,
   // PERFORM=&PE,PRTY=&PRT,RD=NC,REGION=&RE,TIME=(&T),
   // USER=&U,RESTART=*
   //@MAIN LINES=(&LINES,WARNING),CLASS=&C
   //@FORMAT PR,DDNAME=,COPIES=&COPIES

Note that if a parameter must be supplied in columns 73
through 80 of the first JOB card, the JOB7380 parameter must
be used.  Columns 73 through 80 of the USERJCL member are
ignored.  To be used, the JOB7380 parameter must be assigned
to the sequence field (&SEQ) by the user.  This is done by
including a Generation Control Language statement
immediately following the JOBCARD INCLUDED statement.  The
statement which must be included is:

              :SET SEQ=&JOB7380

Three of the variables in the above examples (ie. &JOBTIME,
&JOBLINES, and &JOBCOPIES) are not from definitions from
JCLDEF.  These three variables are defined for each job in
member JCLINFO (refer to Section 2.3.3.3.2.2, "Job/CLIST
Attribute Table").

    If you define your own JOB card, remember the following:

    1) Sufficient room must be left on each line for the
       substitution of symbolic variables.  The easiest way
       to do this is to just code one job card parameter on
       each line, if this is allowed by your JCL standards.

    2) The JES statements normally produced by JCLGEN will be
       also be omitted along with the JOB card; therefore,
       the generation of these statements becomes your
       responsibility.

    3) Generation Control Language statements may be used in
       the member USERJCL (GCL is discussed in Section
       2.3.3.3.3, "Generation Control Language").

An example of using Generation Control Language statements in
USERJCL follows.

An installation requires the MONTHLY job, in their PRIMARY
unit database, to have a unique accounting parameter (ACCT)
that differs from the normal JCLDEF value.

  JOBCARD INCLUDED
  :SET SEQ=&JOB7380
  :IF &DATABASE NE PRIMARY THEN GOTO SKIPA
  :IF &MEMBER = MONTHLY THEN
  :SET ACCT = &STR(AC01,DP25)
  :SKIPA:
  //&JOBNAME  JOB  (&ACCT),'&PROG',CLASS=&CLASS,
  //  MSGCLASS=&MSGCLASS,PRTY=&PRTY,
  //  MSGLEVEL=(&MSGLEVEL),NOTIFY=&NOTIFY
  /@JOBPARM LINES=&JOBLINES
  //PROCLIB DD DISP=SHR,DSN=&PROCLIB



+--------------------------------------------------------------------------+ | INSTALLATION PREPARATION WORKSHEET: User Inserted JCL Definitions | | | | PARMS Library Member is USERJCL | | Reference Section: 2.3.3.2.2 | +--------------------------------------------------------------------------+ | | | This member is only required if the installation's job stream JCL | | conventions require special JCL (e.g. PROCLIB, PASSWORD) to be | | inserted in each batch job stream generated in the JCL generation | | process. If required by installation standards, a JOB card can be | | defined in this member. If this is done, the first statement, | | (appearing even before any comment cards), must be the words | | "JOBCARD INCLUDED". This prevents JCLGEN from creating a JOB card. | | In most installations, no JCL statements nor comments may appear | | before the jobcard. | | | | | | //@ START OF USER DEFINED JCL STATEMENTS | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | ________________________________________________________________________ | | | | //@ END OF USER DEFINED JCL STATEMENTS | | | | ....5...10...15...20...25...30...35...40...45...50...55...60...65...70.. | +--------------------------------------------------------------------------+


 Figure 2-23.  USERJCL Definition Worksheet