Invoking DFHCSDUP as a batch program

The example job shows you the job control statements that you can use to invoke DFHCSDUP as a batch program.

About this task

Figure 1. Sample job to run DFHCSDUP
//CSDJOB  JOB  accounting info,name,MSGLEVEL=1
//STEP1   EXEC PGM=DFHCSDUP,REGION=0M,                                 
//             PARM='CSD(READWRITE),PAGESIZE(60),NOCOMPAT'
//STEPLIB DD   DSN=CICSTS53.CICS.SDFHLOAD,DISP=SHR
//DFHCSD   DD  DISP=SHR,DSN=CICSTS53.CICS.DFHCSD
//SECNDCSD DD  UNIT=SYSDA,DISP=SHR,DSN=CICSTS53.CICS.SECNDCSD          
//indd     DD  UNIT=SYSDA,DISP=SHR,DSN=extract.input.dataset           
//outdd    DD  UNIT=SYSDA,DISP=SHR,DSN=extract.output.dataset           
//* or                                                                 
//outdd    DD  SYSOUT=A                                                 
//SYSPRINT DD  SYSOUT=A
//SYSIN    DD  *
⋮
     DFHCSDUP commands                                                 
/*
//

To use this job, you need to edit it as follows:

Procedure

  1. Change the EXEC statement to specify a suitable REGION size and a PARM parameter:

    Use the PARM parameter to specify any of the following options:

    UPPERCASE
    Specifies that you want all output from DFHCSDUP to be in uppercase. If you want all output to be in mixed case (the default), do not code this option.
    CSD({READWRITE|READONLY})
    Specifies whether you want read and write access or read-only access to the CSD from this batch job. The default value is READWRITE.
    PAGESIZE(nnnn)
    Specifies the number of lines per page on output listings. Values for nnnn are 4 - 9999. The default value is 60.
    NOCOMPAT or COMPAT
    Specifies whether the DFHCSDUP utility program is to run in compatibility mode (that is, whether it can update definitions that are obsolete in CICS® Transaction Server for z/OS®, Version 5 Release 3). The default is NOCOMPAT, which means that you cannot update obsolete attributes. For more information about this option, see Sharing the CSD between CICS Transaction Server for z/OS, Version 5 Release 3 and earlier releases.
  2. If you specify the FROMCSD parameter on an APPEND, COPY, or SERVICE command, add a SECNDCSD DD statement to specify the secondary CSD.
    The ddname for this DD statement is the name that you specify on the FROMCSD parameter. The secondary CSD must be a different data set from the primary; you must not define primary and secondary DD statements that reference the same data set.
  3. If you specify the EXTRACT command, you might need to take one or both of the following actions:
    1. Concatenate with STEPLIB the libraries that contain your USERPROGRAM programs.
    2. Include a DD statement for any input data set that is defined in your user program. This statement is represented in the figure with the ddname indd.
      For example, the supplied user program, DFH$CRFA, needs a DD statement with a ddname of CRFINPT.

      The input file that is specified by CRFINPT is needed by the user programs DFH$CRFx (where x=A for Assembler or x=P for PL/I) and DFH0CRFC (for COBOL) to supply the list of resource types or attributes for which you want a cross-reference listing. You can specify (in uppercase) any resource type that is known to CEDA, one resource type per line (starting in column 1). For example, your CRFINPT file might contain the following resource types (one per line) to be cross referenced:

      PROGRAM
      TRANSACTION
      TYPETERM
      XTPNAME
      DSNAME
      For programming information about the use of the CRFINPT file by the programs DFH$CRFx or DFH0CRFC (for COBOL), see The sample EXTRACT programs .

  4. If you specify the EXTRACT command, include the DD statements for any data sets that receive output from your extract program. The figure shows two options, to write the data set to disk or to SYSOUT.
    The ddname is whatever ddname you define in the user program. The figure uses the ddname outdd. The sample programs that are supplied with CICS need DD statements for the following ddnames:
    Table 1. DD statements for the supplied sample programs
    program name ddname example DD statement
    DFH$CRFx or
    DFH0CRFC (COBOL)
    CRFOUT //CRFOUT DD SYSOUT=A
    DFH$FORx or
    DFH0FORC (COBOL)
    FOROUT //FOROUT DD SYSOUT=output.dataset
    DFH0CBDC
    CBDOUT
    SYSABOUT
    //CBDOUT DD SYSOUT=A
    //SYSABOUT DD SYSOUT=A
  5. The output data sets in these examples are opened and closed for each EXTRACT command that is specified in SYSIN.
    • If you are writing the output to a sequential disk data set, specify DISP=MOD to ensure that data is not overwritten by successive EXTRACT commands.
    • Alternatively, provided you do not specify SYSOUT on the DD statement, you can change the OPEN statement in the program (for example, in the COBOL versions, to OPEN EXTEND).
    For programming information about the user programs that are supplied with CICS, see The sample EXTRACT programs.
  6. In the SYSIN data set, you can code commands and keywords by using abbreviations and mixed case, as given in the syntax box in the description of each command. If you prefer, you can use a data set or a partitioned data set member for your commands, rather than coding them in the input stream.
    Keyword values can be longer than one line, if you use the continuation character (an asterisk) at the end of a line (in column 72). Subsequent lines start in column 1.
    For example, you can use this facility to specify XTPNAME values of up to 128 hexadecimal characters.
    If you enter an ambiguous command or keyword, the DFHCSDUP program issues a message to indicate the ambiguity.