Move the dataset from one volume to other



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Move the dataset from one volume to other

Postby ananth86 » Fri Jun 12, 2009 5:13 pm

Hi

I have a Sequential dataset and I have to move that from volume T4LSE1 to T4LSE2
Here is the code its giving me syntax error. whats the error exactly I cudnt find out


//ANANTH1 JOB NOTIFY=&SYSUID                   
//STEP1 EXEC PGM=IEHMOVE                       
//SYSPRINT DD SYSOUT=A                         
//SYSUT1 DD UNIT=SYSDA,VOL=SER=T4LSE1,DISP=OLD
//SYSIN DD *                                   
  MOVE DSNAME='ANANTH.SEQFIL',TO=SYSDA=T4LSE2,CATLG   


And more thing can I perform the same with ADRDSSU utility also?
ananth86
 
Posts: 12
Joined: Thu Apr 02, 2009 12:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Move the dataset from one volume to other

 

Re: Move the dataset from one volume to other

Postby dick scherrer » Fri Jun 12, 2009 10:12 pm

Hello,

One easy way to do what you want is to copy the dataset to a new name on the target volume.

Once you have verified that the copy was successful, rename to original to some backup name and rename the new file to the original dsn.

When there is no longer a need for the backup, delete the original file fro the original volume.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Move the dataset from one volume to other

Postby ananth86 » Sat Jun 13, 2009 12:32 pm

Yeah wat u r saying may work fine...
But I want to know wat is the error in the code..
This program does everything u mentioned in a single step, right?

i want to know wats wrong with my code..
ananth86
 
Posts: 12
Joined: Thu Apr 02, 2009 12:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Move the dataset from one volume to other

Postby dick scherrer » Sat Jun 13, 2009 11:32 pm

Hello,

i want to know wats wrong with my code..

The IEHMOVE syntax appears completely incomplete :) . . . Did you refer to the IBM manual or did you just make something up?

Suggest you look here:
http://publibz.boulder.ibm.com/cgi-bin/ ... 0/CONTENTS?

Post your jcl, control info, and diagnostic info generated including any message ids if the new control info you create does not work.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Move the dataset from one volume to other

Postby expat » Mon Jun 15, 2009 4:25 pm

Why on earth are you using IEHMOVE ?

IEBGENER, ICEGENER, SORT, DFdss ...............

And if the volumes are SMS managed you also need access to a guaranteed space steorage class to honour the volser request for output.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Move the dataset from one volume to other

Postby Anuj Dhawan » Mon Jun 29, 2009 3:06 pm

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. And You cannot use IEHMOVE with PDSEs or ISAM or VSAM data sets.

If you do use IEHMOVE to move or copy data sets to SMS-managed volumes, I hope you take care about these: you must preallocate all the target data sets. If the data set you are copying or moving is cataloged, and you are moving or copying it to an SMS-managed volume, you must rename the data set.
Anuj
Anuj Dhawan
 
Posts: 274
Joined: Mon Feb 25, 2008 3:53 am
Location: Mumbai, India
Has thanked: 6 times
Been thanked: 4 times

Re: Move the dataset from one volume to other

Postby expat » Mon Jun 29, 2009 4:55 pm

Not to mention being authorised to use a "Guaranteed Space" STORCLAS to be able to specify the output volume in an SMS environment.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post