In some previous sequences I have use Execute Command activity to execute Orchadmin untility dsrecords -n to return the number of rows in a dataset
I am now dealing with a sequence where i want to use Execute Command activity Orchadmin dump command and only return a single column value just as dsrecords -n does
I am able to run the command but expect I am getting more that one line returned as I do when I run the command line in Unix
Has anyone a work around for this to return a single value
Thanking you all in advance
Execute Command activity Orchadmin dump single value output
Moderators: chulett, rschirm, roy
I am expecting back 1 value from a single column single row DataSet
My current orchadmin
$APT_ORCHHOME/bin/orchadmin dump /.../.../xx.ds | tr -d \n
When I look at the sequence log I see
Output from command ====>
##I XXX <main_program>
IBM InfoSphere DataStage Enterprise Edition .....
xxxxx..
##I IIS-DSEE-TUTL....
##I IIS-DSEE-TFCN....
##I IIS-DSEE-TFSC....
##I IIS-DSEE-TOIX....
##I IIS-DSEE-TFSC....
1
In the above case I expect Output
Output from command ====>
1
My current orchadmin
$APT_ORCHHOME/bin/orchadmin dump /.../.../xx.ds | tr -d \n
When I look at the sequence log I see
Output from command ====>
##I XXX <main_program>
IBM InfoSphere DataStage Enterprise Edition .....
xxxxx..
##I IIS-DSEE-TUTL....
##I IIS-DSEE-TFCN....
##I IIS-DSEE-TFSC....
##I IIS-DSEE-TOIX....
##I IIS-DSEE-TFSC....
1
In the above case I expect Output
Output from command ====>
1
To suppress the noise, redirect standard error to /dev/null so that you are left with only the standard output.
Here is a page about Standard Input and Output Redirection.
http://sc.tamu.edu/help/general/unix/redirection.html
Code: Select all
$APT_ORCHHOME/bin/orchadmin dump /.../.../xx.ds 2>/dev/null
http://sc.tamu.edu/help/general/unix/redirection.html
Choose a job you love, and you will never have to work a day in your life. - Confucius