dbTalk Databases Forums  

Which scripting language do you use?

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Which scripting language do you use? in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Willem Fischer
 
Posts: n/a

Default Which scripting language do you use? - 10-18-2010 , 05:29 AM






I wonder which scripting language you are using for scripting both
Windows and AIX.

- Write everything twice, once for bash, once for DOS batch?
- Use a stored procedure
- Use the java that comes with every DB2 installation
- Install bash/perl/your-favorite-scripting-language
- ...

Currently I'm using the first variant, but I don't know which is more
limited, my knowledge of DOS batch or DOS batch itself...

Reply With Quote
  #2  
Old   
Frederik Engelen
 
Posts: n/a

Default Re: Which scripting language do you use? - 10-18-2010 , 08:44 AM






On Oct 18, 12:29*pm, Willem Fischer <w.l.fisc... (AT) googlemail (DOT) com>
wrote:
Quote:
I wonder which scripting language you are using for scripting both
Windows and AIX.

- Write everything twice, once for bash, once for DOS batch?
- Use a stored procedure
- Use the java that comes with every DB2 installation
- Install bash/perl/your-favorite-scripting-language
- ...

Currently I'm using the first variant, but I don't know which is more
limited, my knowledge of DOS batch or DOS batch itself...
Did you checkout Cygwin? That might help you with the double work.

--
Frederik Engelen

Reply With Quote
  #3  
Old   
Hardy
 
Posts: n/a

Default Re: Which scripting language do you use? - 10-18-2010 , 09:29 AM



On Oct 18, 5:29*am, Willem Fischer <w.l.fisc... (AT) googlemail (DOT) com> wrote:
Quote:
I wonder which scripting language you are using for scripting both
Windows and AIX.

- Write everything twice, once for bash, once for DOS batch?
- Use a stored procedure
- Use the java that comes with every DB2 installation
- Install bash/perl/your-favorite-scripting-language
- ...

Currently I'm using the first variant, but I don't know which is more
limited, my knowledge of DOS batch or DOS batch itself...

For windows, I use cygwin for the Shell environment and you may need a
little effort to configure the cygwin shell to work well with DB2.

I highly opt to believe that cygwin+Perl will be the best choice for
this condition.

Reply With Quote
  #4  
Old   
Wolfgang Dephoff
 
Posts: n/a

Default Re: Which scripting language do you use? - 10-18-2010 , 11:56 AM



On 18.10.2010 12:29, Willem Fischer wrote:
Quote:
I wonder which scripting language you are using for scripting both
Windows and AIX.

- Write everything twice, once for bash, once for DOS batch?
- Use a stored procedure
- Use the java that comes with every DB2 installation
- Install bash/perl/your-favorite-scripting-language
- ...

Currently I'm using the first variant, but I don't know which is more
limited, my knowledge of DOS batch or DOS batch itself...
I use PHP for Scripts that must be run in Windows- and
Unix-Environments. It is a great Language.
I also take a look at REXX. It is available for Windows and Unix
and for a lot of other Operating-Systems.

Reply With Quote
  #5  
Old   
Ian
 
Posts: n/a

Default Re: Which scripting language do you use? - 10-18-2010 , 04:22 PM



On Oct 18, 3:29*am, Willem Fischer <w.l.fisc... (AT) googlemail (DOT) com> wrote:
Quote:
I wonder which scripting language you are using for scripting both
Windows and AIX.

- Write everything twice, once for bash, once for DOS batch?
- Use a stored procedure
- Use the java that comes with every DB2 installation
- Install bash/perl/your-favorite-scripting-language
- ...

Currently I'm using the first variant, but I don't know which is more
limited, my knowledge of DOS batch or DOS batch itself...
I usually go with perl, but this can be problematic on UNIX
environments if you don't have a C compiler and/or root privileges
(assuming you want DBI + DBD:B2).

Java is an OK (but heavy) option for scripting; but there are also
limitations in what you can do (you'll become dependent on
SYSPROC.ADMIN_CMD very quickly).

DOS (cmd.exe) is a joke for scripting. I've heard of people starting
to use PowerShell, but don't have any experience in it.

Reply With Quote
  #6  
Old   
Lennart Jonsson
 
Posts: n/a

Default Re: Which scripting language do you use? - 10-18-2010 , 11:09 PM



On 2010-10-18 12:29, Willem Fischer wrote:
Quote:
I wonder which scripting language you are using for scripting both
Windows and AIX.

- Write everything twice, once for bash, once for DOS batch?
- Use a stored procedure
- Use the java that comes with every DB2 installation
- Install bash/perl/your-favorite-scripting-language
- ...

Currently I'm using the first variant, but I don't know which is more
limited, my knowledge of DOS batch or DOS batch itself...
As others have mentioned, Cygwin is a one way to avoid DOS (the best way
is of course to get rid of Windows ;-) . When it comes to more
complicated scripts, my preferred language is Python.


/Lennart

Reply With Quote
  #7  
Old   
Helmut Tessarek
 
Posts: n/a

Default Re: Which scripting language do you use? - 10-19-2010 , 12:11 AM



Quote:
I wonder which scripting language you are using for scripting both
Windows and AIX.
Usually I write all my scripts in ksh or bash, since I don't use any Windows
boxes.
If a script _has_ to run on AIX and Windows, I usually go with perl or php.

cygwin is also an option, but most customers have rather perl than cygwin
installed on their Windows machines.

--
Helmut K. C. Tessarek
DB2 Performance and Development

/*
Thou shalt not follow the NULL pointer for chaos and madness
await thee at its end.
*/

Reply With Quote
  #8  
Old   
Willem Fischer
 
Posts: n/a

Default Re: Which scripting language do you use? - 10-22-2010 , 12:53 AM



On Oct 18, 4:29*pm, Hardy <wyh... (AT) gmail (DOT) com> wrote:
Quote:
For windows, I use cygwin for the Shell environment and you may need a
little effort to configure the cygwin shell to work well with DB2.

I had no problem working with cygwin and DB2 V8 on my personal
machine. Since DB2 9 the connections are not held in cygwin sessions.
Did you find a way around that?

Reply With Quote
  #9  
Old   
Haider Rizvi
 
Posts: n/a

Default Re: Which scripting language do you use? - 11-22-2010 , 09:36 AM



Willem Fischer <w.l.fischer (AT) googlemail (DOT) com> writes:

Quote:
I wonder which scripting language you are using for scripting both
Windows and AIX.

If you need portable code, I'd also recommend becoming proficient in
Perl. Search for Perl DBI, here is one article as a reference:

http://www.ibm.com/developerworks/da...512greenstein/

Regards,
--
Haider

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.