They don't tell how the example PGM1 is looking like, but it seems to be
possible to make a user written programm a prestarted job. Communication
between a listener - acting as dispatcher - and the clients is done by
takedescriptor or via sendmsg() recvmeg(). There are examples available, but
they don't tell how to make it a prestarted job.
In my opinion prestarted jobs where the first attempt for AS/400 to enable
Threading support, without having Threading capable job environments. The
"threads" are implemented by independent jobs, without shared memory to each
other. Sharing information between the jobs is done by the programmer and
some OS400 specific APIs. Later on Unix like thread modell came to AS/400
and since then it was possible to write true multithreaded applications
(with some restrictions to RPG and COBOL).
@Jim: Interesting idea to replace an AJE with a PJE to get automatic restart
capabilities - I didn't try to do so, because there is a very basic
alternative:
create a JOBQ with only one running JOB and let your programm first submit
itself to this Q. Once submitted, it will run forever.
Dieter
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: Prestart jobs... how does it work ?, (continued)
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.