If your company is big enough to have multiple iSeries systems and you need to work with all of them, having distributed
data management (DDM) is the way to go. Your systems need to be connected together to function as a team. With logical partition (LPAR) systems becoming more common, you can use DDM to have one central system and smaller LPAR systems taking care of distributed processing.
Setting up DDM
To accomplish this, we first need to make sure the servers are configured. When you configure the system's logical partitions, you'll be able to set up a very high-speed Ethernet called a virtual Ethernet. This will transport data at speeds greater than 1 GB/sec.
Secondly, we need to make sure the transmission control protocol (TCP) is configured. Once the virtual Ethernet is assigned an IP address (CFGTCP is the command to see this configuration), make sure the DDM server is up and running. After configuring your TCP environment and making sure your data has routes to follow, configure the TCP/IP DDM server to start and set the settings for this via the iSeries Navigator. If you don't have this program, install the complete iSeries Navigator and then look under "Network/Servers/TCPIP/DDM" for the following screen:
You will be asked several questions on how you'd like to secure these connections. If the password is not required, this doesn't mean the connection is unsecured. On both systems, the user ID is required. After that, the user's object access will restrict access to files they shouldn't use as long as those files are properly secured.
The green screen version can be accessed via these steps:
- Type CFGTCP
- Select option 20 for "Configure TCP/IP applications"
- Select option 5 for "Change DDM TCP attributes"
You'll see these settings:
Creating and configuring the DDM file
Once there, you need to configure the DDM file itself via the CRTDDMF, or Create DDM file, command. The limitations of this are:
- Creating a DDM file over the physical file doesn't mean you have access to the logical files. If you want access to the logical files, you'll need to create DDM files over the logical.
- DDM files are not able to be used via SQL. But this can be solved by using a remote connection to your databases.
When you want to connect to remote iSeries systems for SQL access, the system needs to know where to go to fetch this information. For this, you can use the ADDRDBDIRE, or ADD Remote Database Directory Entry, command:
REMOTESYS would be the name of your remote system. JAMESBONDSYS is an alias to help you access your systems without serial numbers. Underneath those are the IP of the remote system and the methodology of connectivity.
You would use the SQL command
to initiate a communication on a SQL level to that system.
With DDM files, for program access you would not change your programs to access the remote systems. The program opens the file, initiates the communication to the remote system and allows for access.
Creating the DDM files is simple. I recommend creating them in a different library so you don't have to change the programs accessing them.
To create this file, type the command CRTDDMF and hit F4 to see the following:
Your remote file will reside in its normal library. In this example, I used QTEMP to show you that the DDM file can be temporary, as long as QTEMP is above your work libraries in your library list.
If you ever want to test this out, on all systems there's an IP address called "Home." If you ever see a t-shirt that says, "There's no place like 127.0.0.1," it's a goof on both The Wizard of Oz and on "Home," which is located at IP address 127.0.0.1. Configure your IP address to "Home," and you'll see this in action.
Finally, we turn back to SQL. It has been configured, and you've setup a remote database entry so that the system knows where to find the information. How do we do this for our SQL RPG programs? Hit F4 to prompt the compile in PDM (option 14) or use the CRTSQLRPGI command and look for the "Relational Database" portion.
Remember what you put into the prompt for the ADDRDBDIRE command? Use that remote system name. This will create a package on that remote system that insures connectivity.
ABOUT THE AUTHOR: Andrew Borts is webmaster at United Auto Insurance Group in North Miami, Fla. He is often a frequent speaker at COMMON and is past president of The Southern National Users Group, an iSeries-AS/400 user group based in Deerfield Beach, Fla.