Thread creation not allowed failure

i5/OS™ does not allow every process on the system to create threads at every time while running.

You can specify special parameters when you create a job. These parameters can indicate that the job should allow multiple threads.

For example, the spawn() application programming interface (API) has a multithreaded flag that can be specified in the inheritance parameter. You can use other ways to submit i5/OS jobs that allow you to specify that the new job should be allowed to create threads. Some job types allow the use of a job description specifying that the job that is started using the job description should be allowed to start threads. To do this, use the Allow Multithread (ALWMLTTHD) parameter on the Create Job Description (CRTJOBD) or Change Job Description (CHGJOBD) commands.

If you attempt to create a thread in a job that is not capable of starting threads, thread creation fails. See your API or language specific documentation for details on how the failure is manifested.

The same failure recurs if your application is running the destructors for C++ static objects or C/C++ program termination routines. Application code cannot create threads when the job is ending.