Progress/400
Product Guide
DATALIB Argument Usage Notes
The DATALIB argument to the -Dsrv parameter controls how the DataServer opens DB2/400 files. By default, DB2/400 files are opened in the library specified by the library name stored in the P__FILE server schema file. Progress/400 sets up this library name when you create a file using the Progress/400 Data Dictionary or when the
CHGPRODCT
command places the file definition into the server schema. The DATALIB connection parameter expands how the DataServer locates files.When using this argument with the CONNECT statement, use the following syntax:
You must enter VALUE in capital letters. You can specify either an explicit library name or the value *LIBL. Do not insert spaces before or after the equal sign (=).
Suppose, for example, that you connect without specifying an explicit library name, and the library defined in the P__FILE is named TEST. You now execute the following
CHGPRODCT
command, which executes for the Dictionary Library named DCTLIB:
This
CHGPRODCT
command places all valid file definitions from the library TEST into the server schema of the Dictionary Library DCTLIB. Now suppose that you instead connect as shown in the programPGM1.P
:
The DataServer now opens all files during this connection in the library PROD rather than in the library TEST.
The following example illustrates the use of the DATALIB value *LIBL. Suppose that you connect as shown in the program
PGMA1.P
:
Because you specified *LIBL as the DATALIB value, the DataServer opens files during the current connection based on the DataServer’s library list. Now suppose that you execute the following query:
Assuming that the CUSTOMER file exists in library CUSTLIB, it is opened for this library. Notice how the library list was set up in PGMA1.P before any files are opened. This is important: if a file opens before the library list is established, the DataServer might not open the desired file. By specifying *LIBL as the DATALIB, the DataServer performs file opens based on library list, just as RPG does.
CAUTION: Do not use the Ignore Stamp (-is) switch when using -Dsrv DATALIB=VALUE. Progress does not perform file-level checking when the DataServer connects using the -is switch, and if you specify DATALIB in conjunction with the -is switch, it might open an incorrect file. For example, in the example program PGM1.P (shown earlier in this section), suppose that the library TEST contains a CUSTOMER file for the AP application and the library PROD contains a CUSTOMER file for the distribution application, and that each of these files has a different record format. Because Progress does not perform file-level checking, the DataServer might open a file in a different library than the one you specified with CHGPRODCT, resulting in data corruption.Note that the DATALIB argument does not work with virtual tables. If you specify this argument, logical files that Progress/400 treats as a virtual file cannot be found if they were not in the Dictionary Library, specified when you created the server schema. In this case, the following error messages appear:
Database Type (-dt)
The type of non-Progress data source that you want to connect to. The default is as400. This parameter is optional:
Host Name/Profile Name (-H)
For Windows clients using SNA, the Host Name (-H) parameter specifies the Partner LU name. The default for Windows is the AS/400 host name from the CONFIG.PCS file.
For Windows clients using Rumba, use the -H parameter to specify the LU Alias, the PLU, and the Mode name. If you are connecting to multiple AS/400s, you must supply this parameter for each AS/400. The default is:
PLU=5250PLU/LU=5250LU/MODE=QPCSUPP
For clients using TCP/IP, the Host Name (-H) parameter specifies either the name of the AS/400 in the host file or that you should use the IP address of the host.
Ignore Stamp (-is)
When accessing DB2/400 database files, the DataServer validates the file definitions in the schema holder against the current state of the file. Within a given Progress session, whenever you access a file or index for the first time, Progress/400 compares CRCs stored in the server schema for that file or index with the actual CRCs of the AS/400 physical file. If the CRCs do not match, Progress returns an error and denies you access to the data.
This verification takes time. In a production environment, if you are certain that the data definitions in the DB2/400 database files that you are accessing have not changed, you might want to consider using the -is parameter to bypass CRC and level checking. It is very important to understand that if you use the -is parameter and the DB2/400 files have changed, the data can be corrupted:
NOTE: The OS/400 data dictionary time stamp changes whenever you make any change to the DB2/400 database structure, regardless of whether or not you save the change.Network Type (-N)
Use this parameter to specify the networking protocol:
Table 4–3 lists the network types that the Progress/400 DataServer supports and the values that you specify with -N.
User ID (-U)
Use this parameter to specify the user ID. The userid value varies depending on the client type.
This parameter is required for connection by all remote clients. These connections also require the Password (-P) parameter:
Password (-P)
The Password (-P) parameter specifies the AS/400 password of the user starting the Progress/400 session. You must capitalize the password, and you must use this parameter with the User ID (-U) parameter.
The password that you specify is checked against AS/400 user profiles. If it is valid for an AS/400 user, OS/400 starts the Progress/400 DataServer job on the AS/400. The job runs under the attributes of the associated user profile. If the password is not valid for the AS/400, or if the user profile does not have authority to the dictionary library specified in the connect, the connection fails:
Service Name (-S)
Use this parameter for a TCP/IP connection. It specifies the name of the service on the AS/400 that you called when you started the broker. Select the service name from the TCP/IP services file on your client machine.
Server Name (-Sn)
Use this parameter for an SNA connection. It specifies the server program started on the AS/400 by a Progress connection request. This is an optional connection parameter:
Table 4–4 describes the values for the -Sn parameter.
Note that you can substitute the consna and consnal programs for the prosna and prosnal programs. However, using prosna and prosnal allows you to customize how the Progress/400 DataServer is started.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |