On UNIX,
mfplx and
ldpli support two new synonymous flags, -dll and - so on all platforms.
To compile a program which is to be used as a fetchable procedure, use the following command:
mfplx -dll -defext myfetch.pli
If you fetchable program contains a subroutine, the syntax is:
mfpli -defext suba.pli -o suba.obj
mfplx -dll -defext myfetch.pli suba.obj -o MYFETCH.so
Note: Use the output extension appropriate for you operating system.
You can use the -dll and -so flags with the
ldpli command in the following way:
ldpli -dll myfetch.obj suba.obj -o MYFETCH.so
Note: The output executable image is in upper case. By default, Open PL/I generates uppercase external references so the source statement in your main program
fetch myfetch; will cause a search for the executable
MYFETCH.so. If it is linked as
myfetch.so (lower case), it will not be found and ONCODE 9250 will be triggered.
Note: The compiler options -mvs, -ims, -cics should only be used for the OPTIONS(MAIN) programs. The use of -dll
or -so
indicates that it is a dynamically linked called subroutine. For more information, see
Restrictions.