

# Applications that share programs
<a name="shared"></a>

The following diagram illustrates mainframe applications A and B that run a shared program called program AB.1. This case is also applicable when applications A and B include programs that call shared subprograms.

 ![\[Mainframe applications that share programs\]](http://docs.aws.amazon.com/prescriptive-guidance/latest/modernization-mainframe-decoupling-patterns/images/shared.png) 

**Steps for analysis**

1. Perform an impact analysis of the shared program AB.1, so you can migrate applications A and B, and program AB.1 together. We recommend using the discovery tools listed in the [Additional resources](resources.md) section to automate the analysis.

1. Based on the impact analysis, identify the number of dependent applications that use shared programs such as program AB.1.

1. (Recommended) Complete a business domain analysis to determine whether the shared program can be aggregated into a domain with applications and exposed as an API as one of the domain services.

You can use one of the following approaches to decouple the applications in preparation for migration:
+ [Use a standalone API](api.md)
+ [Use a shared library](library.md)
+ [Use a message queue](queue.md)