Here are the steps to make a program that displays the character string "Hello!" on your computer screen.
Hello: proc options(main);
display('Hello!');
end Hello;
Leave the first space of every line blank: by default, the compiler only recognizes characters in columns 2-72. (For additional information, see MARGINS.)
Save the file to disk.
pli hello
The compiler displays information about the compilation on your screen, and creates the object file (HELLO.OBJ) in the current directory.
ilink hello.obj
This combines the file HELLO.OBJ with needed library files (as specified by the LIBS compile-time option), producing the file HELLO.EXE (the executable program) in the same directory.
Since no parameters are specified with the link command, the defaults are used. (The options available with the link command are described in Linking your program.)
hello
This invokes the HELLO.EXE program, which displays Hello! on your monitor.
To make things easier, programmers often put the commands for compile, link, and run together in a command (CMD) file.