Progress/400
Product Guide


Progress/400 and Distributed Data Management

Distributed Data Management (DDM) is an AS/400 facility that allows DB2/400 files from one AS/400 to be accessed by other AS/400s. The High Level Language programs RPG, COBOL, C, as well as 4GL programs written by the Progress 4GL can access these DDM files. Progress/400 DataServer supports DDM files that reference either physical or logical files. The following section documents how to access DDM files from the Progress/400 DataServer and from the Progress/400 native clients.

DDM Files

DDM files are like pointer objects. They point to actual physical or logical files on a remote AS/400. DDM file access uses SNA over an APPC network. It is possible to use TCP in place of SNA.

Figure 2–1 shows the DDM architecture.

Figure 2–1: DDM Architecture

In Figure 2–1, assume that SYSTEMB has one physical file, CUSTOMER, and one logical file or index, NAME, in the library SPORTS. In this example suppose programs executing on SYSTEMA need access to these files for some function. For the simplest access, create the DDM files on SYSTEMA into the library SPORTS. To do this, execute the following commands on SYSTEMA:

CRTLIB LIB(SPORTS)

CRTDDMF FILE(SPORTS/CUSTOMER) RMTFILE(SPORTS/CUSTOMER) RMTLOCNAME(SYSTEMB)

CRTDDMF FILE(SPORTS/NAME) RMTFILE(SPORTS/NAME) RMTLOCNAME(SYSTEMB) 

After you execute these commands, library SPORTS on SYSTEMA contains 2 DDM files, named exactly the same as the physical and logical files on SYSTEMB. When the DDM files are opened on SYSTEMA, the data is retrieved from SYSTEMB. This is the simplest DDM implementation. You also can add Progress/400 to this design.

Progress/400 and DDM Files

For the purpose of adding Progress/400 to the design in Figure 2–1, assume that SYSTEMB has a library of files that must be accessed from SYSTEMA using the Progress/400 DataServer. Assume these files reside in the library SPORTS. In order to allow Progress/400 access to these files, you must pull their definitions into Progress/400 using the Progress/400 command CHGPRODCT. This command pulls the definitions of DB2/400 files into an existing Progress/400 Server Schema. To allow Progress/400 to assess the files in the library SPORTS, use the following commands on SYSTEMB:

ADDLIBLE PROGRESS *LAST

DUPPRODB NEWDB(SPORTSDL) FRMDB(*PROEMPTY)
   				/* this command creates a Progress/400 Dictionary Library 
				called SPORTSDL. */ 

CHGPRODCT PRODCT(SPORTSDL) FRMFILLST((*ALL SPORTS))
  				/* this command pulls the file definitions of the files 
				in SPORTS into the Server Schema in library SPORTSDL. */  

Once you have executed these commands and created a schema holder, Progress 4GL programs can now access the files on SYSTEMB. However, the Progress/400 DataServer must be executing on SYSTEMB first. In order to gain access to the files in library SPORTS from SYSTEMA, follow these steps:

  1. On SYSTEMB, save the SPORTSDL library to tape or a save file using the SAVLIB command.
  2. On SYSTEMA:
    1. Restore the library SPORTSDL using the RSTLIB command.
    2. Execute the following command:
    3. CRTLIB SPORTS 
      

    4. For each physical and logical file in the library SPORTS on SYSTEMB, execute the following:
    5. CRTDDMF 				FILE(SPORTS/filename) RMTFILE(SPORTS/filename)
      					RMTLOCNAME(SYSTEMB)
      CRTDDMF FILE(SPORTS/filename1) RMTFILE(SPORTS/filename1)
      					RMTLOCNAME(SYSTEMB) 
      

      Continue until you have created all the DDM files.

Once you have successfully created the DDM files, the Progress/400 DataServer can access the Progress/400 dictionary library SPORTSDL on SYSTEMA. Now that the SPORTSDL library exists on SYSTEMA, you must create a client schema holder so that the Progress 4GL can access it. Once this is complete, connect to SPORTSDL using the CONNECT statement with the -is parameter added to the connection parameters. This parameter prevents Level Checking, which cannot be used when accessing DDM files. The following commands show a sample connection with the additional -is parameter:

CONNECT SPORTSH -1.
CONNECT SPORTDL -H SYSTEMA -H USER -P PASSWD -N TCP -S service -is. 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095