Net.Data Books

Administration and Programming Guide for OS/390


Appendix B. Configuring Net.Data for OS/390 to Access DataJoiner

You can use Net.Data for OS/390 with DataJoiner to access remote databases such as DB2/6000, Oracle, and Sybase. This section describes how to configure your system for use with DataJoiner for AIX Version 1.2 with PTF U447593 or DataJoiner for HP-UX Version 1.1.

Configuration steps:

  1. Enter the information needed in the communications database (CDB) for remote communication to DataJoiner. Information on the CDB is in DB2 Installation Guide.
  2. Bind the Net.Data DBRM to the remote location where DataJoiner is installed using the BIND PACKAGE command.
  3. Bind the Net.Data DBRM to DB2 using the BIND PLAN command. Use the PKLIST option to include the package created at the remote location.
  4. Modify the Net.Data initialization file, which is in the Web server's document root directory, to specify the LOCATION variable as an input variable to SQL functions. The new DTW_SQL environment statement looks like this:
    ENVIRONMENT (DTW_SQL) dtwsql (IN LOCATION)
    

Net.Data macros that access remote data using DataJoiner must specify a value for LOCATION. This example Net.Data macro queries a remote database through DataJoiner:

%{ ****************** Define Block ******************************** %} 
%DEFINE {                                                                
  DB2SSID="NDA1"                                                            
  LOCATION="QMFDJ00"                                                     
  DTW_DEFAULT_REPORT="YES"                                               
%}                                                                       
                                                                         
%{ ****************** Function Definition Block ******************* %} 
%FUNCTION(DTW_SQL) selectall() {                                         
  SELECT * FROM $(tabnam)                                                
%}                                                                       
                                                                         
%{ ****************** HTML Block: Table_Input ********************* %} 
%HTML(Table_Input) {                                                     
<Title>DJ Test #1</Title>    
<Body>                                                               
<h1 align=center>Table Selection</h1>                             
<br>                                                                 
<form method="post" action="Column_Output">                          
<p>Enter Table Name: <input type="text" name="tabnam"></p>     
<p><input type="submit"></p>                                   
</form>                                                              
</Body>                                                              
%}                                                                      
                                                                        
%{ ****************** HTML Block: Column_Output ******************* %}
%HTML(Column_Output) {                                                  
<Title>DJ Test #1</Title>                                         
<Body>                                                               
@selectall()                                                            
</Body>
%}                                                              


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]