Using the BATCH DECODE command


The DECODE command disassembles DBD or PSB objects from any of the following sources:

  • Load module DDs such as DBDLIB or PSBLIB
  • ACBLIB DD
  • IMS Catalog
  • IMS Directory

The command produces disassembled statements in either the DDL or DBDGEN/PSBGEN syntax.

The DECODE command has the following format:

DECODE DBD(XXX) SOURCE(IMS) DDL(Y) RELATED(Y) IMPORT(N)

or

DECODE PSB(XXX) SOURCE(IMS) DDL(Y)   

Keywords for the BATCH DECODE command

Keyword

Possible Value or Values

Description

DBD

<DBDname>

The DBD object to disassemble. The value is a name or a mask. Masks can have a wildcard character * to match any number of characters.

You can use either the DBD or PSB keyword. One of these is a mandatory keyword.

PSB

<PSBname>

The PSB object to disassemble. The value is a name or a mask. Masks can have a wildcard character * to match any number of characters.

You can use either the DBD or PSB keyword. One of these is a mandatory keyword.

SOURCE

You can use one of the following values:

  • SOURCE(IMS) - Read DBD and PSB load modules from the IMS DD. 
  • SOURCE(CATALOG) - Read definitions from the IMS catalog.
  • SOURCE(ACBLIB) - Read the ACBLIB DD for the object definitions in ACB format.
  • SOURCE(ADIR) - Read the ACTIVE directory in a managed-ACB environment.
  • SOURCE(SDIR) - Read the STAGING directory in a managed-ACB environment.

Default is SOURCE(IMS).

This is the source from which to read the object definitions.

This is an optional keyword.

DDL

  • Y - Generate DDL statements
  • N - Generate GEN statements
  • B - Generate both DDL and GEN statements

Default is DDL(N).

This keyword describes whether to generate DDL, GEN statements, or both.  Default is DDL(N).

This is an optional keyword.

RELATED

  • Y - Include the logically related databases in the disassembly
  • N - Do not include the logically related databases in the disassembly

Default is RELATED(N).

This keyword describes whether to include logically related databases in the disassembly. 

This is an optional keyword.

IMPORT

  • Y - Perform an import of COBOL or PL/I copybooks to generate FIELD statements in the DBD, reflecting layouts from an application program
  • N - Do not perform an import of COBOL or PL/I copybooks to generate FIELD statements in the DBD

Default is IMPORT(N).

This keyword describes whether to perform an import of COBOL or PL/I copybooks to generate FIELD statements in the DBD, reflecting layouts from an application program. 

This is an optional keyword.

ONEXIST

  • IGNORE - If a copybook field name already exists in the DBD, this value specifies that the incoming copybook field is to be ignored. 
  • UPDATE - If a copybook field name already exists in the DBD, UPDATE will overwrite the field in the DBD with the incoming copybook definition if the attributes, such as length and position, are different in the existing field.

Default is ONEXIST(IGNORE).

This keyword only applies to importing copybooks and defines what action to take if a copybook field name already exists in the DBD. 

This is an optional keyword.

Running the DECODE command

Specify the following PARM on the EXEC statement to run the DECODE command:

EXEC PGM=DLIGENTR,PARM='ULU,DBI,,W'

This indicates that the region type is a IMS Utility Region, and the product ID is DBI for "Database Integrity" functions.  The fourth entry W indicates to use read-only processing for any DBRC functions that may be required. DBRC is only used when accessing metadata from IMS managed ACBs or from the IMS Catalog.

Notes

  • By default, output of this command is produced to the DBDOUT or PSBOUT DD, which it dynamically allocates to SYSOUT if omitted.
  • If SRCLIB DD is present, it is expected to be a source code PDS or PDSE where decoded members will be produced.                                                         
  • RECON DDs are only required for the SOURCE(CATALOG) keyword in order to dynamically allocate and read the catalog database.
  • Multiple DECODE commands are valid in the same job step, but must refer to the same SOURCE, which may be omitted on subsequent commands once it has been specified.
Important

The import of copybooks using the IMPORT keyword in the DECODE command requires a BMC AMI Change Manager for IMS license. For information on importing copybook definitions, see the BMC AMI Change Manager for IMS space.




 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*