View previous topic :: View next topic
|
Author |
Message |
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
In batch processing, there is a file , with volumes of records in it, and need to be processed by cobol program and then inserted into a table.
If I use only one program to process the file from beginning to end, a lot of time will elapse . And such a long processing time is not acceptable.
so, is there a way to implement this by so called multi-thread processing?
That is , several programs process the file simutaneously, and each program only process specifiled portion of the file.
Thanks for your kind advice in advance. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Of course. Code it. Or split the file and run multiple times.
You're not going to sit down and write something in batch to actually manage the multi-threading, are you? |
|
Back to top |
|
|
dejunzhu
Active User
Joined: 08 May 2008 Posts: 390 Location: China
|
|
|
|
Bill Woodger wrote: |
Of course. Code it. Or split the file and run multiple times.
You're not going to sit down and write something in batch to actually manage the multi-threading, are you? |
Actually, I am the one to design and code this.
Would u please advise some solution on how to code it? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
Quote: |
In batch processing, there is a file , with volumes of records in it, and need to be processed by cobol program and then inserted into a table. |
I would suggest you to create multiple load files and concatenate and then use the load utility to load it instead to make it by a COBOL-DB2 , I don't think anything faster than this. |
|
Back to top |
|
|
seagull
New User
Joined: 28 May 2007 Posts: 24 Location: Dublin
|
|
|
|
What is the structure of the file? VSAM, flat file, something else? Your solution will depend on that. |
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
Quote: |
need to be processed by cobol program and then inserted into a table |
I believe it's Not the same file which is processed and inserted. is it ?
If you are processing a large file in a cobol program and generating an output file to load the table and you are worried about the time taken in processing, then the best way is to split the input file in n number of parts (say 10). Then, run multiple jobs (equal to n) 'concurrently' using the same program but different input files.
This way you'll get multiple output files. Concatenate and Load.
. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
RahulG31, We both are on the same page , ain't we? |
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
@Rohit: From the language, it seemed to me that there is a file which needs to be loaded into the table and the same file is used to process and create output records from cobol program (separately). I thought these were 2 separate processes. Sometimes, reading multiple times may give multiple meanings to the same sentence.
I think it was a wrong interpretation by me but if you 'only read the words in bold', you'll know what I mean
Quote: |
In batch processing, there is a file , with volumes of records in it, and need to be processed by cobol program and then inserted into a table. |
|
|
Back to top |
|
|
|