× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Simon,

Thanks for your thoughts. The application I want to run on the AS/400 runs
in console mode on *NIX and Windows with the primary thread getting input
from the user. I wanted it to run the same way on the AS/400, but I think
this is not possible. I suppose I'll have to develop some type of
interactive console that communicates with the threaded application running
in batch ala QShell and Java.

Patrick


----- Original Message -----
From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Saturday, March 15, 2003 3:38 PM
Subject: Re: No threads in interactive applications?


>
> 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  / \
> --------------------------------------------------------------------
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.