orchadmin copy command

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Lavanya B
Participant
Posts: 20
Joined: Mon Oct 30, 2006 12:32 am

orchadmin copy command

Post 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?
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post 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.
Arvind
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

use the below command to get the syntax

orchadmin -h
Arvind
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you really have copy | cp in your command?

Think about what this is doing!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Looks like James did your thinking for you.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

He's a thinker, that James fella. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Yeah, maybe once a month during certain moon phases...
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply