===================================================================
			 RALLY! for AS/400
			  (ODBC Driver)
			   Version 2.0
			  Release Notes
===================================================================

Copyright 1992-1995 by                       Attachmate Corporation
Attachmate Corporation.                      March 1995   
All Rights Reserved.


------------
INTRODUCTION
------------
						 
Welcome to RALLY! for AS/400.  This file contains late-breaking 
information about Attachmate's ODBC driver for RALLY!.

This driver is designed to be used with the syntaxes supported by 
SQL/400, even if you don't have SQL/400 on your AS/400.

This driver has been tested on the following software:
* Attachmate Select Executive
* Microsoft Access 1.1
* Microsoft Access 2.0
* Microsoft Query 1.0 (Word 6.0 and Excel 5.0)
* Microsoft FoxPro 2.5a
* Microsoft Visual Basic 3.0 Pro
* Microsoft Visual C++ (MFC 2.5)
* Microsoft Crystal Reports 2.0 for Visual Basic
* Crystal Services Crystal Report Pro 3.0
* PowerSoft PowerBuilder 3.0
* PC SOFT WinDev 1.5
* Lotus 1.2.3 R4.00 and R4.01 (Datalens, ODBC)
* Lotus Approach 2.1
* Lotus Approach 3.0
* Trinzic Forest & Trees 3.1a
* Borland Paradox 5.0 (IDAPI, ODBC)



------------------------
CONFIGURATION GUIDELINES
------------------------


Detecting the Router
--------------------

This driver automatically detects the Router you are using. If 
more than one Router is installed it uses the one that fits the best. 
If you want to override this auto-configuration, go into the Setup 
option of your data source and change the type of router.

Available Routers are:
* Attachmate RALLY! NetSoft Router
* IBM PC Support
* Novell NetWare for SAA



Date Format
-----------

You must configure the date format of this driver to match your 
AS/400 date format. Contact your AS/400 system administrator to 
find out the date format of your AS/400. On the AS/400, the command 
to see the date format is "wrksysval" and the parameter to check 
is QDATFMT.


Suppressing the Connection Window
--------------------------------

If you do not want the connection window displayed, add the fol-
lowing setting to the 'data source' section of your ODBC.INI file.

 DispCnxBox=No


Specifying YES will display the window.


Changing the Number of Buffered Lines
-------------------------------------

When reading a table on the AS/400, the driver will read a packet 
of lines to optimize the read process. The default value is a 
packet of 100 lines. 

You can modify this value by changing the following line in the 
'data source' section of your ODBC.INI file.

 NumRowsBufferized=VALUE

where VALUE equals the lines you want in the packet (default=100).


	
Reducing the number of tables in a library
------------------------------------------

When attaching a table within Microsoft Access, the list
of tables contained in a library may be large. If the list is 
 too large, or if you wish to improve performance, you can 
reduce or restrict the list of tables to be retrieved.

In the 'data source' section of your ODBC.INI file, modify the 
following line to mask a selection of tables.


 MaskTable=MASK       ; Gets all the tables beginning with 'SAL'

where MASK can be any characters plus the following wild card 
characters.

Wild card       Meaning
--------        -------
   %            Represents any sequence of characters
   -            Represents any single character  



--------------------------
Read/Write/Update mode
--------------------------


Enabling Write Mode
-----------------------

In order to use the Attachmate ODBC Driver in Write mode, you
must set up a specific authorization library and table on the
AS/400.  It is within this table that specific user IDs are 
granted Write Access:

Library : D6SRV
Table :   D6AUTH

The library and table may be created interactively on the AS/400. 
The table can be created in several ways.

To create the library, use the following command:
  'crtlib D6SRV'

Here are two ways to create the table, one using IDDU and the 
other using SEU.

To create the table using IDDU:

1) Open IDDU and create the D6AUTH table. Use the field 
   specifications shown below.

     Field 1 : USERID           Type : CHAR(32)
     Field 2 : STATE            Type : SMALLINT

   when STATE= 1: Read/Write mode enabled
   when STATE= 0: Read-Only 


To create the table using SEU:

1) Create the source file and the member (Type PF) you want to 
   use. You can also simply add a new member (Type PF) to an 
   existing source file. 

   Use the field specifications shown below (remember the source 
   file is column-sensitive).

     A*
     A          R D6AUTH
     A            USERID        32A
     A            STATE          1P


2) Now create D6AUTH using the member you just created. 



The driver will check the table for the userid and verify if
write access is allowed.  Be sure to grant public authority 
to the table in order to allow everyone access or the author-
izations will not work.

Read/Write mode is available only under PC Support version
2.3 or greater.

When using ACCESS 2 or POWER BUILDER, Read/Write mode is only
available in collections with tables having unique indexes.

You may make Update operations using Lotus 1-2-3 (Datalens/ODBC)
without using indexes, since it works with cursors.


Retrieving Indexes Using System Tables
--------------------------------------

To retrieve indexes using system tables, you must grant public 
authority to the following system tables on the AS/400: 

 QSYS/QADBXREF
 QSYS/QADBFDEP


Retrieving Indexes Using Custom Tables
--------------------------------------

You can specify the tables where the driver will find the 
information on indexes. Although this method is faster than using 
system tables, it will not take care of interactive modifications 
such as adding or removing an index.

The driver uses the format of two system tables: SYSINDEXES and
SYSKEYS. In the 'data source' section of your ODBC.INI file, add 
the following lines:

Syskeys=MyKeys          ; Name of the new SYSKEYS Table
SysIndexes=MyIndexes    ; Name of the new SYSINDEXES Table.

where MyKeyes and MyIndexes are new names for these tables.


On the AS/400, you may create these tables in a library (which
doesn't contain system tables). The driver will then be able
to retrieve indexes outside a collection.

The columns used are:

SYSINDEXES      

TBName          CHAR(10)   Name of table defining the index
Name            CHAR(10)   Name of the index
UniqueRule      CHAR(1)    'U' for unique index, 'D' not unique

SYSKEYS

IXName          CHAR(10)   Name of the index
ColName         CHAR(10)   Name of the column of the key
Ordering        CHAR(1)    'A' : Ascending.    'D' : Descending




-----------------------
Using Datalens <-> ODBC
-----------------------

To use Lotus 1-2-3 R4.01 or R5.00, you must configure the ODBC
for Datalens:

1.  Install a Datalens Driver (for example DBASE IV). This will 
    install DLODBC.DLL.

2.  Add the following lines to the LOTUS.BCF file, usually located 
    in the \LOTUSAPP\DATALENS directory.

    DN="ODBC" DL="DLODBC"
    DD="ODBC Data Source List";


 
--------------------------
USING MICROSOFT ACCESS 1.1
--------------------------

If you are using asynchronous functions, add the following section 
to your MSACCESS.INI file:

  [DEBUG]
  RmtTrace=16



------------------
USING POWERBUILDER
------------------

If you experience problems while using PowerBuilder, we recommend 
you replace your PBODB030.INI file with the file we provide in the 
ODBC Install Driver directory.

If the problems persist, please call Attachmate Customer Support.



------------------------
USING LOTUS APPROACH 3.0
------------------------

If you make Read/Write operations with Approach, you must disable 
the 'Display ODBC Request Box' in the setup of your Data Source.



------------------
COMMON ERROR CODES
------------------

AS/400 tables are accessed using the APPC API. As a result, the error 
codes returned by APPC are quite different than PC Support SQL error 
codes. 

Here are a few of the common APPC error codes you may encounter:

  00 : OK
  03 : Data truncation
  07 : unsuccessful
  08 : APPC Busy
  18 : Invalid Conversation type 
  1C : Bad system name
  2B : Probably invalid PCS Version (2.2 or 2.3)
  38 : Error in type conversion
  48 : Memory failure
  49 : Too many conversations
  4B : Router not installed
  4D : PCSWIN not loaded
  4E : PCSWIN out of memory

Refer to the following IBM document for a complete list of the 
return codes for the Router Windows API:

  "PC/Support/400 Application Program Interface Reference"
   (part number: SC41-8254-XX)


If you experience memory problems with PC Support, try using the 
TSR program DMAPPC.EXE. Execute this program in DOS before 
running Windows.







