473,387 Members | 1,578 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,387 software developers and data experts.

How to get output of queries to files at runtime

Hi All
I had been going through quite a lot of the articles but didn't come across the situation I am facing now.

I want to run some queries that I have in an input file.
I want the out of all those queries in separate output files.

Example
I have query1, query2, query3 loaded in a file named as input.txt. Now I want the output of query1 to come in output1.txt, output of query2 to come to output2.txt and so on.

I tried to use db2 -tvf input.txt -z <output filename>

But the output of all the queries is coming in 1 single file. I want to change the output file at runtime with the queries.

Can anybody provide me any idea on this.

Thanks a lot in advance
Oct 11 '11 #1
0 1554

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

Similar topics

2
by: gerarcone | last post by:
Hi to all, I have only few knowledges about C++, and my programs run only in console; I haven't studied yet classes. I should create a little program to manage some numerical data, but I need to...
0
by: David | last post by:
Could someone help me turn this program into a program that accepts files(database) as an input and writes to a file as method of saving the database information? #include <stdio.h> #define n...
1
by: Aaron West | last post by:
Try this script to see what queries are taking over a second. To get some real output, you need a long-running query. Here's one (estimated to take over an hour): PRINT GETDATE() select...
1
by: mgonzales3 | last post by:
I have a windows app that i want to be able to run at the cmd line. Using vs2005 can I determine the Output Type at runtime? or can I set this value at runtime? thanks
3
by: maradona | last post by:
Hi!!!! I have some results in a results.txt file like this #-50#-49#-48#-47#-46#-45#-44#-43#-42#-41#-40#-39#-38#- -9#-8#-7#-6#-5#-4#-3#-2#-1#0#1#2#3#4#5#6#7#8#9#10#11#...
12
by: vj | last post by:
I am using Borland C++. I run a program which generates output data files, say 'Voltage.dat', 'Current.dat'. I have a variable in my code (say N), and for various values of N (for each value of...
4
by: maria | last post by:
I only use C++ with Visual Studio 6.0 for string manipulations in thousands of HTML pages on my website. Many times, the output files of many of my C++ programs contain a spanish question mark (¿)...
3
by: Tim | last post by:
Hi Folks, I'm used to a UNLOAD command that allows me to dump to a named flat file the results of any SELECT statement. Hence one can build a single SQL file which contains multiple SQL...
2
by: as001 | last post by:
Hi, I'm writing a windows application in C# using VS 2003. I got stuck where it has to write multiple output text files. Here's my piece of code: for loop { Random r = new Random();...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.