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: 7236

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: 1610
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: 331
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: 1610
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: 331
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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