JCL to demonstrate the combination of REXX, COBOL and Java
Posted: Sat Dec 13, 2008 8:14 am
I'd really appreciate some help debugging this JCL. I am developing it for a class I am teaching, it is intended to demonstrate the combination of REXX, COBOL and Java (using RMI to connect JZOS server and USS client). However when I run it, it says:
* No DD definition found for BOOKDB in COBLSTEP when it is manifestly there.
* The COBOL IGWYCLG load-and-go compiler complains that it cannot find the load module it has just built (*.LKED.SYSLMOD).
* The sort operation fails with 'INVALID DATA SET ATTRIBUTES SPECIFIED SORTIN BLKSIZE' whatever that means.
I've tried pounding my head on my desk, but it does no good. At this point class will be over before I get this working, and I thought it would be a nice wrap for the class, not the nightmare it is turning out to be......
* No DD definition found for BOOKDB in COBLSTEP when it is manifestly there.
* The COBOL IGWYCLG load-and-go compiler complains that it cannot find the load module it has just built (*.LKED.SYSLMOD).
* The sort operation fails with 'INVALID DATA SET ATTRIBUTES SPECIFIED SORTIN BLKSIZE' whatever that means.
I've tried pounding my head on my desk, but it does no good. At this point class will be over before I get this working, and I thought it would be a nice wrap for the class, not the nightmare it is turning out to be......
//SERVER JOB (ITSO),'...',REGION=300M,
// CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID
//PROCLIB JCLLIB ORDER=KC02250.BOOKDB.JCL
//********************************************************
//* Build the VSAM KSDS file that is used as the database.
//********************************************************
//* STEP ONE: Create the VSAM cluster.
//********************************************************
//VSAMSTEP EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE -
KC02250.BOOKDB.DATABASE -
CLUSTER -
PURGE -
ERASE
DEFINE CLUSTER -
(NAME('KC02250.BOOKDB.DATABASE') -
TRK(4 4) -
RECSZ(80 80) -
INDEXED -
NOREUSE -
KEYS(10 0) -
OWNER(KC02250) )
//*
//********************************************************
//* STEP TWO: Execute a REXX exec to build a sequential
//* data file from a CSV (comma-separated values) input.
//********************************************************
//REXXSTEP EXEC PGM=IRXJCL,PARM='GENDATA'
//* SYSTSIN DD DSN=KC02250.BOOKDB.DATA,DISP=SHR
//* SYSTSPRT DD DSN=&&REXXOUT,DISP=(NEW,PASS),
//* SPACE=(CYL,(2,1))
//INDATA DD DSN=KC02250.BOOKDB.DATA,DISP=SHR
//OUTDATA DD DSN=&&REXXOUT,DISP=(NEW,PASS),
// SPACE=(CYL,(2,1))
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DSN=KC02250.BOOKDB.EXECS,DISP=SHR
//********************************************************
//* STEP THREE: Sort the data file by ISBN.
//********************************************************
//SORTSTEP EXEC PGM=SORT
//SYSIN DD *
SORT FIELDS=(1,10,CH,A)
/*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&REXXOUT,DISP=(OLD,DELETE)
//SORTOUT DD DSN=&&SORTDATA,DISP=(NEW,PASS),
// SPACE=(CYL,(2,1))
//*
//********************************************************
//* STEP FOUR: Compile, link and run a COBOL program
//* that reads from the sorted data into the VSAM cluster,
//* generating a report of the inventory in the process.
//*
//* See JCL notes for the definition of IGYWCLR proc
//********************************************************
//COBLSTEP EXEC IGYWCLG,REGION=250M,
// PARM.COBOL='TEST,RENT,APOST,OBJECT,NODYNAM,LIB'
//COBOL.SYSIN DD DISP=SHR,DSN=KC02250.BOOKDB.COBOL(BUILDDBA)
// DD DISP=SHR,DSN=KC02250.BOOKDB.COBOL(VSAMREC)
// DD DISP=SHR,DSN=KC02250.BOOKDB.COBOL(BUILDDBB)
//* STEPLIB DD DSNAME=&LIBPRFX..SCEERUN,DISP=SHR
//BOOKS DD DSN=&&SORTDATA,DISP=(OLD,DELETE)
//BOOKDB DD DSN=KC02250.BOOKDB.DATABASE,DISP=SHR
//SYSPRINT DD SYSOUT=*
//* COBOL.SYSLIB DD DSN=CEE.SCEESAMP,DISP=SHR
//* CEEDUMP DD SYSOUT=*
//* SYSUDUMP DD SYSOUT=*
//********************************************************
//* STEP FIVE: Run the Java server program that allows
//* RMI clients to query the database. This also allows
//* the operator to interact with the server at the
//* SDSF console, turning on and off logging, and
//* eventually terminating the server.
//*
//* Substitute name the server binds to in registry and
//* and port on the z/OS server that registry binds to.
//********************************************************
//* TESTRC IF (RC > 0) THEN
//JAVASTEP EXEC PROC=EXJZOSVM,
// VERSION='14',
// JAVACLS='edu.stevens.cs.cs526.server.ServerMain',
// ARGS='XXXXXXX ddddddd'
//BOOKDB DD DSN=KC02250.BOOKDB.DATABASE,DISP=SHR
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD *
export JAVA_HOME=/usr/lpp/java/J1.4
JZOSAW_HOME=/u/kc02250/jzos
export PATH=/bin:"${JAVA_HOME}"/bin:
LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic
LIBPATH="$LIBPATH":"${JZOSAW_HOME}"
export LIBPATH="$LIBPATH":
# Force the alphaWorks version of JZOS to run overriding the SDK
OPTS="-Djava.ext.dirs=${JZOSAW_HOME}:${JAVA_HOME}/lib/ext"
export JZOS_JVM_OPTIONS="$OPTS"
# Add the JZOS alphaWorks jars to the classpath
for i in "${JZOSAW_HOME}"/*.jar; do
CLASSPATH="$CLASSPATH":"$i"
done
# Add classpath for server code.
CLASSPATH="$CLASSPATH":"/u/kc02250/bookdb/server.jar"
export CLASSPATH="$CLASSPATH":
#
# Set JZOS specific options
# Use this variable to specify encoding for DD STDOUT and STDERR
#export JZOS_OUTPUT_ENCODING=Cp1047
# Use this variable to prevent JZOS from handling MVS operator commands
#export JZOS_ENABLE_MVS_COMMANDS=false
# Use this variable to supply additional arguments to main
#
#export JZOS_MAIN_ARGS=""
# Configure JVM options
IJO="-Xms16m -Xmx128m"
//
//* ENDIF
//********************************************************
//* STEP SIX: Dump the VSAM file to the printer
//********************************************************
//DUMPSTEP EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT -
INDATASET(KC02250.BOOKDB.DATABASE) CHAR
//*
// CLASS=A,MSGCLASS=H,NOTIFY=&SYSUID
//PROCLIB JCLLIB ORDER=KC02250.BOOKDB.JCL
//********************************************************
//* Build the VSAM KSDS file that is used as the database.
//********************************************************
//* STEP ONE: Create the VSAM cluster.
//********************************************************
//VSAMSTEP EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE -
KC02250.BOOKDB.DATABASE -
CLUSTER -
PURGE -
ERASE
DEFINE CLUSTER -
(NAME('KC02250.BOOKDB.DATABASE') -
TRK(4 4) -
RECSZ(80 80) -
INDEXED -
NOREUSE -
KEYS(10 0) -
OWNER(KC02250) )
//*
//********************************************************
//* STEP TWO: Execute a REXX exec to build a sequential
//* data file from a CSV (comma-separated values) input.
//********************************************************
//REXXSTEP EXEC PGM=IRXJCL,PARM='GENDATA'
//* SYSTSIN DD DSN=KC02250.BOOKDB.DATA,DISP=SHR
//* SYSTSPRT DD DSN=&&REXXOUT,DISP=(NEW,PASS),
//* SPACE=(CYL,(2,1))
//INDATA DD DSN=KC02250.BOOKDB.DATA,DISP=SHR
//OUTDATA DD DSN=&&REXXOUT,DISP=(NEW,PASS),
// SPACE=(CYL,(2,1))
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSEXEC DD DSN=KC02250.BOOKDB.EXECS,DISP=SHR
//********************************************************
//* STEP THREE: Sort the data file by ISBN.
//********************************************************
//SORTSTEP EXEC PGM=SORT
//SYSIN DD *
SORT FIELDS=(1,10,CH,A)
/*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=&&REXXOUT,DISP=(OLD,DELETE)
//SORTOUT DD DSN=&&SORTDATA,DISP=(NEW,PASS),
// SPACE=(CYL,(2,1))
//*
//********************************************************
//* STEP FOUR: Compile, link and run a COBOL program
//* that reads from the sorted data into the VSAM cluster,
//* generating a report of the inventory in the process.
//*
//* See JCL notes for the definition of IGYWCLR proc
//********************************************************
//COBLSTEP EXEC IGYWCLG,REGION=250M,
// PARM.COBOL='TEST,RENT,APOST,OBJECT,NODYNAM,LIB'
//COBOL.SYSIN DD DISP=SHR,DSN=KC02250.BOOKDB.COBOL(BUILDDBA)
// DD DISP=SHR,DSN=KC02250.BOOKDB.COBOL(VSAMREC)
// DD DISP=SHR,DSN=KC02250.BOOKDB.COBOL(BUILDDBB)
//* STEPLIB DD DSNAME=&LIBPRFX..SCEERUN,DISP=SHR
//BOOKS DD DSN=&&SORTDATA,DISP=(OLD,DELETE)
//BOOKDB DD DSN=KC02250.BOOKDB.DATABASE,DISP=SHR
//SYSPRINT DD SYSOUT=*
//* COBOL.SYSLIB DD DSN=CEE.SCEESAMP,DISP=SHR
//* CEEDUMP DD SYSOUT=*
//* SYSUDUMP DD SYSOUT=*
//********************************************************
//* STEP FIVE: Run the Java server program that allows
//* RMI clients to query the database. This also allows
//* the operator to interact with the server at the
//* SDSF console, turning on and off logging, and
//* eventually terminating the server.
//*
//* Substitute name the server binds to in registry and
//* and port on the z/OS server that registry binds to.
//********************************************************
//* TESTRC IF (RC > 0) THEN
//JAVASTEP EXEC PROC=EXJZOSVM,
// VERSION='14',
// JAVACLS='edu.stevens.cs.cs526.server.ServerMain',
// ARGS='XXXXXXX ddddddd'
//BOOKDB DD DSN=KC02250.BOOKDB.DATABASE,DISP=SHR
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDENV DD *
export JAVA_HOME=/usr/lpp/java/J1.4
JZOSAW_HOME=/u/kc02250/jzos
export PATH=/bin:"${JAVA_HOME}"/bin:
LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic
LIBPATH="$LIBPATH":"${JZOSAW_HOME}"
export LIBPATH="$LIBPATH":
# Force the alphaWorks version of JZOS to run overriding the SDK
OPTS="-Djava.ext.dirs=${JZOSAW_HOME}:${JAVA_HOME}/lib/ext"
export JZOS_JVM_OPTIONS="$OPTS"
# Add the JZOS alphaWorks jars to the classpath
for i in "${JZOSAW_HOME}"/*.jar; do
CLASSPATH="$CLASSPATH":"$i"
done
# Add classpath for server code.
CLASSPATH="$CLASSPATH":"/u/kc02250/bookdb/server.jar"
export CLASSPATH="$CLASSPATH":
#
# Set JZOS specific options
# Use this variable to specify encoding for DD STDOUT and STDERR
#export JZOS_OUTPUT_ENCODING=Cp1047
# Use this variable to prevent JZOS from handling MVS operator commands
#export JZOS_ENABLE_MVS_COMMANDS=false
# Use this variable to supply additional arguments to main
#
#export JZOS_MAIN_ARGS=""
# Configure JVM options
IJO="-Xms16m -Xmx128m"
//
//* ENDIF
//********************************************************
//* STEP SIX: Dump the VSAM file to the printer
//********************************************************
//DUMPSTEP EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
PRINT -
INDATASET(KC02250.BOOKDB.DATABASE) CHAR
//*