I code a script to have orchadmin do things on data sets like list out schema using ls or describe -s command.
I then changed the script to have orchadmin read in a command file using the orchadmin -f file-name and the command file has the exact describe -s /path/file.ds followed by a ;. I tested run the script and orchadmin complaints about invalid command which is blank. I intentionally put in a non existent file name and orchadmin complaints correctly file not found.
What is missing here? Any advice?
Thanks....
orchadmin -f command-file error
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 18
- Joined: Fri Aug 18, 2006 11:47 pm
- Location: California
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Charter Member
- Posts: 18
- Joined: Fri Aug 18, 2006 11:47 pm
- Location: California
It is because the usage error text indicated to seperate commands by semi-colon. I tried with no semi-colon and ended up with the same invalid command and displayed command is an empty text. I tried orchadmin abc intentionally and the error message indicated abc is the invalid command.ray.wurlod wrote:Why the semi-colon ?
The text in my command text file:
describe -s /path/descriptfile.ds
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Charter Member
- Posts: 18
- Joined: Fri Aug 18, 2006 11:47 pm
- Location: California
Here is the output:ray.wurlod wrote:OK, please post the exact error message that orchadmin emits.
##I IIS-DSEE-TFCN-00001 09:48:11(000) <main_program>
IBM WebSphere DataStage Enterprise Edition 8.0.1.4665
Copyright (c) 2001, 2005-2007 IBM Corporation. All rights reserved
##I IIS-DSEE-TCOA-00055 09:48:11(001) <main_program> ERROR: Invalid command name: ;
for help, type: -help.
and the content of the command file is
describe -s /path/dataset.ds
-
- Charter Member
- Posts: 18
- Joined: Fri Aug 18, 2006 11:47 pm
- Location: California
I tried a similar command file with same describe command seperated by a ; but it won't work.OddJob wrote:I tried the following that seems to work:
rm file.ds;
rm file2.ds
I think the secret is that you need semi colon terminated lines, but each command needs to be on a new line.
An alternateive is orchadmin `cat command.txt`. I tried and it works.