|
Hello Patrick, You wrote: >I would like to use Posix threads in a C++ application on the AS/400, but >it appears that this is not allowed? Has anyone gotten this to work? I've >seen IBM interactive jobs run with threads (QShell, Java). But I can't seem >to find a way to do this myself and I don't want to use QShell. Any >thoughts? You can use Posix threads. Threaded jobs are intended to run ONLY in batch jobs (either BCH or BCI). Even though Qshell and Java applications are multi-threaded they aren't running in the interactive job. A BCI job is started and this is where the Java application and the various shell scripts and programs run. The associated interactive job is used simply to accept input and display output. You can start your threaded application via SBMJOB and specify ALWMLTTHD(*YES) or use a job description that specifies ALWMLTTHD(*YES). You can also spawn your threaded application using one of the spawn() APIs and setting the SPAWN_SETTHREAD_NP flag. This API will start a BCI job in which a threaded application can run. Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 mailto: shc@xxxxxxxxxxxxxxxxx \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
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.