Using the z/OS XML parser in a multithreaded environment

The z/OS XML parser can be called from multiple work units (threads/tasks or SRBs) to parse multiple documents at the same time, provided that each parse utilizes a unique Parse Instance Memory Area (PIMA). Multiple work units must not utilize the same PIMA simultaneously, or the z/OS XML parser will behave unpredictably. As long as the caller has a separate PIMA that has been initialized by the z/OS XML parser for each document being processed, multiple documents can be handled simultaneously. A caller may choose to preallocate a pool of PIMAs to be used for parse requests. It is the responsibility of the caller to allocate the PIMA in a subpool that will not be cleaned up while the PIMA is in use. Subpools tied to the job step task are recommended.