IBM User's Guide, Thirteenth Edition


14 MVS Data Set Management Utilities

Utility programs provide a convenient method of performing routine data management tasks, such as deleting, renaming, cataloging, uncataloging, moving, copying, merging, and modifying data sets. The utility programs available at UTCC include locally written programs, programs from other installations, and the IBM utility programs. The latter group of programs is covered in detail in MVS/ESA Data Administration: Utilities , GC26-4516, which is available in Remotes 2, 8, 17 and 28 and Room A301H Veterinary Medicine; and in MVS/ESA Integrated Catalog Administration: Access Method Services Reference

UTCC utilities

The utility programs available at UTCC include locally written programs and programs from other installations. This section describes some of those programs.

EZCOPY

EZCOPY is a utility program to copy sequential data sets. It is invoked as follows:

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //STEPA EXEC EZCOPY //SYSPRINT DD SYSOUT=* //EZINxxx DD (input data set) //EZOUTxxx DD (output data set)

There may be any number of EZINxxx/EZOUTxxx DD statement pairs. Each pair defines a copy operation and should be made unique by a one to three character suffix. Copies are performed in sorted order, according to the ddname suffix.

Note If more than nine data sets are being copied, data sets 1 to 9 should be coded as EZIN01, EZOUT01, etc. in order to keep the sets in order. Each input record is edited to fit the output DCB attributes. If no output attributes are specified, the input DCB attributes are copied. Input DCB attribute defaults are DCB=(RECFM=U,BLKSIZE=32760). If input records are too long to fit the output specifications, they will be truncated unless a D is specified in the PARM field (see below). If input records are too short to fit the output specifications, they will be expanded with blanks. The PARM field on the EXEC statement may specify any of the following options. Multiple options must be separated by commas.

U Make output uppercase. L Make output lowercase. T Delete trailing blanks. C Copy input RECFM carriage control type (A or M) to output RECFM. D Divide large input records into multiple records instead of truncating. Q Suppress SYSPRINT output. Also, the SYSPRINT DD statement may be omitted. E Exact copy. Force output DCB attributes equal to input DCB attributes.

For example,

//STEPA EXEC EZCOPY,PARM=D

HSUBMIT

HSUBMIT is a cataloged procedure that allows the submission of other batch jobs into the JES2 execution queue. A sequence or chain of related or dependent jobs can be created by having the first job in the sequence submit the second job, which in turn submits the third job, and so on through the sequence. It is invoked as follows:

//STEP2 EXEC HSUBMIT
//SYSIN DD
(specification of input data set)

"HSUBMIT," U01-0439, is available through the PRTDOC facility.

LISTCAT

The cataloged procedure LISTCAT generates a listing of MVS cataloged data sets for a particular project code. This listing provides one line for each data set. The following is an example of the necessary job control language:

//jobname  JOB ,name,GROUP=Jprojcode,USER=Pusercode,
//         PASSWORD=?
/*ROUTE    PRINT RMTn
//stepname EXEC LISTCAT
//MYCODE   DD *
  LEVEL(Jprojcode)

PDSUTIL

PDSUTIL, a partitioned data set utility program, lists a partitioned data set directory, deletes and renames members, and adds alias names. It combines the partitioned data set functions of the IBM utilities IEHPROGM and IEHLIST into one program and adds some capabilities. In addition, its JCL and control statements are simpler and easier to use. For example, in order to obtain a listing of the directory of a cataloged partitioned data set, the following JCL is sufficient:

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //LIST EXEC PDSUTIL,DSN='dsname'

A complete description of PDSUTIL is contained in "PDSUTIL: Partitioned Dataset Utility Program Description," U01-0432, available through the PRTDOC facility.

PRTGUIDE

PRTGUIDE is a cataloged procedure for printing user's guides on the IBM line printers for the following:

ASSIST PASCAL PSUDUMP CENSPAC PDS PLOTUT EISPACK PLC XMACRO

Any of these guides may be printed with the following JCL:

//jobname  JOB ,name,GROUP=Jprojcode,USER=Pusercode,
//         PASSWORD=?
/*ROUTE    PRINT RMTn
/*JOBPARM  LINES=99
//stepname EXEC PRTGUIDE,GUIDE=name

where "name" is one of the guides listed above. The default form is greenbar paper (0316). The PL/C guide is printed in double-column format; therefore, narrow forms (0416) must not be requested for it.


IBM utilities

Except for IEHINITT, UTCC supports all the utility programs described in MVS/ESA Data Administration: Utilities , GC26-4516. The IDCAMS utility (section 14.2.1) is documented in MVS/ESA ICA: Access Method Services Reference A few commonly used IBM utility programs are presented below.

IDCAMS

IDCAMS is used to create, delete, rename, catalog, or uncatalog data sets (other than partitioned data sets) and to manage catalogs. IDCAMS can be executed by calling the UTCC cataloged procedure IDCAMS.

Procedure Available:
IDCAMS

Procedure Step Name Symbolic Parameters

Execution GO GOREG

Procedure Listing

//IDCAMS PROC GOREG=1024K //GO EXEC PGM=IDCAMS,REGION=&GOREG //SYSPRINT DD SYSOUT=*

Example

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC IDCAMS //GO.SYSIN DD * (IDCAMS control statements)

The IDCAMS control statements, supplied by the user, are documented in MVS/ESA ICA: Access Method Services Reference

IEBCOPY

IEBCOPY can be used to copy a partitioned data set (PDS) from disk to disk, from disk to tape, or vice versa. To copy a sequential data set, use EZCOPY or IEBGENER. If a data set has been unloaded with IEBCOPY, it should be loaded with IEBCOPY, and vice versa.

Example 1 - Copy a partitioned data set on disk to a scratch cartridge tape, suitable for a backup copy, for storage, or for transporting the data.

//jobname  JOB   ,name,GROUP=Jprojcode,USER=Pusercode,MSGCLASS=H,
//         PASSWORD=?
/*ROUTE    PRINT RMTn
//stepname EXEC  PGM=IEBCOPY
//SYSPRINT DD    SYSOUT=*
//ddname1  DD    DSN=dsname1,DISP=SHR
//ddname2  DD    DSN=dsname2,UNIT=TAPE,DISP=(NEW,KEEP),
//               LABEL=EXPDT=yyddd
//SYSUT3   DD    UNIT=SYSDA,SPACE=(TRK,(1))
//SYSUT4   DD    UNIT=SYSDA,SPACE=(TRK,(1))
//SYSIN    DD    *
  COPY     OUTDD=ddname2,INDD=ddname1

If the PDS is not cataloged, then add UNIT=ONLINE,VOL=SER=volid in the ddname1 statement. When this example is executed, a copy of the PDS is created on tape, and the original PDS remains on disk.

Example 2 - Creating a partitioned data set on disk from a data set on a cartridge tape.

//jobname  JOB   ,name,GROUP=Jprojcode,USER=Pusercode,MSGCLASS=H,
//         PASSWORD=?
/*ROUTE    PRINT RMTn
//stepname EXEC  PGM=IEBCOPY
//SYSPRINT DD    SYSOUT=*
//ddname1  DD    DSN=dsname1,UNIT=TAPE,VOL=SER=volid,
//               DISP=SHR
//ddname2  DD    DSN=dsname2,UNIT=ONLINE,DISP=(NEW,CATLG),
//               SPACE=(blksize,(n1,n2,n3),RLSE)
//SYSUT3   DD    UNIT=SYSDA,SPACE=(TRK,(1))
//SYSUT4   DD    UNIT=SYSDA,SPACE=(TRK,(1))
//SYSIN    DD    *
  COPY     OUTDD=ddname2,INDD=ddname1
where "n1,n2,n3" are the disk space allocations.

IEFBR14

IEFBR14 is a dummy execution program. It may be used to allocate or delete MVS disk data sets. Although it is an IBM utility program, IEFBR14 is not described in MVS/ESA Data Administration: Utilities However, it is described in MVS/ESA JCL Reference GC28-1829. IEFBR14 can be executed by calling the UTCC cataloged procedure IEFBR14. A successful completion of IEFBR14 sets a return code of zero.

Procedure Available:
IEFBR14 (alias BR14)

Procedure Step Name Symbolic Parameters

Execution GO --

Procedure Listing

//IEFBR14 PROC //GO EXEC PGM=IEFBR14

Example: Deleting a Cataloged Disk Data Set

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode,MSGLEVEL=(1,1), // PASSWORD=? /*ROUTE PRINT rmtn // EXEC IEFBR14 //DD1 DD DSN=Jprojcode.Pusercode.datasetname,DISP=(OLD,DELETE)

Note: If the data set is cataloged, the user should not code UNIT or VOL=SER parameters. If these are coded, the data set will be deleted but not uncataloged. IEFBR14 should not be used to catalog or uncatalog tape data sets, since to do so requires mounting the tape. IEHPROGM should be used for these purposes.

IEHLIST

By executing the IEHLIST procedure, you can get a printed list of data sets in a partitioned data set on disk. The following JCL will execute the UTCC cataloged procedure IEHLIST:

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode,MSGLEVEL=(1,1), // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC IEHLIST,VOLID=ONLINn //GO.SYSIN DD * LISTPDS DSNAME=Jprojcode.pdsname,VOL=3380=ONLINn

IEHLIST can also be used to list the entries in a volume table of contents; see examples in MVS/ESA Data Administration: Utilities , GC26-4516.

IEHMOVE

IEHMOVE provides facilities for moving or copying data sets. In most cases, IEHMOVE should not be the utility of choice. However, if a dataset has been unloaded with IEHMOVE, it should be loaded with IEHMOVE, and vice versa.

Procedure Available: IEHMOVE (alias MOVE)

Procedure Step Name Symbolic Parameters

Execution GO VOLID, SYSUT1

Procedure Listing

//IEHMOVE  PROC VOLID=SYSDAA,SYSUT1=SYSDAA
//GO       EXEC PGM=IEHMOVE
//SYSPRINT DD   SYSOUT=*
//MVRES9   DD   UNIT=(3380,,DEFER),VOL=SER=MVRES9,DISP=OLD
//SYSUT1   DD   UNIT=(DISK,,DEFER),VOL=SER=&SYSUT1,DISP=OLD
//XXXXXX   DD   VOL=REF=UTCC.DISK.&VOLID,DISP=OLD

Example

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC IEHMOVE,VOLID=ONLINn //GO.SYSIN DD * (IEHMOVE control statements)

The IEHMOVE control statements, supplied by the user, are documented in MVS/ESA Data Administration: Utilities , GC26-4516.

IEHPROGM

IEHPROGM provides facilities for deleting or renaming data sets or members and for cataloging or uncataloging non-VSAM data sets. IEHPROGM can be executed by calling the UTCC cataloged procedure IEHPROGM.

Procedure Available:
IEHPROGM (alias MOD, PROGM)

Procedure Step Name Symbolic Parameters

Execution GO VOLID

Procedure Listing

//IEHPROGM PROC VOLID=MVRES1 //GO EXEC PGM=IEHPROGM //SYSPRINT DD SYSOUT=* //MVRES9 DD UNIT=(3380,,DEFER),VOL=SER=MVRES9,DISP=OLD //XXXXXX DD VOL=REF=UTCC.DISK.&VOLID,DISP=OLD

Example: Deleting a Data Set on ONLIN1

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC IEHPROGM,VOLID=ONLIN1 //GO.SYSIN DD * (IEHPROGM control statements)

The IEHPROGM control statements, supplied by the user, are documented in MVS/ESA Data Administration: Utilities , GC26-4516.

SyncSort

The SyncSort program places the records of a data set in ascending or descending order according to the contents of a control word or words in each record. Input to and output from SyncSort can be any data set that consists of fixed-length or variable-length, blocked or unblocked records. routines can operate in conjunction with SyncSort to insert, summarize, delete, and/or alter the records being sorted or merged. Data formats which may be sorted are character, zoned decimal, packed decimal, fixed-point, binary, and floating-point fields. The SyncSort program may be invoked in a COBOL program by the SORT verb, in a PL/I program by a CALL statement, and directly by means of JCL statements. When it is invoked directly, control statements in addition to the JCL statements are required.

SORT cataloged procedure

A cataloged procedure, SORT, which is contained in UTCC.MVS.PROCLIB, is available for use with SyncSort. SORT provides three work data sets.

Procedure Available: SORT

Procedure Step Name Symbolic Parameters

Execution GO CORE, CYLS, GOREG, MSG, TYPE

Default Values for Symbolic Parameters

CORE=MAX where CORE indicates the main storage allocation in bytes for the program
CYLS=5 where CYLS is the size in number of cylinders of each of the sort work data sets
GOREG=256K where GOREG is the maximum estimated region size in K bytes
MSG=AP where MSG specifies the message option
TYPE=BALN where TYPE indicates the sort/merge technique

Examples

A.  Sort input and print output

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC SORT //GO.SORTIN DD * (input to be sorted) //GO.SORTOUT DD SYSOUT=* //GO.SYSIN DD * (control statements)

B. Sort tape input

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode,CLASS=T, // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC SORT //GO.SORTIN DD (specification of input data set on tape) //GO.SORTOUT DD (specification of output data set) //GO.SYSIN DD * (control statements)

C. Large sort

//jobname JOB ,name,GROUP=Jprojcode,USER=Pusercode, // PASSWORD=? /*ROUTE PRINT RMTn //stepname EXEC SORT,GOREG=512K,CYLS=15 //GO.SORTIN DD (specification of input data set) //GO.SORTOUT DD (specification of output data set) //GO.SYSIN DD * (control statements)

Documentation

The JCL statements and control statements required for execution of SyncSort are given in A Programmer's Guide to SyncSort OS & OS/VS , SI-0401 (CMS) or SI-0101 (MVS), available from SyncSort Incorporated, 50 Tice Boulevard, Woodcliff Lake, New Jersey, 07675, telephone (201) 930-9700.


[ Top of Page | Previous Page | Next Page | Table of Contents ]