Page 1 of 1

orchadmin copy command

Posted: Thu Sep 08, 2011 1:06 am
by Lavanya B
The requirement is: Using orchadmin command, copy the data from one dataset to a new dataset and the data files for the new dataset should be created.
I executed orchadmin copy command:
orchadmin copy | cp sourcedataset targetdataset

I see that the descriptor file for target dataset is created. However it
points to the segment file of source dataset. No data files are created for the target dataset.
But in one of the posts I read that the data file will be created for the target dataset beginning with target descriptor file name in the resource disk.
Apart from job creation, is there any other option that will suffice the requirement?

Posted: Thu Sep 08, 2011 1:58 am
by arvind_ds
Try to use dataset management utility in DataStage Designer tool to copy the datasets.You need to test it first and then see whether it creates the required files or not.

Posted: Thu Sep 08, 2011 2:22 am
by kduke
There is a way to dump a dataset in orchadmin. Then you can reload to a new one. You can also switch config files this way. Don't know the syntax but I don't think it is too complex.

Posted: Thu Sep 08, 2011 2:26 am
by arvind_ds
use the below command to get the syntax

orchadmin -h

Posted: Thu Sep 08, 2011 4:08 am
by ray.wurlod
Did you really have copy | cp in your command?

Think about what this is doing!

Posted: Thu Sep 08, 2011 9:19 am
by jwiles
Your command string did exactly what you commanded it to do:

1) execute "orchadmin copy"
2) execute "cp sourcedataset targetdataset"

and therefore, you ended up with a copy of just the dataset descriptor file.

On the linux command line, the pipe character "|" is essentially a command separator which also routes the stdout from the left-hand command to the stdin file of the right-hand command.

By convention, in the help output of a command, the "|" is used to show optional values for a command's parameters. For orchadmin, "cp" and "copy" are the two orchadmin commands for copying a dataset. It looks like you just copied and pasted the orchadmin help output verbatim.

Regards,

Posted: Thu Sep 08, 2011 4:57 pm
by ray.wurlod
Looks like James did your thinking for you.

Posted: Thu Sep 08, 2011 6:10 pm
by chulett
He's a thinker, that James fella. :wink:

Posted: Thu Sep 08, 2011 8:35 pm
by jwiles
Yeah, maybe once a month during certain moon phases...