Control statements for the DBD/PSB/ACB Reversal utility

The input for the DBD/PSB/ACB Reversal utility consists of control statements in the SYSIN data set. These control statements specify the functions to be performed and the runtime options.

The DBD/PSB/ACB Reversal utility supports two types of control statements:
Runtime option control statements
This type of statement specifies the runtime options. A runtime option control statement consists of a runtime option keyword and its associated options.
Function control statements
This type of statement specifies the function to be performed. A function control statement consists of a function keyword, a function keyword operand, and a function keyword option.

Control statement example

The following figure shows an example of the control statements for DBD/PSB/ACB Reversal.

In this example:
  • The first line specifies the SYSIN DD.
  • The second and third lines specify runtime option control statements.
    • ACB_GSAM=YES is applied to all subsequent function control statements except the statements that contain a SEGREF function keyword.
    • PGM_COBOL=YES is applied to all subsequent function control statements that contain a DECODE or LIST function control keyword.
    • ACB_REFERENCED=YES is applied to all subsequent function control statements that contain a DECODE, LIST, DDNAMES, or XREF function control keyword.
    • COMMENT=YES, COMPRESS=YES, PCB_LABEL=YES, and SENSEG_PROCOPT=YES are applied to all subsequent function control statements that contain a DECODE function keyword.
  • The fourth and subsequent lines specify function control statements.
Figure 1. Control statements for DBD/PSB/ACB Reversal (Part 1 of 2)
//SYSIN DD *
        OPTION ACB_GSAM=YES,PGM_COBOL=YES,ACB_REFERENCED=YES
        DECOPT COMMENT=YES,COMPRESS=YES,PCB_LABEL=YES,SENSEG_PROCOPT=YES
      DECODE DBD ALL
      DECODE DBD INCLUDE=member,member,...
      DECODE DBD EXCLUDE=member,member,...
      DECODE PSB ALL
      DECODE PSB INCLUDE=member,member,...
      DECODE PSB EXCLUDE=member,member,...
      DECODE ACB ALL
      DECODE ACB INCLUDE=member,member,...
      DECODE ACB EXCLUDE=member,member,...
      DECODE ACBPSB ALL
      DECODE ACBPSB INCLUDE=member,member,...
      DECODE ACBPSB EXCLUDE=member,member,...
      DECODE ACBDBD ALL
      DECODE ACBDBD INCLUDE=member,member,...
      DECODE ACBDBD EXCLUDE=member,member,...
      LIST DBD ALL
      LIST DBD INCLUDE=member,member,...
      LIST DBD EXCLUDE=member,member,...
      LIST PSB ALL
      LIST PSB INCLUDE=member,member,...
      LIST PSB EXCLUDE=member,member,...
      LIST ACB ALL
      LIST ACB INCLUDE=member,member,...
      LIST ACB EXCLUDE=member,member,...
      DDNAMES DBD ALL
      DDNAMES DBD INCLUDE=member,member,...
      DDNAMES DBD EXCLUDE=member,member,...
      DDNAMES ACB ALL
      DDNAMES ACB INCLUDE=member,member,...
      DDNAMES ACB EXCLUDE=member,member,...
      PROCOPT PSB ALL
      PROCOPT PSB INCLUDE=member,member,...
      PROCOPT PSB EXCLUDE=member,member,...
      PROCOPT ACB ALL
      PROCOPT ACB INCLUDE=member,member,...
      PROCOPT ACB EXCLUDE=member,member,...
      XREF DBD ALL
      XREF DBD INCLUDE=member,member,...
      XREF DBD EXCLUDE=member,member,...
      XREF PSB ALL
      XREF PSB INCLUDE=member,member,...
      XREF PSB EXCLUDE=member,member,...
      XREF ACB ALL
      XREF ACB INCLUDE=member,member,...
      XREF ACB EXCLUDE=member,member,...
      XREF PSB ALL DBDNAME=member
      XREF ACB ALL DBDNAME=member
Figure 2. Control statements for DBD/PSB/ACB Reversal (Part 2 of 2)
      SEGREF DBD ALL SEGMENT=segname
      SEGREF DBD INCLUDE=member,member,... SEGMENT=segname
      SEGREF DBD EXCLUDE=member,member,... SEGMENT=segname
      SEGREF PSB ALL SEGMENT=segname
      SEGREF PSB INCLUDE=member,member,... SEGMENT=segname
      SEGREF PSB EXCLUDE=member,member,... SEGMENT=segname
      POPTREF PSB ALL SEARCHDBD=member SEARCHOPT=procopt
      POPTREF PSB INCLUDE=member,member,... SEARCHDBD=member SEARCHOPT=procopt
      POPTREF PSB EXCLUDE=member,member,... SEARCHDBD=member SEARCHOPT=procopt
      POPTREF ACB ALL SEARCHDBD=member SEARCHOPT=procopt
      POPTREF ACB INCLUDE=member,member,... SEARCHDBD=member SEARCHOPT=procopt
      POPTREF ACB EXCLUDE=member,member,... SEARCHDBD=member SEARCHOPT=procopt
      UNREF ACB
      LISTLIB DBD
      LISTLIB PSB
/*

Syntax rules

The control statements must adhere to the following syntax rules:

  • Control statements can start anywhere after the second column.
  • A statement with an asterisk (*) in column 1 is treated as a comment.
  • The comment line, which has an asterisk (*) in column 1, is allowable between continuous lines.
  • Member names in a statement must be separated by commas and must end with a blank. If a comma is used instead of a blank, the processing is continued to the next line.

Runtime option control statements

Runtime option control statements control the behavior of the subsequent function control statements. When no function control statements follow a runtime option control statement, the runtime option control statement is not used.

The following keywords are available (the abbreviations that can be used are shown in parentheses):

OPTION
This keyword affects all subsequent function control statements. This keyword is optional. If specified, it must be placed before any other control statements (blank and comment lines can precede the OPTION keyword), and must be followed by the following keyword:
ACB_GSAM=
Specifies whether to obtain and use GSAM information when decoding or reporting ACBs.
YES
DBD/PSB/ACB Reversal obtains GSAM information from the DBD and PSB libraries when processing ACBs, and uses the information to decode or to report the ACBs. ACB_GSAM=YES affects the following function control statements:
  • DECODE ACB
  • DECODE ACBPSB
  • LIST ACB
  • DDNAMES ACB
  • PROCOPT ACB
  • XREF ACB
  • POPTREF ACB
To specify ACB_GSAM=YES, the following conditions must be met:
  • ACBLIB DD, DBDLIB DD, and PSBLIB DD must be specified in the JCL.
  • The DBD or the PSB must be consistent with the ACB.
NO
DBD/PSB/ACB Reversal does not use GSAM information to process ACBs. ACB_GSAM=NO is the default value.
ACB_REFERENCED=
Specifies whether to process all DBD-type ACBs including those that are not referenced by any PSB-type ACBs.

When you specify ACB ALL, the utility processes all PSB-type ACBs and all DBD-type ACBs that the PSB-type ACBs refer to. If you also specify ACB_REFERENCED=NO, the utility expands the scope and additionally processes DBD-type ACBs that are not referred to by PSB-type ACBs.

YES
Decodes or reports PSB-type ACBs and DBD-type ACBs that the PSB-type ACBs refer to. ACB_REFERENCED=YES is the default value.
NO
Decodes or reports all PSB-type ACBs and DBD-type ACBs, including DBD-type ACBs that are not referred to by PSB-type ACBs.
ACB_REFERENCED affects the following function control statements:
  • DECODE ACB ALL
  • LIST ACB ALL
  • DDNAMES ACB ALL
  • XREF ACB ALL
PGM_COBOL=
Specifies whether to print LANG=COBOL or LANG=ASSEM in the decoded IMS™ PSBGEN utility control statements.

If a PSB is generated with LANG=COBOL or LANG=ASSEM, the DBD/PSB/ACB Reversal utility cannot identify the original LANG value because the PSB does not contain the original LANG value. Use the PGM_COBOL keyword to select the LANG value that meets your needs.

YES
Prints LANG=COBOL in the IMS PSBGEN utility control statements. PGM_COBOL=YES affects the following function control statements:
  • DECODE PSB
  • DECODE ACB
  • DECODE ACBPSB
  • LIST PSB
  • LIST ACB

In the PSB XREF BY TYPE - PSB Name Order report, COBOL is printed in the PSB LANGUAGE field.

NO
Prints LANG=ASSEM in the IMS PSBGEN utility control statements. PGM_COBOL=NO is the default value.

In the PSB XREF BY TYPE - PSB Name Order report, ASSEMBLE/COBOL is printed in the PSB LANGUAGE field.

DECOPT (DO)
This keyword affects all subsequent DECODE statements. The following options can be specified:
CHECK_LEN=
Identifies the DEDB DBDs and PSBs that were not generated by the IMS DBDGEN or IMS PSBGEN utility.

If a DBD or PSB was generated by a non-IMS macro, the length of the control block does not conform to the standard IMS control block length. The CHECK_LEN option checks the control block length to identify such DEDB DBDs and PSBs. The CHECK_LEN option is effective only for DBD and PSB members, and is not effective for ACB members.

YES
Checks the control block length of each member and identifies the DEDB DBDs and PSBs that were not generated by the IMS DBDGEN or IMS PSBGEN utility.

If the DBD/PSB/ACB Reversal utility finds members that were generated by a non-IMS macro, the utility decodes only the portions of the DBD or PSB that conform to the standard DBD or PSB format and sets the return code to 4. The utility also prints FABN0084W messages in the SYSOUT Messages report to notify you about the identified members. If you also specify DECOPT COMMENT=YES, the FABN0084W messages are also printed on the comment line in the decoded DBD or PSB source code.

NO
Does not check the control block length of each member. CHECK_LEN=NO is the default value.
COMMENT= (C=)
Specifies whether this program prints the comment lines (the heading part of the DATASET, SEGM, or PCB statement) from the decoded DBD or PSB sources.
YES
The comment lines are printed. COMMENT=YES is the default value.
NO
The comment lines are not printed.
COMPRESS= (COMP=)
Specifies whether the decoded DBD or PSB sources are printed in compressed format.
Note: In the DBD/PSB/ACB Reversal utility of Library Management Utilities and other prior products, non-compressed format was used.
YES
The decoded sources are printed in compressed format. COMPRESS=YES is the default value.
NO
The decoded sources are printed in noncompressed format.
PCB_LABEL=
Specifies whether to print the PCB name in the PCB label or on the PCBNAME control statement.
YES
Prints the PCB name in the PCB label.
NO
Prints the PCB name on the PCBNAME control statement. PCB_LABEL=NO is the default value.
SENSEG_PROCOPT=
Specifies to print the SENSEG PROCOPT value even when the value is the same as the PCB PROCOPT value.
YES
Prints the value.
NO
Does not print the value if the SENSEG PROCOPT value is the same as the PCB PROCOPT value. SENSEG_PROCOPT=NO is the default value.
VERSION_GENDATE=
Specifies to write the DBDGEN date and time on the VERSION control statement in the decoded DBD source.

During DBDGEN, the user can provide a character string on the VERSION control statement. If a character string is not provided, the DBDGEN utility automatically adds a 13-character time stamp (GENDATE time stamp), which represents the date and time when the DBDGEN completed. If you specify the VERSION_GENDATE=YES option on the DBD/PSB/ACB Reversal utility SYSIN control statement, the utility writes the GENDATE time stamp on the VERSION control statement in the decoded DBD source. This option is effective for DBD library members, but is not effective for ACB library members.

YES
Prints the GENDATE time stamp on the VERSION control statement in the decoded DBD source. The format is MM/DD/YYHH.MM.
NO
Does not print the GENDATE time stamp on the VERSION control statement, but prints it as a comment beside the VERSION control statement. VERSION_GENDATE=NO is the default value.

If you specify VERSION_GENDATE=YES for the DBD/PSB/ACB Reversal utility and use the generated DBD source as the input for the DBDGEN utility, the DBDGEN utility treats the GENDATE time stamp not as a time stamp but as a text. Consequently, the DBDGEN utility does not update the GENDATE time stamp with the latest time stamp. If you want the DBDs to always hold the latest DBDGEN time stamp, do not specify VERSION_GENDATE=YES.

In the following example, the options specified on the DECOPT statement affect two DECODE statements:
DECOPT COMMENT=NO,COMPRESS=NO
DECODE DBD ALL
DECODE PSB ALL

Function control statements

Function control statements specify the functions to be performed. A function control statement consists of a function keyword, a function keyword operand, and a function keyword option. The following function keywords can be used (the abbreviations that can be used are shown in parentheses):

DECODE (D)
This keyword specifies that this program re-creates the control statements of the IMS DBDGEN/PSBGEN utility in the SYSPUNCH data set or the DBDSRC/PSBSRC data set, or both.
LIST (L)
This keyword specifies that this program generates the following reports in the SYSPRINT data set:
  • DBD XREF by Access reports
  • PSB XREF by Type reports
  • ACB(DBD) XREF by Access reports
  • ACB(PSB) XREF by Type reports
DDNAMES (DDN)
This keyword specifies that this program generates the following reports, which contain information about cross-reference between DBDs and DDNAMES, in the SYSPRINT data set:
  • DBD XREF by DDNAME report
  • ACB(DBD) XREF by DDNAME report
PROCOPT (P)
This keyword specifies that this program generates the following reports, which contain information about processing options (PROCOPT) defined in PSBs, in the SYSPRINT data set:
  • PCB PROCOPT report
  • PCB/ACB(PSB) PROCOPT report
XREF (X)
This keyword specifies that this program generates the following reports, which contain information about cross-reference between DBDs or between DBDs and PSBs, in the SYSPRINT data set:
  • DBD to DBD XREF report
  • PSB to DBD XREF report
  • ACB(DBD) to ACB(DBD) XREF report
  • ACB(PSB) to ACB(DBD) XREF report
Note: The DBDNAME option can be specified only for XREF PSB and XREF ACB. For details, see Function keyword operands.
SEGREF (S)
This keyword with the SEGMENT option specifies that this program is to produce either of the following in the SYSPRINT data set.
  • DBD Segment Reference report
  • PSB Segment Reference report
POPTREF
This keyword specifies the criteria for selecting PSBs. Information about the PSBs that match the criteria is written to the PSB PROCOPT Reference report or the ACB PROCOPT Reference report in the SYSPRINT data set.

Criteria are defined by the SEARCHDBD and SEARCHOPT options. The POPTREF keyword must be specified with those two options. The SEARCHDBD option defines the DBD name criteria that are used to identify the referenced DBDs. The SEARCHOPT option defines the processing option (PROCOPT) criteria that are used to identify PSBs. Only the PSBs that match the PROCOPT criteria and that refer to the DBDs that are identified by the DBD name criteria are written to the report.

UNREF
This keyword specifies to generate the Unreferenced ACB(DBD) report in the SYSPRINT data set. The only supported operand for this keyword is ACB. No function keyword options are supported for this keyword.
LISTLIB
This keyword specifies to generate the DBD or PSB library member list report in the SYSPRINT data set. The report includes the following information about the members in the data sets that are concatenated to DBDLIB DD or PSBLIB DD:
  • IMS version that generated the DBD or PSB member
  • Generation date and time
  • Size of the member record

Function keyword operands

The following operands can be specified on the function control statements (the abbreviation that can be used is shown in parentheses):

DBD (D)
This operand specifies that the operation is to be performed on one or more DBDs.
PSB (P)
This operand specifies that the operation is to be performed on one or more PSBs.
ACB (A)
This operand specifies that the operation is to be performed on one or more PSB-type ACBs and on the DBD-type ACBs that those PSB-type ACBs refer to.
ACBPSB (AP)
This operand specifies that the operation is to be performed on one or more PSB-type ACBs. This operand is valid only for the DECODE keyword.
ACBDBD (AD)
This operand specifies that the operation is to be performed on one or more DBD-type ACBs. This operand is valid only for the DECODE keyword.

Function keyword options

The following options can be specified on the function control statements (the abbreviation that can be used is shown in parentheses):

ALL (A)
This option specifies that the operation is to be performed on all DBD, PSB, or ACB members of the library depending upon the operand specified in the control record. Specifying ALL (A) causes the DBD/PSB/ACB Reversal to process all the members in the data sets that are concatenated to DBDLIB DD, PSBLIB DD, or ACBLIB DD.

If two or more data sets in the concatenation contain a member with the same name, DBD/PSB/ACB Reversal processes only the first one in the concatenation.

If the ACB operand is specified, the ACB reversal function processes all PSB-type ACBs and the DBD-type ACBs that those PSB-type ACBs refer to.

If the ACBPSB operand is specified, the ACB reversal function processes all PSB-type ACBs.

If the ACBDBD operand is specified, the ACB reversal function processes all DBD-type ACBs.

INCLUDE= (I=)
This option specifies that the operation is to be performed on the DBD, PSB, or ACB members specified after the equal sign (depending on the operand specified in the control record).
Note: You can specify a wildcard in any position of a character string. The asterisk (*) and the percent sign (%) are supported as wildcard characters. An asterisk represents 0 - 8 characters, and the percent sign (%) represents a single character. If two or more asterisks are specified sequentially, only the first asterisk is recognized.

When the ACB operand is specified, the specified ACBs must be of PSB type. The ACB reversal function processes the specified PSB-type ACBs and the DBD-type ACB members that those PSB-type ACBs refer to. If the specified ACB is not PSB type, an error message is issued and this member is skipped.

When the ACBPSB operand is specified, the specified ACBs must be of PSB type. The ACB reversal function processes the specified PSB-type ACBs. If the specified ACB is not of PSB type, an error message is issued and this member is skipped.

When the ACBDBD operand is specified, the specified ACBs must be of DBD type. The ACB reversal function processes the specified DBD-type ACBs. If the specified ACB is not of DBD type, an error message is issued and this member is skipped.

EXCLUDE= (E=)
This option specifies that the operation is to be performed on all DBD, PSB, or ACB members other than those specified after the equal sign (depending on the operand specified in the control record). If concatenated data sets are specified for the DBDLIB DD, PSBLIB DD, or ACBLIB DD statement, the DBD/PSB/ACB Reversal processes only the first data set. You can use wildcards for multiple character replacement. The method of using them is the same as for the INCLUDE (I) option.

If the ACB operand is specified, the specified ACBs must be of PSB type. The ACB reversal function processes the PSB-type ACBs that are not specified and the DBD-type ACBs that those PSB-type ACBs refer to.

If the ACBPSB operand is specified, the specified ACBs must be of PSB type. The ACB reversal function processes the PSB-type ACBs that are not specified.

If the ACBDBD operand is specified, the specified ACBs must be of DBD type. The ACB reversal function processes the DBD-type ACBs that are not specified.

SEGMENT= (S=)
This option specifies that the operation is to be performed on the segments specified after the equal sign. This option is valid only with the keyword SEGREF; if it is specified without the keyword SEGREF, it is ignored. You can specify only one segment name for the SEGMENT= option. However, a wildcard character can be specified as the segment name. Its use is the same as that of the INCLUDE (I) option.
DBDNAME= (D=)
This option is valid only in the XREF PSB control statement or the XREF ACB control statement. The PSB to DBD XREF report or the ACB(PSB) to ACB(DBD) XREF report has two parts: the reference report and the referenced report. If the DBDNAME= option is specified, only the referenced report part is printed for the specified DBDs. The DBD name can be specified with its exact name, or with the use of wildcards. If this option is accepted, message FABN0063I is issued.
PCBNAMEX= (P=)
This option specifies the prefix of the PCB names within 1 - 4 characters. This option is valid only with the keyword DECODE and operands PSB, ACB, or ACBPSB. The following is an example of the control card:
   DECODE PSB INCLUDE=psbname PCBNAMEX=prfx
If this option is specified and there is one or more PCBs that are not named in the PSB, DBD/PSB/ACB Reversal assigns the PCB names on the PCBNAME parameters of PCB statements as PCBNAME=prfxnnnn, where prfx is the specified prefix and nnnn is the PCB number.
SEARCHDBD=
This option specifies the DBD name criteria to use to filter the referenced DBDs. This option is a required option for the POPTREF keyword. If this option is specified without the POPTREF keyword, it is ignored.

You can specify the name of a DBD member or use the asterisk (*) wildcard. An asterisk represents 0 - 8 characters. If two or more asterisks are specified sequentially, only the first asterisk is recognized.

This option can be specified on a new line.

SEARCHOPT=
This option specifies the processing option (PROCOPT) criteria, in 1 - 4 characters, to use to filter the PSBs. This option is a required option for the POPTREF keyword. The option must follow the SEARCHDBD option. If this option is specified without the POPTREF keyword, it is ignored.

You can specify the PROCOPT criteria by using the letters that correspond to the PROCOPT values and by using an asterisk (*) or percent sign (%) as a wildcard character. An asterisk represents 0 - 8 characters, and the percent sign represents a single character. If two or more asterisks are specified sequentially, only the first asterisk is recognized. An asterisk and a percent sign cannot be specified together.

You can specify the letters in any order because the order of the letters in the SEARCHOPT option is not considered. However, if you use both letters and wildcard characters, the letters must precede the wildcard characters.

This option can be specified on a new line.

The following table contains examples for specifying the PROCOPT criteria. In these examples, the following PROCOPT values are defined in the PSBs: G, GO, GP, GOP, GON, GHT, A, AP, and PA.

PROCOPT criteria Matched PROCOPT values
SEARCHOPT=G G
SEARCHOPT=GO GO
SEARCHOPT=AP AP, PA
SEARCHOPT=* Any PROCOPT value
SEARCHOPT=G* G, GO, GP, GOP, GON, GHT
SEARCHOPT=P* GP, GOP, AP, PA
SEARCHOPT=% G, A
SEARCHOPT=G% GO, GP
SEARCHOPT=P% GP, PA, AP
SEARCHOPT=GO% GOP, GON
SEARCHOPT=G%% GOP, GON, GHT

Quick reference for control statements and DD statements

The following table lists the DBD/PSB/ACB Reversal functions, control statements, and DD statements.

Table 1. DBD/PSB/ACB Reversal functions, control statements, and DD statements
Function Control keyword Control operand Required and optional DD statements
(O: Optional R: Required)
SYS
PRINT
SYS
OUT
SYS
PUNCH
DBD
SRC
PSB
SRC
DBD
LIB
PSB
LIB
ACB
LIB
MAP
OUT
SYS
IN
OPT
PRT
DBD reversal DECODE DBD R O (see note 1) O (see note 1) R O (see note 4) R O
PSB reversal DECODE PSB R O (see note 2) O (see note 2) R O (see note 4) R O
ACB reversal DECODE ACB R O O (see note 3) O (see note 3) O (see note 5) O (see note 5) R O (see note 4) R O
ACB reversal (PSB-type only) DECODE ACBPSB R O (see note 2) O (see note 2) O (see note 5) R O (see note 4) R O
ACB reversal (DBD-type only) DECODE ACBDBD R O (see note 1) O (see note 1) R O (see note 4) R O
DBD summary LIST DBD R R R R O
PSB summary LIST PSB R R R R O
ACB summary LIST ACB R R O (see note 5) O (see note 5) R R O
PCB PROCOPT PROCOPT PSB R R R R O
PCB/ACB (PSB) PROCOPT PROCOPT ACB R R O (see note 5) R R O
DBD-DBD XREF XREF DBD R R R R O
PSB-DBD XREF XREF PSB R R R R O
ACB(DBD)- ACB(DBD) XREF XREF ACB R R O (see note 5) R R O
ACB(PSB)- ACB(DBD) XREF XREF ACB R R O (see note 5) R R O
DDname XREF DDNAMES DBD R R R R O
DDname XREF (ACB(DBD)) DDNAMES ACB R R O (see note 5) O (see note 5) R R O
DBD SEGMENT reference SEGREF DBD R R R O (see note 4) R
PSB SEGMENT reference SEGREF PSB R R R O (see note 4) R
PSB PROCOPT reference POPTREF PSB R R         R     R O
ACB(PSB) PROCOPT reference POPTREF ACB R R         O (see note 5) R   R O
UN-REFERENCED ACB(DBD) UNREF ACB R R           R   R  
DBD library member list LISTLIB DBD R R       R       R  
PSB library member list LISTLIB PSB R R         R     R  
Notes:
  1. When the DBD reversal function or the ACB reversal function (DBD-type only) is run, either the SYSPUNCH data set or the DBDSRC data set must be specified.
  2. When the PSB reversal function or the ACB reversal function (PSB-type only) is run, either the SYSPUNCH data set or the PSBSRC data set must be specified.
  3. When the ACB reversal function is run, either the SYSPUNCH data set or the DBDSRC and PSBSRC data sets (both) must be specified.
  4. When the DBD/PSB/ACB reversal function or the DBD/PSB Segment Reference report function is run, the mapper input generate function is also executed, and input control statements are written to the MAPOUT DD.
  5. When the ACB reversal or the report function is run with OPTION ACB_GSAM=YES, the DD statement is required.