Skip to main content

# Social Security

Search
Menu
Español
Sign in

## 

Office of the Chief Actuary

Detailed Calculator Home

## Batch Versions of the Social Security Benefit Calculators

The batch calculators

We have two versions of a console application (command prompt executable) that             calculates a benefit for multiple cases at one time. One version (anypiab)             reads multiple records from one data file. The second version (anypiac) reads             multiple individual files in the format used by the Benefit Calculator. There             is no user interface; these programs are designed to be used by benefit plan             administrators or similar people who have a need to calculate many benefits.

These applications can be used as they are, or they can be used as a model for             developing programs that interface with a database. To develop the applications             beyond where they now stand, the user would need to download and compile the             source code, available at Source Code for the Social               Security Benefit Calculator.

Running anypiab

The anypiab batch calculator takes as input a file made up of cases in the             usual benefit calculator format. As an example, there is a file named **anypiab.pia**            which is simply the concatenation of all the **sample*.pia** files. If the             input file is in the same directory as the executable, then the anypiab batch             calculator is executed by typing
```
anypiab
```

at a command line, pressing enter, then typing
```
anypiab
```

at a command line and pressing enter. Note that the first anypiab represents **anypiab.exe**. Once that starts the program running, it reads the             second anypiab, appends ".pia", and opens and reads **anypiab.pia**.             Status messages come to the screen, while the results go to a file named **OUTPUT**.             Results consist of one or more lines per case read. The information on each             line of output depends on the type of estimate:

The first line consists of the             Social Security number, the date of birth, the PIA, the MFB, the rounded benefit amount,            the age at benefit date, the PIA factor code, and a true/false indicator for the worker            being insured for the benefit, if it is an old-age or disability case.             There is one additional line for each family member, if any. Each line for a             family member consists of the Social Security number of the worker, the date of birth            of the family member, the PIA, the MFB, the unreduced benefit, the reduced benefit,             the PIA factor code, the BIC, and a true/false indicator for the worker being insured             for the benefit.  

If anypiab is compiled with DETAILS defined, then there is a file named **details.out**            with detailed output.

Running anypiac

The anypiac batch calculator takes as input the name of a file which contains             a list of file names. Each file referenced in the list should contain the data             for one case stored in the usual benefit calculator format. As an example,             there is a file named **anypiac.dat** which is simply a listing of all the **sample*.pia**            files. If the file containing the file names, and all the referenced files, are             in the same directory as the executable, then the anypiac batch calculator is             executed by typing
`anypiac < anypiac.dat`
at a command line. Status messages and results are the same as for anypiab.

Downloading the batch calculators

You may download either or both of the batch calculators. The files in the             table below contain the executable batch calculator and sample input file(s).             (The anypiab files contain anypiab.exe and anypiab.pia; the anypiac files             contain anypiac.exe, anypiac.dat, and sample*.pia.) To download, click one item             from either or both of the following lines:

Files

Self-extracting zip file

Plain zip file

Compiled anypiab

anypiabz.exe                  (503,808 bytes)

anypiabz.zip                  (314,674 bytes)

Compiled anypiac

anypiacz.exe                  (508,416 bytes)

anypiacz.zip                  (318,976 bytes)

Questions or comments

If you have questions or comments about the Detailed Calculator, please visit our      Contact Social Security       page for ways to contact us.  Remember to use "Detailed Calculator" as the subject      so we know which calculator your question or comment refers to.

Footer menu