473,396 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How do you kick off a DB2 Script in AIX ?

1
I'm new to using DB2 from AIX, and need to run a series of EXPORT commands of the form EXPORT TO /dir/file1.txt OF DEL MESSAGES /dir/file1.msg SELECT * FROM <TABLE> WHERE <CLAUSE>

I would like to be able to create a single script that houses all the EXPORT commands and then invoke DB2 from the command line to run these one after then other.

Can anyone help me with how this is done ?

Thanks,

Prem Isaac
Sep 25 '07 #1
2 2030
dewa81
14
CONNECT TO <dbname>user <userid> using <'password'>;
EXPORT TO /dir/file1.txt OF DEL MESSAGES /dir/file1.msg SELECT * FROM <TABLE> WHERE <CLAUSE>;
<next export command>
..
.
.
.
.
.
commit;
CONNECT RESET;
Sep 26 '07 #2
docdiesel
297 Expert 100+
Hi,

or use a shell script:
Expand|Select|Wrap|Line Numbers
  1. db2 connect to mydb
  2. for var_mytable in "table1 table2 table3"
  3. do
  4.   db2 "export to ${var_mytable}.txt of del  select * from myschema.${var_mytable} ..."
  5. done
  6. db2 connect reset
  7.  
Regards, Bernd
Sep 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: SAM | last post by:
Hi, can any one help me on a quick and efficent start in C sharp? please help me out... best regards, Sam
4
by: John Lee | last post by:
Hi, I developed a scheduler as service and kick off another console application "DTSRUN.exe" to run a dts package ProcessStartInfo psInfo = new ProcessStartInfo(command); Process process =...
3
by: Carl Johansen | last post by:
I'm not sure of the best way to do what I want. Users of my website want to run reports that take a long time to generate. This is what I would like to happen: 1. User requests aspx page 2....
2
by: andrew007 | last post by:
do you know how open/kick a cash drawer of POS system from ASP.NET page using C# ? I have a webpage (asp.net/c#) doing POS functions (Point of sales). Once users click a invoice button the attached...
2
by: Együd Csaba | last post by:
Hi All, I'm wonder if there is any possibility to kick out automatically stuck in queries after say 10 minutes or so? I mean some kind of queries which calls eg. buggy functions with dead loops...
0
by: melledge | last post by:
Ajax Developers' Day to Kick Off XTech 2006 Conference Industry experts offer insight into next generation of the Web ALEXANDRIA, VIRGINIA, USA - April 25, 2006 - In response to the rapidly...
1
by: Martijn Mulder | last post by:
After a short period of fascination, I decided to kick all properties out off my code and return to Get...() and Set...() methods for all my data members. Why? I guess it is just too much fun. And...
5
by: John\\ | last post by:
Okay I have been searching the web for a couple of days now and can not seem to find a solution. I have a USB Epson TM-T88III receipt printer with a Cash Drawer connected to it and I can not...
4
by: nschonhuth | last post by:
Ik hou een access database bij waar meerdere gebruikers op kunnen voor gegevens. Eens in de week wil ik de backend database aanpassen. Het probleem is dat als er iemand in de front end database...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.