+

Search Tips   |   Advanced Search

WSGrid job template

The WSGrid job template is an input to the WSGrid utility. The template contains the properties that the WSGrid utility uses to interact with a batch job.


WSGrid job template

//WSGRIDT JOB (),MSGCLASS=H
//RUN EXEC PGM=WSGRID
//*********************************************************************
//*
//* WSGrid Job Template
//*
//* WSGrid is a Java utility that runs under control of JZOS for the //* purpose of sub-dispatching a batch job. The utility submits the //* batch job, writes the batch joblog to STDOUT DD as the WCG job runs
//* and then ends with a return code indicating the RC of the batch job.
//*
//* RC codes
//* --------
//*
//* 0-3040 - user range
//*
//*   This is a user defined return code returned by a completed
//*   WCG job.
//*
//* 3041-4096 - system ran
//*
//*   This is a return codes set by system prior to completion of
//*   a WCG job.  The following return codes are defined:
//*
//*     4084 (-12) - WCG job ended in restartable state
//*     4080 (-16) - fatal system error //*
//*********************************************************************
//*
//* Required settings:
//*
//* 1) WGCNTL symbol must be set to the path-qualified file //*    containing the WSGRID control properties. See comment
//*    block near WGCNTL DD for further information.
//*
//* 2) WGSUB symbol must be set to the path-qualified file //*    containing a WCG xJCL job definition.
//*
//* 3) WAS_HOME environment variable must be set to name of
//*    WAS home directory. Find this variable under the STDENV DD.
//*
//* Optional settings:
//*
//* 1) WGSUBS symbol is set to the path-qualified file //*    containing WCG job substitution properties.
//*
//* 2) WGRSTRT symbol is set to the path-qualified file //*    used for restart processing output/input.  See
//*    comment block near WGRSTRT DD for further information.
//*
//*********************************************************************
// SET WGCNTL=<path-qualified file name>
// SET WGJOB=<path-qualified file name>
//*SET WGSUBS=<path-qualified file name>
//*SET WGRSTRT=<path-qualified file name>
//*********************************************************************
//*
//* WSGrid Control Properties -  required DD
//*
//* queue-manager-name=<MQ queue manager name>
//* scheduler-input-queue=<MQ input queue as defined during configuration>
//* scheduler-output-queue=<MQ output queue as defined during configuration>
//* timeout=<in milliseconds for WSGRID to wait for next outputmessage from job scheduler>
//* debug=<true|false>
//* 
//*********************************************************************
//WGCNTL DD PATH='&WGCNTL.'
//*
//*********************************************************************
//*
//* WSGrid Job Definition -  required DD
//*
//* File must contain valid WCG JCL job definition.
//*
//*********************************************************************
//WGJOB  DD PATH='&WGJOB.'
//*
//*********************************************************************
//*
//* WSGrid Job Substitutions - optional DD
//*
//* Values are of form:
//*
//* substitution-prop.<property name>=<property value>
//*
//*********************************************************************
//*WGSUBS DD PATH='&WGSUBS.'
//*
//*********************************************************************
//*
//* WSGrid Restart Token - optional DD
//*
//* Note: restart token is written if and only if this job step ends
//*       with RC=4084 (-12).
//*
//*       The WGRSTRT DD takes precedence over the WGJOB DD, so //*       if this job is restarted with a non-empty restart file //*       the WCG job identified by the token will be restarted - a //*       new job instance based on the job definition in WGJOB is //*       not created.
//*
//* restart-job=<job_id of the job to restart. specify only when restart a job>
//*********************************************************************
//*WGRSTRT DD PATH='&WGRSTRT.'
//*             PATHOPTS=(ORDWR,OCREAT), //*             PATHMODE=(SIRUSR,SIWUSR)
//*
//*********************************************************************


Example JCL to submit a new job

Use the following example when to submit a job through the WSGrid utility.

//WSGRIDCI JOB 1,'HUTCH',MSGCLASS=O
//SUBMIT EXEC PGM=WSGRID,REGION=0M
//STEPLIB DD DSN=B7CELL.WSGRID.LOAD,DISP=SHR
// DD DISP=SHR,DSN=SYS1.MQM.SCSQLOAD
// DD DISP=SHR,DSN=SYS1.MQM.SCSQAUTH
//*****************************************************
//SYSPRINT DD SYSOUT=*
//*****************************************************
//WGCNTL DD *
queue-manager-name=MQW1
scheduler-input-queue=WASIQCG
scheduler-output-queue=WASOQCG
timeout=5000
submit-timeout=30000
//WGJOB DD PATH='/u/hutch/cg/jcl/SimpleCIxJCL_Ebc.xml'
//WGSUBS DD *
substitution-prop.calctime=5
//* 


Example JCL to restart a job

Use the following example when to restart a job through the WSGrid utility.

//B7WSRST4 JOB 1,'Restart IVT',MSGCLASS=O,NOTIFY=?
//SUBMIT EXEC PGM=WSGRID,REGION=0M
//STEPLIB DD DSN=B7CELL.WSGRID.LOAD,DISP=SHR
// DD DISP=SHR,DSN=SYS1.MQM.SCSQLOAD
// DD DISP=SHR,DSN=SYS1.MQM.SCSQAUTH
//SYSPRINT DD SYSOUT=*
//WGCNTL DD *
queue-manager-name=MQW1
scheduler-input-queue=WASIQ
scheduler-output-queue=WASOQ
timeout=5000
restart-job=XDCGIVTtxt-Long:00004
//WGJOB DD PATH='/u/hutch/cg/jcl/EBCxJCL-XDCGIVT-Text_Long.xml' 


Related concepts

  • Job scheduler integration with external schedulers


    Related tasks

  • Administer the batch environment Reference topic