JCL can be submitted by a CICS transaction to a partner JES region via the internal reader using one of the following methods:
Define a TDQ by configuring an associated DCT resource definition as the type IntReader and write your JCL, record by record, using the EXEC CICS WRITEQ TD API directed to that TDQ. Multiple jobs can be written to the queue, each delimited by a record containing /*EOF in columns 1 to 5. To ensure that your job stream does not get interleaved with another user's job stream, access to the TDQ should be serialised using the CICS ENQ and DEQ facilities.
Open the spool using the EXEC CICS SPOOLOPEN USERID('INTRDR') NODE('LOCAL') API and use the SPOOLWRITE API to write your JCL statements. The SPOOLCLOSE API is used to terminate the job stream and cause the JCL to be submitted. CICS will handle the serialisation of the spool.To Configure a Partner JES Region with SSTM