Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

Sample program to build a DLL

The sample programs SORT.PLI and DRIVER1.PLI show how to build and use a DLL that contains three different sorting functions. These functions keep track of the number of swap and compare operations required to do the sorting.

The files for the sample program are:

SORT.PLI
The source file for the DLL.
SORT.DEF
The module definition file for the DLL.
DRIVER1.DEF
The module definition file for the executable.
EXTDCL.CPY
The user include file.
DRIVER1.PLI
The main program that uses SORT.DLL.

If you installed the sample programs, these files are found in the ..\SAMPLES\ directory.

Use the following sequence of commands to compile, link, and run the program:

  1. pli sort
  2. ilib /geni sort.def
  3. ilink /dll /out:sort.dll sort.obj sort.exp
  4. pli driver1
  5. ilink driver1.obj /stack:80000 sort.lib
  6. driver1

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)