TUSDUTIL -SD File Maintenance Utility

#### Search Results

Search

# TUSDUTIL -SD File Maintenance Utility

The batch utility TUSDUTIL provides the following facilities:

- Initialization of VSAM COMSD dataset;

- Backup all SD files with optional deletion of SD files that have not been opened in the last n days;

- List contents of backup dataset;

- Restore SD files (selective or all) from backup dataset to COMSD data set.

TUSDUTIL is described under the following headings:

- Initialization of the Com-plete SD Data Set

- Backup and Restoration of SD Files

## Initialization of the Com-plete SD Data Set

Sample execution job control for allocation and initialization of this data set is given in the distribution Com-plete source library in member JCLINSTE. For more information on structure and allocation of the SD dataset, refer to Com-plete Files and Associated User Files and to The Com-plete Task Structure.

The job control required to allocate and initialize a Com-plete SD data set is illustrated below:

> z/OS:

>       //TUSDINIT JOB   ... job-card information ...
>       //ALLOC    EXEC  PGM=IDCAMS
>       //SYSPRINT DD    SYSOUT=A
>       //SYSIN    DD    *
>        DELETE COM.SD
>        DEFINE CLUSTER -
>               ( NAME (COM.SD) -
>                 NUMBERED -
>                 SHAREOPTIONS (2) -
>                 SPEED REUSE ) -
>               DATA -
>               ( NAME (COM.SD.DATA) -
>                 CISZ (c) -
>                 RECORDSIZE (r r) -
>                 VOLUMES (vvvvvv) -
>                 CYLINDERS (ss))
>       /*
>       //INIT     EXEC  PGM=TUSDUTIL,
>       //           PARM='INIT,RECORDS=x,SDFILES=y,DMPSPAC=z'
>       //*
>       //STEPLIB  DD    DSN=COM.LOAD,DISP=SHR
>       //COMSD    DD    DSN=COM.SD,DISP=OLD
>       //SYSPRINT DD    SYSOUT=A

> z/VSE:

>       * $$ JOB JNM=TUSDINIT,DISP=D,CLASS=? ......  POWER JOB CARD INFORMATION
>        * $$ LST DISP=D,CLASS=A
>        // JOB   TUSDINIT                    ......  JOB CARD INFORMATION
>        // EXEC  IDCAMS,SIZE=AUTO
>              /*  DELETE (COM.SD) CLUSTER -      */
>              /*    CATALOG (catalog-file-name)  */
>              /*                                 */
>           DEFINE  CLUSTER -
>                   ( NAME (COM.SD) -
>                     NUMBERED -
>                     SHAREOPTIONS (2) -
>                     SPEED REUSE ) -
>                   DATA  -
>                   ( NAME (COM.SD.DATA) -
>                     CISZ (c) -
>                     RECORDSIZE (r r) -
>                     VOLUMES (vvvvvv) -
>                     CYLINDERS (ss)) -
>                   CATALOG (catalog-file-name)
>       /*
>       // LIBDEF    PHASE,SEARCH=SAGLIB.COMvrs,TEMP           <---- Note 1
>       // DLBL      COMSD,'COM.SD',,VSAM,CAT=COMCAT
>       // DLBL      COMCAT,'catalog-file-name',,VSAM
>       /*
>       // EXEC   TUSDUTIL,SIZE=AUTO,PARM='INIT,RECORDS=x,SDFILES=y,DMPSPAC=z'
>       /*
>       /&
>       * $$ EOJ

>   1. vrs in these cases relates to the Version, Release and SM level of the Com-plete being installed.

### Parameters:

CISZ (c) | VSAM control interval size. This value influences utilization rate of disk space and the size of buffers allocated by Com-plete for access to the data set.
RECORDSIZE (r r) | VSAM record size (must be specified twice). Minimum value is 512. This is the "blocksize", into which Com-plete will block or split the logical records of all SD files. It should be as high as possible, must be greater than half CI size and must not exceed CISZ-12.
RECORDS=x | Number of VSAM records that are to be initialized. This parameter is useful only if you want to allocate a data set of more than 1 extent.Default: Maximum number of records that can be written to the extent(s) currently allocated for the data set.
SDFILES=y | Defines the size of the SD file directory (maximum number of SD files).Default: 500
DMPSPAC=z | Specifies the amount of space in Mbytes, that are to be assigned for thread dumps. The rest of the dataset will be used for SD files.Default: 50% of the dataset100% if SDFILES=0 is specified explicitly.

## Backup and Restoration of SD Files

Contents of the Com-plete SD data set (including online dumps) can be backed up and restored using standard VSAM utilities. This is possible only when Com-plete is not active, and no selective backup and restoration of SD files is possible using these features.

Experience shows that, conditioned by the work file nature of most SD files, in time directory and SD file space of the data set become exhausted. This is mostly caused by application programs not deleting their work files when they become obsolete. To avoid abnormal program terminations caused by exhausted SD file directory or space, it is recommendet periodically to run a BATCH backup job using the option to delete all SD files that have not been opened within a given number of days.

The job control required for backup and restoration of SD files is illustrated below:

> z/OS:

>       //TUSDUTIL JOB   ... job-card information ...
>       //         EXEC  PGM=TUSDUTIL,PARM='parm'
>       //STEPLIB  DD    DSN=COM.USER.LOAD,DISP=SHR
>       //         DD    DSN=COM.LOAD,DISP=SHR
>       //         DD    DSN=ADABAS.LOAD,DISP=SHR
>       //BACKUP   DD    DSN=COM.SD.BACKUP,DISP=OLD
>       //SYSPRINT DD    SYSOUT=A
>       //SYSIN    DD    *
>       control card input for selective restoration of SD files
>       /*

> z/VSE:

>       * $$ JOB JNM=TUSDUTIL,DISP=D,CLASS=? ......  POWER JOB CARD INFORMATION
>       * $$ LST DISP=D,CLASS=A
>       // JOB   TUSDUTIL                    ......  JOB CARD INFORMATION
>       /*
>       /* ==================================================
>       /*
>       /* Com-plete MUST BE ACTIVE WITH ACCESS SUPPORT
>       /*
>       /* ==================================================
>       /*
>       // LIBDEF    PHASE,SEARCH=(SAGLIB.COMUSER,     /* load ACSTAB */       *
>                    SAGLIB.COMvrs,                            <---- Note 1    *
>                    SAGLIB.CADAvrs),temp                      <---- Note 1
>       /*
>       /* ==================================================
>       /* DLBL and EXTENT information for backup on DISK
>       /* ==================================================
>       // DLBL      BACKUP,'COM.SC.BACKUP',10,SD
>       // EXTENT    SYS002,vvvvvv,1,0,tttttt,nnnn             <---- Note 2
>       /*
>       /* ==================================================
>       /* TLBL information for backup on TAPE
>       /* ==================================================
>       /* TLBL      BACKUP,'COM.SC.BACKUP'
>       /* ASSGN     SYS002,cuu                                <---- Note 3
>       /*
>       /* ==================================================
>       /* DLBL and EXTENT information for restore from DISK
>       /* ==================================================
>       // DLBL      RESTORE,'COM.SC.BACKUP',10,SD
>       // EXTENT    SYS001,vvvvvv,1,0,tttttt,nnnn             <---- Note 2
>       /*
>       /* ==================================================
>       /* TLBL information for restore from TAPE
>       /* ==================================================
>       /* TLBL      RESTORE,'COM.SC.BACKUP'
>       // ASSGN     SYS001,cuu                                <---- Note 3
>       /*
>       // EXEC      TUSDUTIL,SIZE=AUTO,PARM='parm'
>       control card input for selective restoration of SD files
>       /*
>       /&
>        * $$ EOJ

>   1. vrs in these cases relates to the Version, Release and SM level of the Com-plete being installed.

>   2. Change vvvvvv to the required VOLSER; change tttttt to the required TRACK and change nnnn to the required NUMBER of TRACKS.

>   3. Change cuu to the required TAPE unit address.

### Parameter Values:

BACKUP | All SD files are written to the sequential data set defined by the DD / DLBL or TLBL statement BACKUP.
,DELAGE=n | (Allowed only if BACKUP is specified as first parameter) All SD files that have not been opened in the last n days are deleted from COMSD data set after they have been written to BACKUP.
RESTORE | SD files are restored from the sequential data set defined by the DD / DLBL or TLBL statement BACKUP. If a SYSIN DD (SYSIPT) statement is specified and SYSIN is not empty, selective restore will be performed.Default: All SD files are restored. Note SD files existing in the COMSD data set are never overridden.
LIST | Contents of the dataset defined by DD / DLBL or TLBL statement BACKUP are listed on SYSPRIN/SYSLIST.

### DD / DLBL or TLBL Statements:

BACKUP | With PARM option BACKUP: Sequential output data set to which the SD files are copied.Default DCB parameters: RECFM=VB,BLKSIZE=15000
RESTORE | With PARM option RESTORE / LIST:Sequential data set containing the unloaded SD files written by TUSDUTIL.
SYSPRINT/SYSLIST | Listing file
SYSIN/SYSIPT | Contains control cards for selective restoration of SD files.The format of the control cards is as follows:
Columns 1-8 | The SD file name (last two bytes must be blanks in Com-plete 4.5).
Columns 9-13 | The TID number of the SD file. Must be en- tered as a five-digit number with leading zeros, if necessary. If the SD file was created with SHR, then 'SHR' should be entered beginning in column nine.
If more than one SD file is being selectively restored, one control statement must exist for each SD file. In addition, the control statements must be arranged in sequential, ascending order, by file name and TID number.

Sample execution job control for SD file backup and restoration is given in the distribution Com-plete source library in member JCLTUSDU.

### Return Codes

0 | Function executed successfully.
4 | Check output for further error information
16 | Parameter error.

If your job contains a SYSPRINT DD statement, all messages recieved from Com-plete will be logged to SYSPRINT.

Note
Com-plete must be active with sysparm SUBSYS-ACTIVATE=ACCESS and defined in ACSTAB when this utility is used with PARM options BACKUP or RESTORE.

For detailed information on ACCESS, refer to Software Interfaces and to the Com-plete Installation documentation.

### On this page

- Initialization of the Com-plete SD Data Set
- Backup and Restoration of SD Files