Sample JCL to install COBOL application programs

You can use the job control statements that are shown in these examples to process COBOL application programs with a separate or integrated translator.

The procedure name depends on whether it is a CICS® application program or an EXCI batch program. For the names of the COBOL procedures supplied with CCIS, see Table 2.

Figure 1. Sample job control statements to call the DFHYITVL or DFHYXTVL procedures
//jobname JOB accounting info,name,MSGLEVEL=1
// EXEC PROC=
procname
1
//TRN.SYSIN DD *
2
CBL XOPTS(Translator options . . .)
3.
COBOL source statements.
/*
//LKED.SYSIN DD *
4
NAME anyname(R)
/*
//
where procname is the name of the procedure, and anyname is your load module name.
To use the procedure DFHZITCL or DFHZXTCL to invoke the integrated translator, you can use the job control statements that are shown in Figure 2 :
Figure 2. Sample job control statements to use the DFHZITCL or DFHZXTCL procedure
//jobname JOB accounting info,name,MSGLEVEL=1
// EXEC PROC=procname,PROGLIB=dsnname
1
//COBOL.SYSIN DD *.
. COBOL source statements.
/*
//LKED.SYSIN DD *
NAME anyname(R)
/*
//
where anyname is your load module name.
Notes:
  1. Translator options: specify the COBOL3 or COBOL2 translator option according to the version of the COBOL functionality that is required in the compile step.
  2. Compiler options:

    To compile a COBOL program, you need the compiler options RENT, NODYNAM, and LIB.

    If you use the translator option, CBLCARD (the default), the CICS translator automatically generates a CBL statement that contains these options. You can prevent the generation of a CBL or PROCESS card by specifying the translator option NOCBLCARD.

    The PARM statement of the COB step in the COBOL procedures supplied with CICS specifies values for the compiler options. For example:
    //COB EXEC PGM=IGYCRCTL,REGION=&REG,
    // PARM='NODYNAM,LIB,OBJECT,RENT,APOST,MAP,XREF'
    To compile a COBOL program with a compiler that has an integrated translator, you must use the CICS compiler option to indicate that you want the compiler to invoke the translator. The DFHZITCL procedure includes this compiler option:
    CBLPARM='NODYNAM,LIB,MAP,CICS(''COBOL3'')'
    Note: If you specify CICS translator options for the integrated translator in the PARM string, you need double apostrophes as shown in this example. If, however, you specify the options in your source program, you need single apostrophes (for example, you might have CBL CICS('COBOL3,SP') APOST as the CBL statement in your source program.
    The COBOL procedures supplied with CICS do not specify values for the SIZE and BUF options. The defaults are SIZE=MAX, and BUF=4K. SIZE defines the amount of virtual storage available to the compiler, and BUF defines the amount of dynamic storage to be allocated to each compiler buffer work file. You can change these options with a PARM.COB parameter in the EXEC statement that invokes the procedure. For example:
    EXEC PROC=
    procname
    ,PARM.COB='SIZE=512K,BUF=16K,.,.,.'
    Change compiler options by using any of the following methods:
    • Override the PARM statement that is defined on the COB step of the COBOL procedures.

      If you specify a PARM statement in the job that calls the procedure, it overrides all the options that are specified in the procedure JCL. Ensure that all the options you want are specified in the override, or in a CBL statement.

    • Specify a CBL statement at the start of the source statements in the job stream that is used to call the COBOL procedures.
    • Use the COBOL installation defaults macro, IGYCOPT. This macro is required if you do not use a CBL statement (that is, you specify the translator option NOCBLCARD).
    • Define a data set that contains the compiler options for your COBOL program, this data set must include the CICS compiler option and it subparameters.
      Code the SYSOPTF DD statement in one of the following ways:
      // SYSOPTF DD DSNAME=
      dsname
      ,UNIT=SYSDA,VOLUME=(
      subparms
      ),DISP=SHR
      In this code fragment, the compiler options are stored in the data set dsname .
      //COBOL EXEC PGM=IGYCRCTL,REGION=4M,PARM=(OPTFILE)
      //SYSOPTF DD *
      APOST
      LIB
      TRUNC(OPT)
      CICS('COBOL3,SP')
      NODYNAM
      RENT
      LIST
      MAP
      XREF
      OPT
      TEST(ALL,SEPARATE)
      //STEPLIB DD DSN=PP.COBOL390.V410.SIGYCOMP,DISP=SHR
      In this code fragment, the compiler options are placed directly in the code, after the OPTFILE parameter.

      For more information about the SYSOPTF statement, see the Enterprise COBOL for z/OS® product documentation: http://www.ibm.com/support/knowledgecenter/SS6SG3_6.1.0/welcome.html

    If you choose to use the NOCBLCARD option, also specify the COBOL compiler option ALOWCBL=NO to prevent an error message of IGYOS4006-E being issued. For more information about the ALOWCBL compiler option, see the relevant Installation and Customization manual for your version of COBOL.

  3. If you have no input for the translator, you can specify DD DUMMY instead of DD * . However, if you specify DD DUMMY , also code a suitable DCB operand. The translator does not supply all the data control block information for the SYSIN data set.
  4. If the stand-alone translator supplied with CICS TS is used, the translator options on the XOPTS statement override similar options in the COBOL procedures.

    For information about the translator options you can include on the XOPTS statement, see Defining translator options.

    When the integrated CICS translator is used, the COBOL compiler recognizes only the keyword CICS for defining translator options, not XOPTS.

  5. You can ignore weak external references unresolved by the link edit.

    The link-edit job step requires access to the libraries that contain the environment-specific modules for CICS , and the Language Environment® link-edit modules, as appropriate. Override or change the names of these libraries if the modules and library subroutines are installed in libraries with different names.

    If you are installing a program into either of the read-only DSAs, see Running application programs in the read-only DSAs for more details.

    If you are installing a program that is to be used from the LPA, add the RENT and REFR options to the LNKPARM parameter on the call to the COBOL procedures. For more information, see Running applications in the link pack area.



dfhp3c0080.html | Timestamp icon Last updated: Monday, 5 June 2017