Iron Spring PL/I 1.3.0 Sample Programs

This is a brief description of the sample files distributed with Iron Spring PL/I Version 1.3.0. The samples are distributed free of any licenses or restrictions. Unless otherwise indicated all sample programs will compile and run on Linux and OS/2.

The comments in each program contain information on using the program. In the following, "<PLI>" is the name of the directory where you have unpacked the compiler and library, for example "pli-1.3.0".

Linux

  1. Test the sample programs. In this release only static linking is supported. CD to the "samples" directory and type "make -f Makefile.Linux" without the quotes, case is significant.. The sample programs "isub", "numwrd", "filedump", "libver", "print_listing", and "task" build to executables, the remainder should generate object files.
  2. Test numwrd. Enter "./numwrd 123". The program should display the result "one hundred twenty-three".
  3. You might want access to the %INCLUDE files in "pli-1.3.0/lib/include" or "pli-1.3.0/samples" for your own programming.

OS/2

Each program should have run instructions in the comments in header in the source.

List of sample programs

area.pliTest AREA functionality
encard.pliConvert text file to ENV(F RECSIZE(80)).
filedump.pliProgram to dump a ENV(VARLS) file in hex and characters.
hanoi.pli"Towers of Hanoi" batch version.
hexdump.pliCallable procedure to print a hex/character dump of a selected area of memory.
isub.pliSample of iSub-defined arrays
keysamp.pliSample program to create and read a KEYED file
libver.pliProgram to display the current version of the PL/I library.
numwrd.pliCommand-line program to print a number in words.
print_listing.pliSample program to print a PL/I compiler listing on a PCL printer.
readu.pliExample of reading a file declared with ENVIRONMENT(U).
refsamp.pliExample of use of self-defining structure.
ReferTest.datData file for refsamp.
samples.htmlThis file.
sorttest.pliProcedure to test PLISRTD
sort.datTest data for sorttest
task.pliExample of PL/I multitasking. The OS/2 version runs in a VIO window, the Linux version must run in a Linux console, not an xterm.
vfile.datSample input for filedump
 
Linux only samples
spawn.pliProcedure to FORK and EXEC a child process.
spawntest.pliTest program for spawn.
loadsamp.pliSample program to load an ISAM file.
Sample creates two files DIREC.I and DIREC.D in the samples directory.
loadsamp.datSample data for loadsamp.
updtsamp.pliSample program to update an ISAM file.
updtsamp.datSample data for updtsamp.
Makefile.isamMakefile to compile and run ISAM sample programs].
Makefile.LinuxMakefile to build all Linux PL/I sample programs.
 
OS/2 only samples
filefind.pliOS/2 program to locate the directory entry for a file.
pmhanoi.pli"Towers of Hanoi" as an OS/2 presentation manager program.
sample.defOS/2 module definition file used for all sample programs except pmhanoi.
pm.defOS/2 module definition file used for the pmhanoi sample program.
bse.incSome PL/I declarations for OS/2 system calls. Additions always welcomed.
 
Makefiles and miscellaneous
LC_make, LCC_make, SA_makeSample makefiles for Linux giving examples of compiling and linking a PL/I program. LC_make links the compiled program with libc, but uses PL/I's malloc and free. LCC_make links with libc and uses libc's malloc and free. SA_make links a PL/I program without libc.
Makefile.OS2DLLMakefile to build all OS/2 PL/I sample programs using the PL/I runtime DLL.
Makefile.OS2StaticMakefile to build all OS/2 PL/I sample programs using the statically-linked PL/I runtime.

Iron Spring PL/I version 1.3.0, 15 15 Apr 2024
[36 files]