          Notes on Compiling the Fortran Version of the PIA Program  


1.    The current version of the PIA program in FORTRAN differs from the C++
version in several respects:  the screen-handling is not as sophisticated,
there is no ability to change the computation year from within the program, and
there is no ability to delete a saved case.  However, the FORTRAN version can
calculate the effect of 28 changes from present law; the C++ version cannot.
In all cases that the two versions can both run, they should produce the same
results.

2.    The FORTRAN source code is distributed in 3 subdirectories:  bprog, 
miscprog, and utils.  The bprog subdirectory contains the files necessary to 
create a library of functions dealing with the calculation of Social Security 
benefits:  28 files ending in .f (FORTRAN code) and 9 files ending in .h 
(include files).  There are also 2 files (bprog.dsp and bprog.dsw) that work 
in conjunction with the Digital FORTRAN compiler to create a library from 22 
of the 28 FORTRAN files.  (4 of the FORTRAN files are BLOCK DATA subroutines 
that must be directly included in the linking of the main program; see the 
next item for why 2 other FORTRAN files are not in the library.)

3.    The FORTRAN version has been compiled and tested in the environments
listed below.  All system-dependent features (except the format of the INCLUDE
statement) have been isolated in one file, as indicated.

              Operating system and compiler               File

      Windows NT4, using Digital FORTRAN                  pc.f
      UNIX, using LPI FORTRAN                            unix.f
      IBM mainframe                                       ibm.f

Use only the file appropriate for your system.

4.    The FORTRAN source code files have an extension of '.f', which is
acceptable in the UNIX and Windows environments.  For the IBM mainframe,
there is no extension; each module should become a member of a partitioned
dataset.

5.    The INCLUDE statement is used in most of the modules.  It is set up as
required for the Digital and LPI FORTRAN compilers:

      INCLUDE 'commona.h'         (starting in column 7)

For the IBM mainframe version, change each INCLUDE to appear as

      INCLUDE (COMMONAH)

where COMMONAH is a member of the partitioned dataset containing all of the
other source code modules.

6.    The utils subdirectory contains 3 files ending in .c (C code).  These 
files contain utility functions unrelated to the calculation of Social 
Security benefits, but necessary for the smooth operation of the program.
The utils subdirectory also contains 2 other files (utils.dsp and utils.dsw)
that work in conjunction with the Microsoft C/C++ compiler, version 5.0, to 
create a library.

7.    The miscprog subdirectory contains 20 files ending in .f (FORTRAN code). 
These files contain all the code for interaction with the user.  The miscprog 
subdirectory also contains 2 other files (anypia.dsp and anypia.dsw) that 
work in conjunction with the Digital FORTRAN compiler to create an executable 
program from the 20 FORTRAN files in the miscprog subdirectory, the bprog 
library, the utils library, and the 4 BLOCK DATA subroutines in the bprog 
subdirectory.

8.    There is a third subdirectory, pia, that contains the compiled
program (anypia.exe) and 6 required data files.


                                                Social Security Administration
                                                Office of the Actuary
                                                October 22, 1997
