IEHMOVE
 
 

 

The IEHMOVE utility can be used to move or copy a non-VSAM data set to or from tape or DASD, without allocating space for the output file (a move deletes the original file).

 

Note: - The IEHMOVE utility has one advantage over the IEBGENER and AMS utilities when it comes to copying data sets. That is, you don’t have to specify the space requirements for the output data set. Instead, IEHMOVE automatically determines the space allocation for the output data set based on the allocation for the input data set

Syntax.

COPY | MOVE  { DSNAME=data-set-name }
             { PDS=library-name     }
             { DSGROUP=name         }
             { VOLUME=unit=serial   }
            [ ,FROM=unit=serial ]
              ,TO=unit=serial
            [ ,UNCATLG ]
            [ ,RENAME=new-name ]
            [ ,EXPAND=number ]
 

DSNAME

Specifies the input data set name for a sequential data set.

PDS

Specifies the input data set name for a partitioned data set (either a PDS or a PDSE).

DSGROUP

Specifies one or more data set name qualifiers that are used to identify a data set group. All data sets on the volume that have those qualifiers are copied or moved.

VOLUME

Species the device type and the volume serial number of a volume.

FROM

Specifies the input volume if the data set isn’t cataloged.

TO

Specifies the output volume.

UNCATLG

Uncatalogs the input file.

RENAME

Specifies the name of the output file if different from the input file.

EXPAND

Specifies a number of additional directory blocks to be inserted into the directory of a partitioned data set.

DD statement requirements. 

ddname

Use

SYSPRINT

An output message file.

SYSUT1

Identifies a volume for a temporary work file of about 50 tracks of space.

Any

Identifies the volume serial number of the system residence device. Not always required, but it can be coded as shown in the example just to be safe.

Any

One DD statement with UNIT, VOL, and DISP information for each volume processed by the utility. The file names are supplied by the COPY or MOVE control statement.

SYSIN

The control statement file.

Job step that copies and renames a sequential file.

//COPYSEQ  EXEC PGM=IEHMOVE

//SYSPRINT DD   SYSOUT=*
//SYSUT1   DD   UNIT=SYSDA,VOL=SER=WORK01,DISP=OLD
//SYSRES   DD   UNIT=SYSDA,VOL=REF=SYS1.SVCLIB,DISP=OLD
//DDUT1    DD   UNIT=SYSDA,VOL=SER=TSO001,DISP=OLD
//DDUT2    DD   UNIT=SYSDA,VOL=SER=TSO002,DISP=OLD
//SYSIN    DD   *
 COPY DSNAME=MM01.CUSTMAST,FROM=SYSDA=TSO001,
 TO=SYSDA=TSO002, 
 X
               RENAME=MM01.CUSTOMER.MASTER
/*
 
 You can use SELECT or EXCLUDE control statements after the 
MOVE or COPY statement to indicate which members of a part-
-itioned data set you want to include or exclude from the oper-
-ation. You can’t use both SELECT and EXCLUDE statements in the
 same operation.
Syntax.

SELECT MEMBER=(name[,name…])
      EXCLUDE MEMBER=(name)
 

MEMBER

  Specifies the name of a member to be included or excluded. Although you can code only one member in an EXCLUDE statement, you can code as many EXCLUDE statements as you need

 
Job step that moves and renames a partitioned data set
with some exclusions 

 

//MOVEPDS  EXEC PGM=IEHMOVE
//SYSPRINT DD   SYSOUT=*
//SYSUT1   DD   UNIT=SYSDA,VOL=SER=WORK01,DISP=OLD
//SYSRES   DD   UNIT=SYSDA,VOL=REF=SYS1.SVCLIB,DISP=OLD
//DDUT1    DD   UNIT=SYSDA,VOL=SER=TSO001,DISP=OLD
//DDUT2    DD   UNIT=SYSDA,VOL=SER=TSO001,DISP=OLD
//SYSIN    DD   *
 MOVE PDS=MM01.COPYLIB.COB,FROM=SYSDA=TSO001,
 TO=SYSDA=TSO001, 
         X
               RENAME=MM01.COPYINV.COB
 EXCLUDE MEMBER=PRODMSTR
 EXCLUDE MEMBER=PROMSTR
 EXCLUDE MEMBER=BFREC
 EXCLUDE MEMBER=TRREC
/*