Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 7315

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: 1737
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: 378
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: 1737
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: 378
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us