![[z/OS]](../images/ngzos.gif)
z/OS SDK용 JZOS 일괄처리 툴킷과 함께 사용할 WSGrid JCL 템플리트
WSGrid 작업 템플리트는 WSGrid 유틸리티에 대한 입력입니다. WSGrid 유틸리티를 사용하면 기본 메시지 전달 시스템을 사용하도록 외부 인터페이스를 구성한 일괄처리 스케줄러로 작업을 제출할 수 있습니다. z/OS® SDK(Software Development Kit)용 JZOS 일괄처리 툴킷과 함께 템플리트를 사용하십시오.
//WSGRIDT JOB (),MSGCLASS=H
//*********************************************************************
//*
//* WSGrid Job Template
//*
//* WSGrid is a batch Java utility that runs under control of JZOS
//* for the purpose of sub-dispatching a WCG job. The utility submits
//* the WCG job, writes the WCG joblog to STDOUT DD as the WCG job runs
//* and then ends with a return code indicating the RC of the WCG 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>
//*********************************************************************
//*
//* Start WSGrid with JZOS Launcher
//*
//*********************************************************************
//JAVA EXEC PROC=JVMPRC50,
// JAVACLS='com.ibm.ws.bootstrap.WSLauncher'
//MAINARGS DD *
com.ibm.ws.grid.comm.WSGrid
//*********************************************************************
//*
//* WSGrid Control Properties - required DD
//*
//* scheduler-host=<host name of job scheduler server>
//* scheduler-port=<HTTP port of job scheduler server>
//* submitter-userid=<authorized userid>
//* submitter-password=<password - may be encoded with WAS utility>
//* timeout=<JMS receive timeout in milliseconds>
//* 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.
//*
//*********************************************************************
//*WGRSTRT DD PATH='&WGRSTRT.'
//* PATHOPTS=(ORDWR,OCREAT),
//* PATHMODE=(SIRUSR,SIWUSR)
//*
//*********************************************************************
//*
//* Environment Variable Section
//*
//*********************************************************************
//STDENV DD *
#
#---------------------------------------------------------------------
# Required: specify WAS home directory
#---------------------------------------------------------------------
#
WAS_HOME="<WAS home directory - e.g. /WebSphere/AppServer>"
#
#---------------------------------------------------------------------
# Configure JVM options
#---------------------------------------------------------------------
#
# Heap size
#
#---------------------------------------------------------------------
IJO="-Xms256m -Xmx512m"
#---------------------------------------------------------------------
#
# DD encodings
#
# Values: IBM-1047 (ebcdic - default)
# ISO8859-1 (ascii)
#
#---------------------------------------------------------------------
#IJO="$IJO -Dcom.ibm.ws.grid.dd.wgcntl.encoding=ISO8859-1"
#IJO="$IJO -Dcom.ibm.ws.grid.dd.wgjob.encoding=ISO8859-1"
#IJO="$IJO -Dcom.ibm.ws.grid.dd.wgsubs.encoding=ISO8859-1"
#IJO="$IJO -Dcom.ibm.ws.grid.dd.wgrstrt.encoding=ISO8859-1"
#---------------------------------------------------------------------
#
# Enable verbose:class to debug ClassNotFoundException
#
#---------------------------------------------------------------------
#IJO="$IJO -verbose:class"
#---------------------------------------------------------------------
REPLACE_WAS_HOME=$WAS_HOME
JAVA_HOME=$WAS_HOME/java
PATH=/bin:/usr/bin:$JAVA_HOME/bin:$WAS_HOME/bin:$PATH
LIBPATH=/lib:/usr/lib:$JAVA_HOME/bin:$JAVA_HOME/bin/classic:$LIBPATH
. $WAS_HOME/bin/setupCmdLine.sh
ENCODE_ARGS="-Xnoargsconversion -Dfile.encoding=ISO8859-1"
JMS_PATH=$WAS_HOME/lib/WMQ/java/lib/com.ibm.mq.jar:$WAS_HOME/lib/WMQ/java/lib/co
CLASSPATH=$JAVA_HOME:$WAS_HOME/lib/launchclient.jar:$WAS_CLASSPATH:$JMS_PATH
IBM_JAVA_OPTIONS="$IJO \
-Dwas.install.root=$WAS_HOME \
-Dws.ext.dirs=$WAS_EXT_DIRS \
-Dfile.encoding=ISO8859-1 "
export IBM_JAVA_OPTIONS JAVA_HOME PATH LIBPATH CLASSPATH WAS_HOME
//