It's been so long ago that I looked at threads that I don't even remember what I thought I needed them for. In the end we went with the multiple jobs solution just because it would be easier to maintain if someone had to come behind me and figure out what was going on. That said, the example RPGLE programs from IBM do work.
https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_71/rzasc/sc092507212.htm#wq345
On Thu, 2020-08-20 at 14:23 -0400, Jon Paris wrote:
It can probably be done. But why bother?
The notion advanced earlier of having a server job that can spin off as many jobs (i.e. threads) as needed to process the data based on the system load at the time works just fine.
RPG was not designed to be a threaded language and even to safely call it from a threadsafe language requires care.
Use the tool for the job.
On Aug 20, 2020, at 2:10 PM, Mohammad Tanveer <
<mailto:surgum@xxxxxxxxx>
surgum@xxxxxxxxx
wrote:
I did look into multi-threading for RPG within one job but didn't find any
good examples. I think it's doable. I think the best way to start
multiple threads in one job is to create a Java process to call RPG
programs and start threads in java, of course make sure rpg programs are
thread safe.
On Thu, Aug 20, 2020 at 11:51 AM Stephen Piland <
<mailto:Stephen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Stephen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
wrote:
Does anyone have a real world example of this? A link or anything?
I'm trying to decode a very large number of element JSON using DATA-INTO
and it using YAJLINTO as the %parser. Each file on the IFS is one
transaction/message and can have over 3k individual elements. Each message
has 2 big blocks of elements split about 50/50. Each half of the message
end up writing out to separate group of PFs. Can I process each half
simultaneously and not have to submit a ton of separate jobs? Just trying
to speed the process.
Any thoughts would be appreciated! Thanks!
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email:
<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
<
https://lists.midrange.com/mailman/listinfo/rpg400-l>
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email:
<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
<
https://archive.midrange.com/rpg400-l>
https://archive.midrange.com/rpg400-l
.
Please contact
<mailto:support@xxxxxxxxxxxxxxxxxxxx>
support@xxxxxxxxxxxxxxxxxxxx
for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link:
<
https://amazon.midrange.com>
https://amazon.midrange.com
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email:
<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
<
https://lists.midrange.com/mailman/listinfo/rpg400-l>
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email:
<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
<
https://archive.midrange.com/rpg400-l>
https://archive.midrange.com/rpg400-l
.
Please contact
<mailto:support@xxxxxxxxxxxxxxxxxxxx>
support@xxxxxxxxxxxxxxxxxxxx
for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
<
https://amazon.midrange.com>
https://amazon.midrange.com
[
https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
As an Amazon Associate we earn from qualifying purchases.