Creating the parallel functions load module
The parallel functions load module is the load module named in the call to the MTF library function tinit(). This single load module contains all of your main task program’s parallel functions. It must not contain any user’s C main() programs. z/OS® XL C itself provides the EDCMTFS module to act as the C main() function in the parallel module. EDCMTFS controls processing of the parallel functions as they are scheduled (by way of tsched() calls) to the subtasks. The source code for the EDCMTFS module is included in Figure 1.
The procedures that you usually use to compile and link-edit a z/OS XL C program must be modified such that the library module CEESTART will be the entry point of the parallel functions load module.
INCLUDE SYSLIB(EDCMTFS)
ENTRY CEESTART
For example, the JCL sequence in Figure 1 uses the standard z/OS XL C cataloged procedure EDCCL to compile and link-edit the C source for the parallel functions and create a parallel functions load module named PLMOD in data set USERPGM.LOAD. This load module contains the module EDCMTFS, and has EDCMTFS as the load module’s entry point.
//MTASKPGM EXEC EDCCL,
// INFILE='CBC.SCCNSAM(CCNGMT2)',
// OUTFILE='USERPGM.LOAD(CCNGMT2),DISP=SHR'
//*
//PFUNC EXEC EDCCL,
// INFILE='CBC.SCCNSAM(CCNGMT3)',
// OUTFILE='USERPGM.LOAD(PLMOD),DISP=SHR'
//LKED.SYSLIN DD
INCLUDE SYSLIB(EDCMTFS)
ENTRY CEESTART
/*
The addressing mode is subject to normal consideration as described in the z/OS Language Environment Programming Guide.