Map z/TPFDF files to MongoDB databases and collections

The data for a remote subfile is stored as a document in a remote data store, which is a MongoDB instance. MongoDB organizes documents into collections and each collection is in a MongoDB database. As a result, the data for each remote subfile is stored as a document in a specific collection and database.

For each z/TPFDF file that you plan to enable for z/TPFDF remote subfile support, specify the MongoDB database and collection for that z/TPFDF file in a remote file descriptor. The same MongoDB database and collection are used for that z/TPFDF file in all remote data stores.

The following example shows a remote file descriptor for two z/TPFDF files, the PNR file, and the inventory file. In this example, both z/TPFDF files use the TPFSystem1DB default MongoDB database. The PNR file is defined to use the PNR MongoDB collection and the inventory file is defined to use the Inventory collection.

{
	"description": "Example remote file descriptor",
	"mongoDBDefaults": {
		"database": “TPFSystem1DB"
	},
	"remoteFiles": [
		{
			"fileName": "PNR File",
			"fileID": "D7D9",
			"mongoDB": {
				"collection": "PNR"
			}
		},
		{
			"fileName": "Inventory File",
			"fileID": "C9E5",
			"mongoDB": {
				"collection": "Inventory"
			}
		}
	]
}

Figure 1 shows how the MongoDB databases and collections from the previous example are defined in two MongoDB remote data stores, RDS1 and RDS2. Both remote data stores have the same databases and collections to match the databases and collections that are specified in the remote file descriptor.

In addition, Figure 1 shows that the z/TPF system stores documents in the remote data stores based on the databases and collections that are specified in the remote file descriptor. The z/TPF system stores remote subfile data for PNR subfile A and PNR subfile C in the RDS1 remote data store as documents in the TPFSystem1DB database and PNR collection. The document for PNR subfile A has a document ID of 1234 document ID. The document for PNR subfile C has a document ID of 5678.

Similarly, the z/TPF system stores remote subfile data for PNR subfile B and inventory subfile M in the RDS2 remote data store.

Figure 1. MongoDB database and collection examples
This figure shows an example of how the MongoDB databases and collections are defined in two MongoDB remote data stores, as described in the surrounding text.