Modifying a VSAM data set

IMS Database Repair Facility consists of a single job step. To run it, you must specify the appropriate DD statements.

About this task

The general flow for the batch IMS Database Repair Facility is shown in the following figure.

Figure 1. Data flow for batch IMS Database Repair Facility
This figure shows the data flow for batch IMS Database Repair Facility. Input to IMS Database Repair Facility consists of control statements and the database to be modified. Output consists of the modified database and a report.
Warning: Because IMS Database Repair Facility can change fields in any VSAM data set, ensure that you do not modify any data that would cause that data set to become unusable. An example of this would be the changing of a Key field in a KSDS record. Such a modification would cause that record to be unusable. In addition, because you can access KSDS index records and catalogs, some restrictions on the program's use are advised. Examples might be password protection of data sets or modification of the program to provide user security.

Procedure

You can run IMS Database Repair Facility as a batch job or from the console.

  1. Decide what data you want to Verify, Replace, or Dump.
  2. Code the EXEC and DD statements in the JCL.

    Use the following JCL example to code the JCL statements:

    //ZAP      JOB    (installation accounting information)
    //         EXEC   PGM=FABZVZAP
    //STEPLIB  DD     DSN=smphlq.SFABLMD0,DISP=SHR
    //SYSLIB   DD     DSN=DBT.VSAM,DISP=SHR
    //SYSPRINT DD     SYSOUT=A
    //SYSIN    DD     *   
         (control statements) 
    /* 

    Specify the following DD statements. All the DD statements are required.

    STEPLIB DD
    Defines the program library where IMS Database Repair Facility resides.

    smphlq in the example specifies the high-level qualifier of your IMS Database Repair Facility load module library (SFABLMD0).

    SYSLIB DD
    Defines the VSAM data set that is to be processed by IMS Database Repair Facility.
    SYSPRINT DD
    Defines the sequential output message data set. It contains 133-byte fixed-length records. BLKSIZE, if coded, must be a multiple of 133. However, it is recommended that you use:
    //SYSPRINT DD SYSOUT=A

    If logical errors occur, they are displayed in the SYSPRINT DD data set following the control statement that caused the error. (VSAM records are printed using the IDCAMS utility PRINT function.)

    After processing, the SYSPRINT data set contains a list of the processed control statements and all messages that are generated during control statement processing.

    For more information about the data that is generated in the SYSPRINT data set, see SYSPRINT data set.

    SYSIN DD
    Defines the input data set that contains your control statements. This data set usually resides in the input stream. However, it can be defined either as a sequential data set or as a member of a partitioned data set. It must contain 80-byte fixed-length records. BLKSIZE, if coded, must be a multiple of 80.
  3. Complete the following steps if you want to run IMS Database Repair Facility as a batch job.
    1. Code the control statements, and insert them in the JCL.

      If appropriate, consider the use of the CHECK control statement, which checks your control statements without updating the VSAM data set.

      For more information about the SYSIN control statements, see SYSIN data set.

    2. If appropriate, activate the password facility.

      If the password facility of VSAM is implemented on the system, it can be used to protect data set integrity. Even though the password facility protects password integrity, be careful in making changes, particularly in the key field in a KSDS data set.

    3. Run the job.
    4. Review the output messages to ensure that the job ran as planned.
  4. Complete the following steps if you want to run IMS Database Repair Facility from the console.
    1. Include only the CONSOLE control statement in the JCL.
    2. Run the job.
    3. If appropriate, activate the password facility by entering the PSW control statement from the system console.
    4. Enter other control statements from the system console.

      For more information about the SYSIN control statements, see SYSIN data set.

    5. Enter an END control statement.