Object program linkage
You can combine two or more object modules, whether generated by the assembler or by another language processor, to produce a single load module. The object modules can be combined by the linkage editor, or z/OS® binder, provided each object module conforms to the data formats and the required linkage conventions. This makes it possible for you to use different programming languages for different parts of your program, allowing each part to be written in the language best suited for it. Use the CALL system macro instruction to link an assembler language main program to subprograms produced by another language processor. Refer to the z/OS MVS Programming: Assembler Services Reference for details about linkage conventions and the CALL system macro instruction.
Figure 1 is an example of statements used to establish the assembler language program linkage to subprograms. See the applicable language programmer's guide for information about calling the language from an assembler language program.
ENTRPT SAVE (14,12)
LR 12,15
USING ENTRPT,12
ST 13,SVAREA+4
LA 15,SVAREA
ST 15,8(,13)
LR 13,15
⋮
CALL subprogram-name,(V1,V2,V3),VL
⋮
L 13,SVAREA+4
RETURN (14,12)
SVAREA DC 18F'0'
V1 DC CL5'Data1'
V2 DC CL5'Data2'
V3 DC CL5'Data3'
END