Recovering non-SMS-managed data sets
When an Sx37 abend occurs in a non-SMS-managed data set, you typically solve the problem by copying the data set and allocating more space for the copy.
You can copy the data set with the IEBGENER utility or another utility that reads and writes logical records. Do not do this for blocked GSAM BSAM DASD data sets if you plan to restart by using the copy. You must copy the physical records, not only the logical records. You can use the IEBGENER utility for this task, but you must specify different DCB parameters. A blocked data set has a record format of FB or VB.
To recover from an Sx37 abend on a blocked non-SMS-managed GSAM data set:
Procedure
- Copy the file to a larger data set by using the IEBGENER utility.
- Specify RECFM=U for the record format for both the input and output data sets. This parameter copies the physical records as they exist. No reblocking is done. The copy must be to a like device type with the same track size. If the data set resides on multiple volumes, only the last volumes of data can be copied. GSAM keeps position by relative volume, by relative track within the volume, and by relative physical block within the track.
- Change the RECFM parameter for the copied file to its original value: FB or VB. You can change the parameter by using any program that opens the data set, including the IEBGENER utility. Execute the IEBGENER utility with a SYSUT1 DD statement with DISP=SHR and a SYSUT2 DD statement with DISP=MOD. The SYSUT2 DD statement must specify RECFM=xx, where xx is the original GSAM data set record format value. This value causes the IEBGENER utility to open the data set for output. The IEBGENER utility does not copy any records to the data set, but it rewrites the DSCB with the updated RECFM value at close time.
Example JCL for copying a multivolume GSAM data set after an Sx37 abend
The following JCL describes how to copy a multivolume GSAM data set after an Sx37 abend occurs, which includes the following basic steps:
- Uncatalog the data set that received the Sx37 abend.
- Allocate a temporary data set for the last volume portion of the data set by using the original LRECL and BLOCKSIZE values, RECFM=U, and the new space allocation.
- Copy the portion of the original data set from the last volume into the newly allocated temporary data set.
- Delete the portion of the original data set that resides on the last volume.
- Rename the temporary data set to the original name.
- Catalog the data set again, using the new volume label if the data set has moved, and reset the RECFM keyword to its original value. The IEBGENER utility is recommended for this step because the data set has to be opened for the RECM reset to take effect.
- Submit the XRST job.
//B37COPY JOB (IMS,xxxxxxx),'GSAM TEST',
// REGION=0M,
// CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1)
//*****************************************************************
//* 1. Uncatalog multivolume data set.
//* The data set needs to be uncataloged before we can copy the
//* the last volume of a multivolume data set
//*****************************************************************
//UNCALG EXEC PGM=IEFBR14
//DD1 DD DSN=DBDC.IMS.GSAMTEST,DISP=(OLD,UNCATLG),UNIT=SYSDA
/*
//*****************************************************************
//* 2. Allocate a new temporary data set with a bigger space allocation
//* for the last volume portion of a multivolume data set.
//*****************************************************************
//ALLOC EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=A
//DD2 DD DSN=DBDC.IMS.GSAMTEMP,DISP=(NEW,KEEP),UNIT=SYSDA,
// VOL=SER=SCR03,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=80),
// SPACE=(CYL,(5,1))
/*
//*****************************************************************
//* 3. Copy current (smaller) GSAM/BSAM data set into a
//* new (bigger) GSAM/BSAM data set by using DCB=(RECFM=U)
//*****************************************************************
//COPY1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSN=DBDC.IMS.GSAMTEST,DISP=(OLD),
// UNIT=SYSDA,VOL=SER=SCR03,DCB=(RECFM=U)
//SYSUT2 DD DSN=DBDC.IMS.GSAMTEMP,DISP=OLD,
// UNIT=SYSDA,VOL=SER=SCR03,DCB=(RECFM=U)
//SYSIN DD DUMMY
/*
//*****************************************************************
//* 4. Delete the smaller (original) of the data set that resides on
//* the last volume
//*****************************************************************
//BR14D EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=A
//GSAMDS1 DD UNIT=SYSDA,DISP=(OLD,DELETE),VOL=SER=SCR03,
// DSN=DBDC.IMS.GSAMTEST
/*
//*****************************************************************
//* 5. Rename the new (copied to) data set to the original (copied
//* from) data set name
//*****************************************************************
//RENAME1 EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=A
//GSAMDS1 DD UNIT=SYSDA,DISP=OLD,VOL=SER=SCR03
//SYSIN DD *
RENAME DSNAME=DBDC.IMS.GSAMTEMP,VOL=DISK=SCR03,
NEWNAME=DBDC.IMS.GSAMTEST
/*
//*****************************************************************
//* 6. Re-catalog the multivolume data set using the new volume for
//* last volume of the data set, and change the RECFM
//* from RECFM=U back to its original RECFM=.
//* IEBGENER utility is recommended because the data set has to
//* be opened for the RECFM reset to take effect
//*****************************************************************
//*
//CATALG EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSN=DBDC.IMS.GSAMTEST,DISP=SHR,UNIT=SYSDA,
// VOL=SER=(222222,333333,000000,SCR03)
//SYSUT2 DD DSN=DBDC.IMS.GSAMTEST,DISP=(MOD,CATLG),UNIT=SYSDA,
// VOL=SER=(222222,333333,000000,SCR03),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=80)
//SYSIN DD DUMMY
/*
//