Hi,
I would like to know if dssh supports a batch mode, the intention is to write a scripts which would perform below activities:
1. Add VOC entry for a hashed file
2. Delete VOC entry for hashed file
3. Create and build secondary indexes for hashed files
4. Delete secondary indexes for hashed files
5. Fetch a particular record from hashed file from Unix script.
We can perform 1-4 in interactive mode but would like to have scripts with parameters that can be executed rather than having every developer meddling with VOC file.
Thanks
Writing dssh scripts
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Writing dssh scripts
- Zulfi
Not sure about the 'batch mode' you mentioned but you can certainly execute dssh queries from the command line and bundle those into scripts.
But then it seems you already know that.![Wink :wink:](./images/smilies/icon_wink.gif)
But then it seems you already know that.
![Wink :wink:](./images/smilies/icon_wink.gif)
Last edited by chulett on Wed Aug 27, 2014 8:02 am, edited 1 time in total.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
See edited reply.
I meant your shell script could 'bundle' as in make multiple calls to dssh, one for each command / function you needed to run. Did not mean to imply there is any kind of 'script' capability within dssh itself, although there very well could be. Never had a need to investigate any such thing so others will need to clarify that for you.
There's always COMO ON and COMO OFF for that 'redirection' but me, I'd stick with using standard stuff from the command line and leave COMO for the interactive client sessions.
I meant your shell script could 'bundle' as in make multiple calls to dssh, one for each command / function you needed to run. Did not mean to imply there is any kind of 'script' capability within dssh itself, although there very well could be. Never had a need to investigate any such thing so others will need to clarify that for you.
There's always COMO ON and COMO OFF for that 'redirection' but me, I'd stick with using standard stuff from the command line and leave COMO for the interactive client sessions.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
1. UVwrite hashedfile keyvalue field1 field2 ...
(warning: this is a destructive overwrite).
2. UVdelete hashedfile keyvalue
3. dssh "CREATE.INDEX hashedfile columnname" && dssh "BUILD.INDEX hashedfile columnname"
4. dssh "DELETE.INDEX hashedfile columnname"
5. UVread hashedfile keyvalue
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.
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Wowchulett wrote:But then it seems you already know that.
![Smile :)](./images/smilies/icon_smile.gif)
![Wink ;)](./images/smilies/icon_wink.gif)
Yup, I was wondering if at all there was any flag in dssh that takes a file with queries with the intention to avoid the to and fro calls to dssh. Anyhow I will go ahead with bundling them into shell script.
Thanks
- Zulfi
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Thanks for the reply Ray, Is there a way to fetch all records of select query from dssh by getting rid of "Press any key to continue..."ray.wurlod wrote:Code: Select all
5. UVread hashedfile keyvalue
Thanks
- Zulfi
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Add the NO.PAGE keyword to the query.
Or redirect stdin from /dev/null.This provides the responses to "Press any key to continue . . ."
Or redirect stdin from /dev/null.
Code: Select all
dssh "SELECT * FROM VOC;" < /dev/null
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.