You are here: Development Standards > Upgrading OSAS > OSAS 4.5x Upgrade Procedure > Add Documents for Master Files

# Add Documents for Master Files

Many master files have a master documents file associated with them, which allows users to associate documents with individual records in the master file. For example, customers, vendors, and employees all have document files associated with them.

To add user documents to your application, follow these steps:

1. Create a file using the name of the master file with a .UD extension (for example, ARCUx.UD and APVEx.UD). Make sure the key structure follows the structure of existing user document files. The first field of the file is the primary key of the master file, and the second field is always a length of 3.
2. Create the necessary string template for the .UD file, and make sure to include this template in the application xx.TPL merge file.
3. Add logic to the master file's maintenance programs to call the generic GENACDOC.PUB program.
4. If you plan to use GENVWDOC.PUB, you must create an application specific xxVWDOC.PUB program to prepare for the call to GENVWDOC.PUB. This program is most commonly called by the Shift+F2 Information functions. Use one of the existing application's xxVWDOC.PUB programs as a model when creating a program for a new application.