ASNA DataGate® for iSeries/400 ® 7.2
Transferring and
Installing DataGate for iSeries/400
Installing DataGate
for iSeries/400 onto the iSeries from the PC
Installing DataGate for
iSeries/400 using FTP
Installing
DataGate for iSeries/400 onto the iSeries from the iSeries
Installing DataGate for
iSeries/400 using an iSeries CD-ROM drive
Changing the Default DataGate TCP Port
Licensing DataGate for iSeries/400
Entering the License Code on the iSeries
Entering the License Code on the PC
Authority of the User Profile used to Register DataGate
Configuring TCP/IP
on Supported Windows Platforms
Verifying that Windows TCP/IP is Installed Correctly
Configuring Multiple Versions of DataGate for iSeries/400 using TCP/IP
Troubleshooting iSeries TCP/IP Connectivity
Troubleshooting DataGate Service
Troubleshooting a DataGate Job that is Not Terminating
Troubleshooting Manually Ending Users Jobs
You will achieve fast, record-level DB2/400 database access from Windows with DataGate for iSeries/400. Whether you are developing your client applications in Visual Basic, C, C++ , ASNA Visual RPG, ASNA Database Toolbox for Java, DataGate for iSeries/400 provides the direct file access needed for efficient Client/Server processing - without SQL and ODBC.
iSeries connectivity
is supported for TCP/IP.
DataGate for
iSeries/400 retains all iSeries object authority and object locking. Its Remote
Program Call support features automatic program initiation and activation, and
allows character, numeric and indicator (boolean) parameter data types.
DataGate for iSeries/400 provides full object control for the iSeries including: creating files; accessing file definitions; adding, deleting and initializing file members; renaming and copying files. It provides full access to CL commands and data areas, and it utilizes all iSeries CPF error messaging.
On the iSeries
·
Restore
the save file, ASNATEMP7 onto the iSeries either directly from iSeries CD media
or FTP.
·
Restore
the library ASNATEMP7 from the ASNATEMP7 save file.
·
Install
DataGate for iSeries to the library that you specify. Please note the following:
1
User
profile DG8SVCPRF is created. It is used to run
the DataGate Service and the License Manager.
When the DataGate service job is submitted for
execution, the job is submitted under the user profile of DG8SVCPRF. This user profile is created during the
installation and the system value for the Printer option will be assigned to
this user profile. If the DataGate
service job cannot be started, a one page report outlining the possible cause
of the problem will be generated for the user DG8SVCPRF and printed to the
assigned printer.
2
TCP/IP
port 5042 is the default port for the Service Table Entry used by the DataGate
service. It is not required that
you use this port. Port 5042 is
registered to ASNA by "IANA", the Internet Assigned Numbers Authority
( http://www.iana.org/assignments/port-numbers) and as such it is a
common-sense default port. See Changing
the Default DataGate TCP Port for more information.
3
ADDTCPPORT is run to restrict the default/assigned port to the DataGate Service
only. If you use your own port
assignment(s), the installation program will implement the port restriction to
ensure that products that randomly assign ports for their own use cannot have
access to your assigned DataGate port.
4
*USE
Object authority for DataGate is added to APIs QSYGETPH and QWTSETP. This
is required because the DataGate service "adopts authority" before
starting the end user's job (using the user name and password). These programs are the IBM APIs for
performing this function.
On the PC
·
Restore
PC programs, by default, to the \DataGate\FTP folder.
Prior to installation, DO NOT delete or rename the ASNA_DG8 library. It is required for all versions of DataGate even though you may be installing into a library with a different name.
The procedure to install DataGate for iSeries/400 on the iSeries consists of 2 parts. The first is to transfer the DataGate/400 software to the iSeries, either from a PC or the iSeries CD drive, and the second is to actually install DataGate/400 into the specified iSeries library.
There is 1 way in which you can transfer
DataGate for iSeries/400 to the iSeries from the PC
There are 1 way in which you can transfer
DataGate for iSeries/400 to the iSeries from the iSeries
Refer to the appropriate installation procedure below for the desired transfer method. Each procedure will have a subheading noting whether the steps are done on the iSeries or the PC.
The last step in each procedure will be
to run the command that actually installs DataGate for iSeries/400 onto the
iSeries.
In order to install DataGate for iSeries/400 on the iSeries from a Save file (obtained from the Installation CD), you must have TCP/IP installed on both your PC and on the iSeries. (You must also have FTP installed on your iSeries).
Installing TCP/IP and FTP on the iSeries is beyond the scope of this
document. If you do not know whether
your iSeries has TCP/IP and/or FTP, please check with your network manager or
system provider.
On the iSeries
1.
Sign onto the iSeries using an account that has both
*SECADM and *IOSYSCFG authorities, e.g. QSECOFR.
2. Create a Save file in QGPL by entering the following command:
CRTSAVF
QGPL/ASNATEMP7
On the PC
3.
To upload the Save file from the CD or PC,
an FTP session must be started to the iSeries.
From Windows, click on the START button, select RUN and enter
the following command:
FTP tcpipaddress
‘tcpipaddress’ is either the iSeries’ TCP/IP address
such as 198.176.129.35, or a machine name that is registered either in a DNS or
a HOSTS file.
4.
When prompted for a user name and password, enter the appropriate
information that will give you privileges to upload data to the iSeries.
5.
Once FTP has been started, upload the Save file to the iSeries by
entering the following commands:
a) binary
b) put
x:\Datagate\FTP\ASNATEMP7 QGPL/ASNATEMP7
where x is the CD-ROM drive or PC disk
drive
c) quit
On the iSeries
6. Restore the library called ASNATEMP7 from the Save file by entering the following command:
RSTLIB ASNATEMP7 DEV(*SAVF) SAVF(QGPL/ASNATEMP7)
7.
To install DataGate for iSeries/400, execute
the following command:
ASNATEMP7/DG8LOAD
When
DataGate/400 is installed, it is automatically authorized for one user license.
If you wish to authorize more than one license to DataGate/400 for the iSeries, obtain a license code from ASNA and then
enter ASNA_DG8/REGISTER from iSeries command line.
8.
The installation program will
display the ASNA Software License Agreement.
If you agree with the terms of the license, press the F8 key to continue with the
installation. If you do not agree, press
the F3 key and the installation will be cancelled.
Next, the installation program displays the installation
options. The installation can be
cancelled at any time by pressing the F3
key.

Installation Library Option:
Select a library where DataGate/400 will be installed. If the library does not exist, it will be
automatically created during the installation.
The following libraries are not allowed for the installation: QSYS,
QGPL, QSPL, QTEMP, VCAT_70 and the distribution library. Libraries called ASNA_DG8 and VCAT_70 are
always created.
Subsystem Options:
Select a subsystem where DataGate/400 will run. You must also specify the library where the
subsystem description is located or where it will be created during the
installation. This is required so that
the installation program can determine whether the specified subsystem exists
or must be created. If the subsystem
does not exist, it will be automatically created in the specified library
during the installation.
Service Table Entry Options:
Select the name of the service table entry and the port that
DataGate/400 will use. The default
values are recommended.
Start DataGate Option:
Enter ‘Y’ to have DataGate/400 started as soon as the
installation has completed. If you
select not to start DataGate/400, you will have to start it manually with the
STRDG8SVR command by entering:
InstallLib/STRDG8SVR
Where InstallLib is the
library into which DataGate/400 was installed.
Clear Cache Library Option:
Enter ‘Y’ to clear the DataGate/400 cache
library. This is recommended. Make sure that there are no active
DataGate/400 jobs if you select this option.
9.
When all options have been
selected, press the F6 key to
display a verification screen for each of the above options. As you review each option, press Enter if you
are satisfied with your selection, otherwise press the F12 key to redisplay the
options screen and enter your changes.
When all options have been verified, the installation will start.
10. The installation program will
stop the version of DataGate/400 that is running out of the specified
installation library – if there is one.
If there are multiple versions of DataGate/400 running, those other
versions will not be stopped.
11.
Once the
installation has completed, the ASNATEMP7 Save file is no longer needed, and may
be deleted. The ASNATEMP7 library is
automatically deleted.
12.
You must name the iSeries Database in DataGate Database Manager using Work with Database Names. See Naming
an iSeries Database for more information.
The following installation processes have two steps.
·
The first step
is to restore a temporary installation library and can be done by anyone with
*USER authority or higher.
·
The second step
does the actual installation and initialization of the product and requires
*SECOFR authority to run it.
To
Install from iSeries CD-Rom Drive
1. To restore the installation library, load the CD, then enter the following command:
RSTLIB ASNATEMP7 OPT01 OPTFILE('DATAGATE/RSTLIB/ASNATEMP7')
Where OPT01 is the device name from which the library will be restored.
2. See the above section titled ‘Installing DataGate for iSeries/400 with FTP’, starting with step 8, for detailed instructions and information about the various installation options.
Once the installation is completed, the ASNATEMP7 Save file is no longer needed, and may be deleted. The ASNATEMP7 library is automatically deleted.
When
DataGate for iSeries/400 is installed, it is automatically authorized for one
user license. If you wish to authorize more than one license to DataGate/400
for the iSeries, obtain a code from ASNA and
then ASNA_DG8/REGISTER from iSeries command line.
To modify the
installed (default) TCP/IP port 5042 to another port:
1.
Enter
the command WRKSRVTBLE (Work
with service table entries) to verify the name of the DataGate service. On the prompt screen, press <enter> and
list of table entries is displayed; the entry list is typically in arrival
sequence, so this entry should be at or near the bottom of the list. Scroll down the list of entries until you see
port 5042. The default DataGate Service
name is "Acceler8DBServer". Write down the Service name and then press
the F3 key.
2.
The
entry for port 5042 must first be removed.
On the command line, enter RMVSRVTBLE and press <enter>. In the Service prompt field, enter the name
of the DataGate service from the Service Table entry; in the Port prompt field
enter "5042"; and in the Protocol prompt field prompt enter "tcp". Press <enter> and the entry will be
removed from the Service Table.
3.
To add
the entry for the port you wish to use, on the command line, enter ADDSRVTBLE and press <enter>. In the Service field prompt enter "Acceler8DBServer"; in the Port
prompt field enter the port number
you want to use; in the Protocol prompt field enter "tcp" (this must be lower-case); and in the Text prompt
field enter "DataGate/400 Service
Table Entry" and then press <enter>.
The name that you entered for the service on the ADDSRVTBLE command must match the name in
the TCPSERVICE data area in the
DataGate library (by default it is "Acceler8DBServer").
Before DataGate for iSeries/400 may be used on any iSeries, a valid license code, issued by ASNA, must be entered. For new trials, this code will be sent with the product if the machine serial number and model type are known at the time of shipping.
The code issued with a trial of DataGate for iSeries/400 will license, or register the product to be used on a specified machine up to a specified date. If it is required to move the product onto another machine, upgrade the model type, or extend the trial period, please contact your Distributor or ASNA for a new license code.
Once the product has been purchased, a new license code will be issued to register the product on a permanent basis. This code will be based either on unlimited users, or on a per-user basis.
A new license code is entered, or a current license can be
viewed or changed by using the product’s Registration
Assistant program.
When installing the
product for the first time, or when an upgrade is installed, the Registration Assistant screen is
displayed with the bottom of the screen displaying whether the current License
Code is valid or not. If the License
Code is valid, press F3 to continue. If
not, call ASNA or your Distributor to get a new License Code.
Note: You cannot use the product without a proper
License Code.
To Enter, Display, or
Change a License Code on the iSeries
1.
If you are not already at the Registration Assistant Screen, enter the
following:
a.
ADDLIBLE LIB(ASNA_DG8) POSITION(*FIRST)
b.
ASNA_DG8/REGISTER
2. Enter or verify the information to the display, as detailed below.
The name of the iSeries will automatically display.
The model of the iSeries will
automatically display.
The serial number of the iSeries will automatically display.
For a new license, enter the 16-digit license code acquired from ASNA exactly as it is given.
License Type specifies if the licensing is for an individual machine, or for the entire company.
·
To license, or
register the current machine, use *MACH,
which is the default.
·
To license, or
register the entire company, enter *SITE.
The name of the
user that was entered when the product was installed will automatically display. However, you can change this name as needed.
The customer name is
case-sensitive and must match the customers name exactly as ASNA's account
shows.
The name of the company that was
entered when the product was installed will automatically display. However, you can change this name as needed.
If you are entering a Site License, the name of
the company must be spelled exactly as determined by you and ASNA. This name is also case-sensitive, so
capitalization must match exactly.
The
Start Date specifies if the product has been purchased, in which you have a
Permanent code, or if the product is a ‘Trial’, which is only valid for a specified period.
· If the product has been purchased, use *PERM, which is the default.
·
For a ‘Trial’ of
the product, enter the starting date in the format MM/DD/YYYY.
The
Expiration Date indicates the date in which the license code will expire.
· If the product has been purchased, use *PERM, which is the default.
·
For a ‘Trial’ of the product, enter the ending
date of the trial as specified by ASNA in the format MM/DD/YYYY.
User
Count specifies the number of concurrent users that can access the product, as
a per-user-basis, or as unlimited.
·
For unlimited
users, use *UNLIM, which is the
default.
·
For a
specified number of users, enter the user count as a positive integer.
3.
Acceptance of a valid licensing code is confirmed at
the bottom of the screen. Press F3 to
continue.
If the message “The License is Invalid” displays, recheck all entries. If no errors were made in any of the entries, call ASNA or your National Distributor for further assistance.
If the message “Couldn't create license data area, check authority and try again" displays, you do not have the proper authority to register DataGate for iSeries/400. See Authority of the User Profile used to Register DataGate for more information.
To register a DataGate for iSeries/400 license code, the user profile used must have *CHANGE authority to the ASNA_DG8 library. Additionally, it must have *ALL authority to the DGPCODE data area in ASNA_DG8. See Authority of the User Profile used to Register DataGate for additional information.
To Enter a License
Code on the PC
1. After installing DataGate for iSeries/400, contact ASNA to obtain a License Key.
2. Open Registration Assistant by selecting Start - Programs - ASNA Product Suite - ASNA Registration Assistant and select DataGate for iSeries/400 as the product by clicking on the arrow to the right.
3.
Select the database name
that points to the database on the iSeries in which you are registering a
license for.
The database name for
the iSeries to be licensed must already exist on the system running
Registration Assistant. Use DataGate Database
Manager to register a database name by selecting Work with Database Names… from the File menu.
Once a database name is selected, the Model and Serial number
of the iSeries will automatically display.
4. Enter the License Key that you received from ASNA, along with the rest of the information as listed below. Select the Register Product button when finished.
Machine Code
Machine Code is a unique number that
represents a “signature” of your system and will automatically display. The code is separated into groups of 4-digit
numbers. It will contain 16 numbers
(except for AVR 2.2 and earlier). The Machine Code cannot be changed.
If for any reason you lose your machine code, please contact ASNA.
iSeries Model
The model of the iSeries will automatically display after selecting a database name to license.
Serial Number
The serial number of the iSeries will automatically display after selecting a database name to license.
License Key
A 16-digit license key acquired from ASNA. You may enter the License Key as a single, large number. However, for easier readability, it is recommended to enter one or more spaces between each set of 4 digits. Note that this is not necessary, and spaces will not affect the License Key.
Database Name
Select the database name on the iSeries in which you are registering a license for.
Name
The name of the user that was entered when the product was installed will automatically display. However, you can change this name as needed.
Company
The name of the company that was entered when the product was installed will automatically display. However, you can change this name as needed.
If you are entering a
Site License, the
name of the company must be spelled exactly as determined by you and ASNA. This name is also case-sensitive, so
capitalization must match.
Version
The version (and build number) of the selected product will automatically display.
Full Version
A full version indicates that you have full use of the product, i.e., you can compile and make .EXE’s, DLL’s, and OCX’s. The full version can be set as either permanent or temporary.
Trial Version
A trial version indicates that you do not have full use of the product, i.e., you can not compile and make .EXE’s, DLL’s, and OCX’s.
When you install Visual RPG 3.x on a system in which Visual RPG has never been installed before, you are automatically given a “trial” version of AVR. A trial version is good for approximately 30 days, so you do not need to enter a license key until the product is purchased and you have received a permanent license key from ASNA.
Site License
Check this box if your company is set up with a Site License, in which multiple licenses have been acquired that will all use the same License Key.
Unlimited
Select Unlimited if the number of users that can access DataGate Engine or DataGate for iSeries/400 is not limited to a particular number.
Limited
Select Limited if there is a limit to the number of users that can access DataGate Engine or DataGate for iSeries/400. If limited is selected, enter the number of concurrent users that can access DataGate Engine or DataGate for iSeries/400 in User Count.
User Count
Enter the number of concurrent users that can access DataGate Engine of DataGate for iSeries/400. This option will only display if a user type of Limited was selected.
Date format
Select the date format in which you will enter the Starting and Ending date for the license. The two formats are:
mm/dd/yyyy
(USA)
dd/mm/yyyy (
Permanent
The license period is permanent for this system. There is no start or end date.
You will not need to contact ASNA for another license unless there is a change to your system.
Temporary
The license period is temporary. You must specify a start and endEnd date.
Start
Enter the starting date of the licensing of the specified product according to the date format you have selected. This is the date in which the product was installed.
End
Enter the ending date of the licensing of the specified product according to the date format you have selected. This should be approximately 30 days in which the product was installed. However, if you need an extension to the trial period, please contact ASNA.
5.
Acceptance of a valid licensing code is
displayed. Select OK to clear the message, then select Exit to close Registration Assistant.
If you receive DataGate
error number 654 - “Not authorized to Object" after selecting the
Register button, you do not have the proper authority to register DataGate for
iSeries/400. See Authority of the User
Profile used to Register DataGate
below for more information.
The user profile used to register DataGate software must have *CHANGE authority to the ASNA_DG8
library. Additionally, it must have *ALL authority to the DGPCODE data area in ASNA_DG8, if it
already exists (say, from a previous registration of the product).
The user profile must have these authorities regardless
of the method used to register the program, such as the iSeries REGISTER
command or the Windows PC Registration Assistant program.
As an example, suppose user profile ADBUSER is to be used to register
DataGate. The successful execution of
the following two iSeries commands prior to registration will insure that the
required object authorities will be available to ADBUSER:
GRTOBJAUT OBJ(QSYS/ASNA_DG8) OBJTYPE(*LIB) USER(ADBUSER) AUT(*CHANGE)
GRTOBJAUT OBJ(ASNA_DG8/DGPCODE)
OBJTYPE(*DTAARA) USER(ADBUSER) AUT(*ALL)
Remember that the DGPCODE data area may not exist yet if DataGate has
never been registered on the machine. If
so, the second command is not necessary.
·
If the
Registration Assistant is used, the user profile is the "Username"
specified on the Work With Database Names dialog box
of DataGate File Manager, and other tools.
·
If the
REGISTER command is used, the user profile in question is the one used to log
on to the iSeries interactive session.
Configuring TCP/IP on Supported Windows Platforms
This process assumes that your machine is on a
TCP/IP Network. If you are unsure of the
type of Network, or do not understand any of the steps, please contact your
Network Administrator.
You should use automated IP settings (DHCP)
whenever possible, for the following reasons:
§
DHCP is
enabled by default.
§
If your
location changes, you do not have to modify your IP settings.
§
Automated IP settings are used for all
connections, and they eliminate the need to configure settings such as DNS,
WINS, and so on.
To Configure TCP/IP on Windows Platforms
1.
Open Network Connections by
selecting Start Menu – Settings – Control Panel.
2.
Double-click the Network Connections Icon to open the
Network settings.
3.
Click the connection you want to configure,
and then, under Network Tasks, click Change settings of this
connection.
4.
Do one of the following:
§
If the
connection is a local area connection, on the General tab, under This connection uses the following items,
click Internet Protocol (TCP/IP), and then click Properties.
§
If this
is a dial-up, VPN, or incoming connection, click the Networking tab. In This
connection uses the following items, click Internet Protocol (TCP/IP),
and then click Properties.
5.
Do one of the following:
§
If you
want IP settings to be assigned automatically, click Obtain an IP address
automatically, and then click OK.
§
If you
want to specify an IP address or a DNS server address, do the following:
Ø
Click Use
the following IP address, and in IP address, type the IP address.
Ø
Click Use
the following DNS server addresses, and in Preferred DNS server and Alternate
DNS server, type the addresses of the primary and secondary DNS servers.
6. To configure DNS, WINS, and IP Settings, click Advanced
If these
differ from your configuration or you are not sure of the network
configuration, please contact your Network administrator!
7. Follow the procedure to verify that TCP/IP is installed correctly.
To verify that TCP/IP is installed correctly and can communicate with the AS400, you will need to know the AS400’s TCP/IP address and Full domain name. If you do not know, please contact your Network Administrator!
To Verify that TCP/IP is Installed Correctly
1. Open an MS-DOS prompt by selecting Start Menu - Programs–MS-DOS Prompt.
2. Type the command ping followed by the TCP/IP address of the AS400.
3. If TCP/IP is functioning correctly, you should receive four replies.
To Name an iSeries Database For TCP/IP Connectivity
1. Select Work with Database Names… from the Database menu. The Work with Database Names dialog box will display.
2. Select the browse button in the Database section to select the database server. The Select Database dialog box will display.
3. In Additional TCP/IP server, enter the Host name or IP address of the iSeries.
4. Select the Add button to add the TCP/IP server. The Host name or IP Address will be added to the list of available servers.
5. Click on the plus sign button next to the Host name or IP Address (or double-click on the name). After the TCP/IP connection is made, the database label for the iSeries is displayed.
- If
you see a label (typically DB2), then you have made a successful connection.
- If
you don't see a label, then there is an error and recommend that you review the
"Troubleshooting" Section.
6.
Click on
the database label, and the server and label fields will be set to your
selection.
7.
Select the OK
button to continue and return to the Work with Database Names dialog.
8. In Name, enter the name your programs will use to access this iSeries.
9. For Example, you can use *REMOTEDFT, if your existing applications have been referenced with this name.
10. Enter your user name, password, and password confirmation in the Account to Use on server section.
11. Select the Add button to complete adding a database name. A dialog box will display stating that the database name has been added.
You can also easily name a
database by selecting Database Wizard from the Database menu.
To Configure an Additional DataGate for iSeries/400 on the same iSeries using TCP/IP
1. Create a new installation library.
2. Install DataGate
into the newly created library by following the steps found in the Installation
Notes in the sections entitled Installing
DataGate for iSeries/400 using FTP or Installing
DataGate for iSeries/400 using an iSeries CD-ROM drive.
Note: Make sure to specify an unused port, a new TCP Service Table Name, and the new library specified in step 1.
Troubleshooting iSeries TCP/IP Connectivity
If you are unable
to connect to the iSeries database from ASNA’s DataGate Database Manager, the
following information may help identify possible incorrect setups on the
iSeries.
It is assumed that TCP/IP configuration has been completed correctly on the PC side. If you are unsure whether TCP/IP is installed or correctly configured on your PC, contact your network administrator for assistance.
TCP/IP names are a combination of host names (machine names) and domain names. A machine name for TCP/IP does not have to match the iSeries machine name; however, it will be a unique name - and it can be the same as the iSeries machine name.
Throughout this example, the machine name used is ‘machine’, and the iSeries name is actually ‘S1037242’. The domain name used throughout this example is ‘domain.com’. Together the machine name and the domain name make a ‘complete’ TCP/IP name - ‘machine.domain.com’. At your site, you should use your own domain name and own machine name.
1. First check to see if you are able to ping the iSeries by name from your PC. For example, if the TCP/IP name of the iSeries is ‘machine.domain.com,’ then the following command should be issued from your machine from a DOS Box:
ping machine.domain.com
· If you do not get a ‘reply’ from the machine that was pinged, then TCP/IP may not be configured correctly, either on your machine or on the iSeries. If you receive a “Bad command or filename” error message when typing the ping command, your machine may not have TCP/IP installed. Please check with your network administrator to make sure your machine has TCP/IP capability.
· If you do get a response from the iSeries when the ping command is issued, then it is still possible some settings on the iSeries may be incorrect. From a command line on the iSeries, issue the following command: cfgtcp.
2. From the Configure TCP/IP menu screen that appears, select the Work with TCP/IP Interfaces (option 1).
3. The following menu screen will appear.
You should see something similar to this screen. If you do not, then TCP/IP is probably not configured on the iSeries properly, or it may not be completely installed. Check with your iSeries administrator to make sure the iSeries has TCP/IP installed.
4. If there is an internet address other than 127.0.0.1 listed, select that address and enter an option 5 command to display the setting for that IP address.
· The Interface status should indicate Active. If it does not, then the TCP/IP services, although installed, may not be started, or it may have terminated. The TCP/IP services should be started.
· Try re-connecting to the iSeries database after restarting the TCP/IP services. (To start the TCP/IP services you must have sufficient authority rights and issue the following command from a menu prompt: STRTCP). After you have done this, then issue another ping command to see if you get a reply.
5. If you reach this point and are still having problems accessing the iSeries via TCP/IP, then F12 back to the main configuration screen for TCP/IP (Configure TCP/IP) and enter option 21 (Configure Related Tables) from the main TCP/IP configuration menu.
· On the Configure Related Tables menu screen that appears next, select option 1, Work with Service Table Entries. You will then see the Work with Service Table Entries menu screen. Scroll through the list of services to find the DataGateServer entry.
· If there is no entry here, then that is the problem. Make sure you perform the installation section for the iSeries as stated earlier in this chapter.
· If the DataGateServer entry is found, then the default port will be 5042 (unless it was installed with a different port). It is strongly suggested to use Port 5042.
Note: The protocol listed
in the service table entry for the ‘DataGateServer’ service should be ‘tcp’.
It is case sensitive, so if the letters are uppercase, you will need to
remove the service and re-add the service with lower case letters.
If
you are unable to start the DataGate Service, the following steps will assist
in trouble shooting the possible causes.
When the DataGate service job is submitted for execution, the job is submitted under the user profile of DG8SVCPRF. This user profile is created during the installation and the system value for the Printer option will be assigned to this user profile. If the DataGate service job has trouble starting, a one page report outlining the possible cause of the problem will be generated for the user DG8SVCPRF and printed to the assigned printer. This report will not print unless the Output Queue associated with this printer automatically prints the generated reports. Otherwise, to view the list of reports that have not printed for this user, enter the following command:
WRKSPLF SELECT(DG8SVCPRF)
At this point you will need to contact ASNA for further assistance.
The most probable cause for the DataGate service job not starting is if the current DataGate service job is terminated with an ENDJOB command, subsequent attempts to start the service will not be successful.
1. If the DataGate service job is not currently running and it won't start by issuing the STRDG8SVR command, enter the following command:
NETSTAT
2. Select Option 3. Work with TCP/IP Connection Status.
3. Select F14 to Display Port Numbers In the Local Port column, locate the Port Number you assigned as the Port for the DataGate Service (The default Port Number is 5042).
4. You will need to end this connection by selecting Option 4.
5. When this connection is ended successfully, you may now execute the STRDG8SVR command.
If you notice that a DataGate
Job is still running after a client connection is lost, this is due to a TCP/IP
feature called "Keep-Alive". Refer
to the following to change the system's default Keep-Alive value.
When the database connection is TCP/IP, the server machine utilizes a TCP/IP feature called "Keep-Alive". Keep-Alive packets are used to probe a connection that has been inactive for a long time. The server initiates a disconnect when the probes do not get through.
This means that if the client connection is lost for a prescribed length of time, the server sends a disconnect message to its server job (usually the result of a system crash or power-down).
The default Keep-Alive setting for Windows NT and iSeries is two hours, meaning that an DataGate thread or DataGate job would remain active for 2 hours after connection was lost with the client. The 2-hour default may be an unsatisfactory period of time for you, as files would continue to remain open, etc. on an abnormal disconnection until the Keep-Alive time had elapsed.
Refer to the following to modify the server machines' respective Keep-Alive period.
iSeries
1. Request the Configure TCP/IP menu by executing the command: cfgtcp
2. Select menu item 3 - Change TCP/IP Attributes.
3. Set TCP/IP Keep-Alive to the number of minutes desired. (Note: 2 to 5 minutes should work well in most cases).
Windows NT 4.0
WARNING: Using
Registry Editor incorrectly can cause serious, system-wide problems that may
require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems
resulting from the use of Registry Editor can be solved. Use this tool at your own risk. The following was derived from Article ID
Q120642.
To Change these parameters, use the following procedure:
1. Run Registry Editor (REGEDT32.EXE).
2. From the HKEY_LOCAL_MACHINE subtree, go to the following key:
\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
3.
The
Value is "KeepAliveTime".
If present (usually not), double click on it to edit in milliseconds. Otherwise, continue with Step 4.
4. Select "Edit -> Add Value".
5. For Value name, enter KeepAliveTime.
6. From the Data Type drop down list, select REG_DWORD.
7. Press OK.
8.
In the DWORD Editor dialog, enter the number of
milliseconds. Select the Radix Decimal
option.
9. Select OK.
10. Enter the Keep-Alive value in milliseconds; e.g. 5 minutes = 300000 msec.
· Valid Range: 1 - 0xFFFFFFFF
· Default: 7,200,000 (two hours)
The parameter controls how often TCP attempts to verify that an idle connection is still intact by sending a Keep-Alive packet. If the remote system is still reachable and functioning, it will acknowledge the Keep-Alive transmission. Keep-Alive packets are not sent by default. This feature may be enabled on a connection by an application.
11. After typing in the value, use the "Data Type" checkbox to set the value type.
13. Exit the Registry Editor.
14. Reboot the system to make the change take effect.
Basically, to set up a subsystem, you need to have a routing entry with a compare value of “QCMDB” that runs the program QCMD in QSYS.
The subsystem that is used for the job queries must be set up with a proper routing entry in order for DataGate service to start. This routing entry must run the program QCMD in Library QSYS and have the compare value of ‘QCMDB’ or ‘*ANY’. If the subsystem has one of these routing entries, it may be used for DataGate.
If DataGate is shut down and there
are users connected, their jobs will still be out there and you have to
manually end them. However, after
manually ending the users’ jobs, DataGate may not start for about 5
minutes. It will start the first DG8SVC
job and then end it until the 5 minutes (or so) is up.
It is likely that OS/400 is not reclaiming the
DataGate TCP/IP port (5042) in a timely manner when the service and connection
jobs are ended. When you "manually
end" connections to DataGate, it may not have a chance to properly shut
down TCP/IP resources. The system
typically does not realize that those resources are no longer in use for some
quantum.
The best way to avoid this is to let the connections
and service end normally, though in abnormal situations this isn't always
possible.
When you must use ENDJOB, etc., to end the
connections and/or the service, you can sometimes use the WRKTCPSTS command to
view the outstanding socket connections and end them. In such a case, if you find a socket in the
"listening" state using the DataGate port, you can end this
connection (but only if you are absolutely sure the service isn't running)
using WRKTCPSTS. Likewise, if you find
sockets connected to the DataGate port from external ports, you can end those
(if you are sure that there are no jobs using the connection). The system will then reclaim the port, and a
new instance of the DataGate service can use it immediately.
If the user does not know the IP address of the iSeries to
which they are trying to Name a database, do the following. Note however, that most users should never have to do
this, and you may want to "call your Network Manager” instead of
performing the steps below.
1.
On the PC, open a DOS window and enter:
arp
-a
Note the IP
addresses that appear. You will compare
this list with the list generated in step 4.
(Normally, there will be only one difference, and it will be the
addition of the iSeries's IP
address).
2.
For Windows 9x: On the PC, click Start - Run the enter:
WINIPCFG
For NT/2000: At a DOS prompt, enter:
IPCONFIG
The IP address of the PC will display.
Note this IP address, since you will use it in step 3.
3.
On the iSeries on a command line enter:
where xxx.xxx.xxx.xxx
is the IP addresses of the PC noted in step 2.
In the
Configuration dialog, there's a drop down list box of adapters. Note that in most cases you will only have
one Ethernet adapter, so the only challenge is to distinguish the Ethernet
adapter from a dial-up adapter. This is
usually easy, because dial-up adapters usually have a name like "NdisWan4".
It is also wise to NOT
attempt to ping a PC that is also running 5250 emulation, etc., to the object
iSeries. That's because that iSeries
will already be in the arp sorted
"list", so one would not be able to know which is the target iSeries
because the list would be the same in steps 1 and 4.
4.
On the PC in the DOS window, enter:
arp -a
The IP addresses are
sorted. Compare the list with the list
in step 1 and note the new IP address, this is the
iSeries's IP address.
If you are upgrading the OS/400 to a new level, please contact ASNA to ensure you have a compatible version of DataGate.
Note that you will also need to reconfigure DataGate for TCP/IP access (i.e., the ADDJOBQE and ADDSRVTBLE commands).
If you are running multiple
versions of DataGate and wish to uninstall a single version; please note
the following:
DO NOT delete or rename the ASNA_DG8 library. It is required for all versions of DataGate
even though you may be installing into different library names.
For TCPIP access, you
will need to remove the service table entry for the version of DataGate that
you wish to uninstall. To verify the Service Table entry, display data area
TCPSERVICE in the library that you are
uninstalling. This data area contains
the name of the Service Table entry that you will remove.
To
uninstall a version of DataGate that was not installed in the default
installation library ASNA_DG8, follow the steps below.
To Uninstall DataGate
1.
Remove the job queue entries for the
Jobq Datagate and the
Jobq DG8_SVC using the
RMVJOBQE command.
These Job Queues reside in the installation library. (Most commonly
called ASNA_DG8).
If you have installed
DataGate into a library other than ASNA_DG8, your job queues will reside in the
library where DataGate is installed.
2.
Delete the Job Queues
Datagate and DG8_SVC using the
DLTJOBQ command.
3.
Remove Service Table Entry for
TCPIP access using the following command.
RMVSRVTBLE
SERVICE('Acceler8DBServer') PORT(5042) PROTOCOL('tcp')
4.
Delete the DataGate
installation library using the DLTLIB
command.
DataGate
is now uninstalled.