If your program is going to store any of the information that it works with, it needs to use a file. If you plan to work with large amounts of information, typically you use a database or other type of data source for storage and retrieval. Commercial software (such as IBM® DB2®) helps you manage the information that you store in the database
The most common type of database is the relational database. In very simple terms, the information in a relational database resides in tables that can refer to each other. A relational database management system (RDBMS) keeps track of the tables and relationships. You use a special language, called SQL, to communicate with the database manager. Some popular types of RDBMS include IBM DB2, Microsoft SQL Server, Oracle, and the open-source MySQL.
In the mainframe world, it is still common to see hierarchical databases. A hierarchical database contains a tree-like structure, where segments (equivalent to tables) can have a parent segment (only one each) and multiple child segments. IMS™ is an example of a hierarchical database manager, which you can talk to through the DL/I language.
Another option is to use a lower level data structure that is provided by your operating system. Using this type of data source enables you to manage more of the details of data storage and retrieval yourself. IBM MVS™ systems use a file access method called VSAM (Virtual Storage Access Method) that enables you to write directly to several different types of file, including plain sequential access files and indexed files (which keep track of data by means of a key).
The EGL strategy is to provide a few basic commands (like get, which fetches information and puts it into a record) that focus on business logic rather than implementation details. For an overview of how this works, see Reading and writing records.