Renaming and deleting a dataset
Moderators: chulett, rschirm, roy
Renaming and deleting a dataset
I have 2 datasets, A and B. I would like to delete A and rename B to A. I figured I would do:
orchamin delete A.ds
orchadmin copy B.ds A.ds
orchadmin delete B.ds
I am doing this in an After-job routine by using ExecTCL. Is that the best solution?
orchamin delete A.ds
orchadmin copy B.ds A.ds
orchadmin delete B.ds
I am doing this in an After-job routine by using ExecTCL. Is that the best solution?
yes, orchadmin delete a and then just rename b.ds to a.ds
No need in this case to actually copy data around.
No need in this case to actually copy data around.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Not ExecTCL; this executes "UniVerse" commands. Use ExecSH. You may need to use the full path of the orchadmin command, if its parent directory ($APT_ORCHHOME/bin) is not defined in your PATH.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I cannot execute:
orchamin delete A.ds
It gives me a "Command not found" error.
I know that I need to have $DSHOME and $APT_ORCHHOME defined which I don't. But can't I put the full path and execute orchadmin? How do I tell where my orchadmin is installed? I did a "find" for a directory called orch. It didn't work. My admin tells me that orchadmin is installed. How do I tell where it is installed and how do I run the delete command above?
Thanks.
orchamin delete A.ds
It gives me a "Command not found" error.
I know that I need to have $DSHOME and $APT_ORCHHOME defined which I don't. But can't I put the full path and execute orchadmin? How do I tell where my orchadmin is installed? I did a "find" for a directory called orch. It didn't work. My admin tells me that orchadmin is installed. How do I tell where it is installed and how do I run the delete command above?
Thanks.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
orchadmin is in the bin subdirectory of PXEngine, which is a sibling directory of DSEngine. Therefore, assuming DSHOME is set:
For the orchadmin command to work, you also need APT_CONFIG_FILE to be set, and set to the same configuration file as you used to create the Data Set. For example:
To execute orchadmin you either need the full pathname, that is $APT_ORCHHOME/bin/orchadmin, or to have set your PATH environment variable to include its parent directory:
Note that there is no space either side of the "=" character in any of these commands.
Code: Select all
APT_ORCHHOME=$DSHOME/../PXEngine ; export APT_ORCHHOME
Code: Select all
APT_CONFIG_FILE=$DSHOME/../Configurations/default.apt ; export APT_CONFIG_FILE
Code: Select all
PATH=$PATH:$APT_ORCHHOME/bin ; export PATH
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
No, use a UNIX rename for the descriptor file.splayer wrote:There is no orchadmin rename command so I have...
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
1)I used the full path as follows:
/fullpath/orchadmin delete myfile.ds
I get the following error:
"error while loading shared libraries: liborchgenerali686.so: cannot open shared object file: No such file or directory"
2)To rename a dataset file, can I just use the Unix mv command? That will rename just the .ds file not the child files? Wouldn't that cause a problem if I tried to delete them later?
/fullpath/orchadmin delete myfile.ds
I get the following error:
"error while loading shared libraries: liborchgenerali686.so: cannot open shared object file: No such file or directory"
2)To rename a dataset file, can I just use the Unix mv command? That will rename just the .ds file not the child files? Wouldn't that cause a problem if I tried to delete them later?
splayer,
you also need to set your other environment variables using the $DSHOME/dsenv script. Have you checked whether the file exists and that you don't have execute rights to it?
You can rename the .ds "descriptor" file using UNIX "mv". The file only contains information linking to the actual data files so its name is irrelevant.
you also need to set your other environment variables using the $DSHOME/dsenv script. Have you checked whether the file exists and that you don't have execute rights to it?
You can rename the .ds "descriptor" file using UNIX "mv". The file only contains information linking to the actual data files so its name is irrelevant.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I'm not certain that's right, Arnd. The segment file names include the name of the descriptor file. The naming convention for segment files is
where
Code: Select all
descriptor.user.fastname.0000.0000.0000.c4.c4e17a7d.0000.2fdc262f
- descriptor is the name of the descriptor file
user is the name of the user who executed the job that created the Data Set
fastname is the name of the host on which the node exists
the next four components manage the segment files when more than one is required (e.g. operating system file size limit is 2GB)
the final two components are for uniqueness
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
But the name of the descriptor file can be changed; yes - the data files will retain their original naming conventions but the access will always be through the descriptor so that doesn't make a difference. It might be a bit misleading if someone browses the data directory but functionally the name of the .ds file doesn't matter. It is an easy test to do (if I were at a PX installation today), rename the .ds file and see if the "orchadmin ll {dsfile}" still works.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I am seeing some strange behavior. If I do:
chmod +x
on my dataset file, it deletes the .ds file when I do:
orchadmin delete MyDS.ds
However, it doesn't delete the child files. In either case, I get the following error:
"orchadmin: error while loading shared libraries: liborchgenerali686.so: cannot open shared object file: No such file or directory"
chmod +x
on my dataset file, it deletes the .ds file when I do:
orchadmin delete MyDS.ds
However, it doesn't delete the child files. In either case, I get the following error:
"orchadmin: error while loading shared libraries: liborchgenerali686.so: cannot open shared object file: No such file or directory"
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I just thought that might be an issue. Anyway, I found out that it is a permission issue. My Datastage admin told me that, as a developer, my ID does not have the rights to do orchadmin commands. What's strange is, I could execute dsenv like it is mentioned on this site.
Is it standard that Datastage developers are not given access to orchadmin commands? I haven't seen this elsewhere.
Is it standard that Datastage developers are not given access to orchadmin commands? I haven't seen this elsewhere.