Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to implement multi-thread processing of a file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sat Oct 31, 2015 2:15 pm    Post subject: how to implement multi-thread processing of a file
Reply with 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.

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
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7312

PostPosted: Sat Oct 31, 2015 3:01 pm    Post subject: Reply to: how to implement multi-thread processing of a file
Reply with quote

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
View user's profile Send private message
dejunzhu

Active User


Joined: 08 May 2008
Posts: 390
Location: China

PostPosted: Sat Oct 31, 2015 6:51 pm    Post subject: Re: Reply to: how to implement multi-thread processing of a file
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2267
Location: NY,USA

PostPosted: Tue Nov 03, 2015 3:28 am    Post subject:
Reply with quote

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
View user's profile Send private message
seagull

New User


Joined: 28 May 2007
Posts: 24
Location: Dublin

PostPosted: Tue Nov 10, 2015 11:26 pm    Post subject:
Reply with quote

What is the structure of the file? VSAM, flat file, something else? Your solution will depend on that.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 447
Location: USA

PostPosted: Wed Nov 11, 2015 12:15 am    Post subject: Reply to: how to implement multi-thread processing of a file
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2267
Location: NY,USA

PostPosted: Wed Nov 11, 2015 12:23 am    Post subject:
Reply with quote

RahulG31, We both are on the same page , ain't we?
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 447
Location: USA

PostPosted: Wed Nov 11, 2015 1:23 am    Post subject: Reply to: how to implement multi-thread processing of a file
Reply with quote

@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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to place name of the file where t... danielgp89 DFSORT/ICETOOL 10 Thu Oct 17, 2019 12:55 am
No new posts Need help in parsing record in VBA file guptae DFSORT/ICETOOL 4 Fri Oct 11, 2019 2:31 pm
No new posts What 'EF' in the CAFC command REGION,... vrkratheesh CICS 2 Wed Sep 18, 2019 4:52 pm
No new posts Can we pass the value of Symbolic par... Poha Eater JCL & VSAM 5 Thu Sep 05, 2019 2:21 pm
No new posts Search the strings present in ps file... Bhuvana Narasimhan All Other Mainframe Topics 8 Thu Aug 22, 2019 8:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us