Creating instances of a program


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Creating instances of a program
# 1  
Old 05-25-2005
Creating instances of a program

Hi,
Presently I have script #!/bin/ksh in which 4 executables are executed
as 1,2,3 and 4.Executable 2 is an extract program which extracts records from a table.and executable 4 is a program that updates a database.
Currenlty this process takes a hell lot of time and my aim is to reduce the overall execution time.
Smilie I want to change executable 2 to process only say 100 records.Suppose there 500 records in a database,I want to run 5 instances of executable 2 in parallel.I also want to make use of these 5 instances to update my database by passing the output of each of the 5 instances to executable 4.In other words,I also want to split executable 4 into same number of instances as executable 2.

Smilie I have another problem here :
I want to merge the output files of 5 sub program ,attach a header and trailer and then FTP it.Is this going to be time consuming ?

Can anybody help me how it is possible ? Is this approach correct to cut down the timing of the entire process ?
Please advise.
Thanks
Unixcurious

Link removed

Last edited by Perderabo; 05-25-2005 at 11:33 AM.. Reason: Remove link
# 2  
Old 05-25-2005
We do this all the time for database batch processing.
The executables are going to have to be able to take parameters - from the command line, a file, or an environment variable. Then the parameter is passed into the executables as they run.

For example -

When we bill, the billing cycles are broken into 12 sub-cycles. This makes the process run ~12 times faster - if there are 12 cpu's and the database supports high volume transaction rates - we use Oracle. Our cycle bill time is 30 minutes instead of six hours.
pseudocode example:
Code:
bill 0100 &
bill 0101 &
....
bill 0111 &

When all the jobs are done we ftp the files over to another box to print bills.
# 3  
Old 05-25-2005
tushar_johri, please don't post your webite link in a psuedo signature like that. You can post a link to your in our News, Links, Events, and Announcements forum if you want.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Creating a .profile, displaying system variables, and creating an alias

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Here is what I am supposed to do, word for word from my assignment page: 1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies

2. Shell Programming and Scripting

Replace other instances except the first one

Hi Friends, This is my input track type=alpha name="omega" fixedStep chrom=chr10 name="omega" 1 2 3 34 4 4 44 4 4 34 5 5 566 6 (1 Reply)
Discussion started by: jacobs.smith
1 Replies

3. Programming

Dynamically creating structure in C/C++ program

Hi, For one of the project which i am working on i need to write a cpp code such that it will create the structure dynamically instead of reading it from header file. For example we have a program which is reading a binary file according to the structure mentioned in header file. But we... (0 Replies)
Discussion started by: AmbikaValagonda
0 Replies

4. Shell Programming and Scripting

Creating Printing Program in bash

HI I am trying to create a bash script to print whatever i type in It has to have these below to define the size of the label and what size to print the text N q609 A100,10,0,5,2,2,N," " P1 It has to be sent to below > /dev/usblp0 So what it has to be is Written... (12 Replies)
Discussion started by: bganse
12 Replies

5. UNIX for Dummies Questions & Answers

Help with creating a simple program!!

i am new to shell scripting!! i am making this program in bourne shell, that asks the user to input "Hello (their name)" or "question (their name)", any other input, "ERROR" will be outputted. if they input "Hello (name)", i want to out saying Hello (name) but if they input "question (name)", i... (4 Replies)
Discussion started by: bshell_1214
4 Replies

6. Programming

Control multiple program instances - open multiple files problem

Hello. This shouldn't be an unusual problem, but I cannot find anything about it at google or at other search machine. So, I've made an application using C++ and QtCreator. I 've made a new mime type for application's project files. My system (ubuntu 10.10), when I right click a file and I... (3 Replies)
Discussion started by: hakermania
3 Replies

7. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

Hi, Can someone help me with creating a bash shell script. I need to create a script that gets a positive number n as an argument. The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies

8. Shell Programming and Scripting

Creating simple shell program

Hi, I'm new to UNIX shell programming... can anyone help in doing the following : 1) create a text file named "Model File" having following columns : Name Number Physics Chemistry 2) prompt user to n rows enter the name, number, physics ,chemistry 3) display the entire columns and rows... (1 Reply)
Discussion started by: Mayuri P R
1 Replies

9. Shell Programming and Scripting

kill multiple instances of the same program

Hi, I know that the answer to this is very simple, since I saw somebody do it some time back..but I forgot how. The problem is, I have multiple instances of the same program running simultaneously and I want to kill them all in a single command. I know that it can be done using awk '{print... (12 Replies)
Discussion started by: ipzig
12 Replies

10. Programming

problem in creating executable for a client program

Hi, I am trying to run simple client server c program in unix.At the compling stage server is creating an executable but the client is not. below is the link to the source codes: http://www.cs.rpi.edu/courses/sysprog/sockets/server.c http://www.cs.rpi.edu/courses/sysprog/sockets/client.c ... (2 Replies)
Discussion started by: konas
2 Replies
Login or Register to Ask a Question