Transcript Title

Jadabas
Connecting Adabas to Web Applications
Bruce Beaman
Senior Manager, Product Marketing
Software AG USA, Inc.
How Javabas became Jadabas

Names that didn’t make the final cut...
 Konabas
 Balibase
 Samoabase
 Krakatoabase
 J-base
 and
my personal favorite…. Jaba-the-hut base
2
Jadabas - Connecting Adabas to the Web

What is Jadabas?


Jadabas simplifies access to Adabas from Java-based
applications by generating an access layer for Adabas files.
It is an API library that contains all the necessary methods
to encapsulate Adabas direct calls.
What does Jadabas consist of?



Collection of classes - containing the method stubs for
Adabas interface
Generator facility - to produce file or view-specific classes
using pre-defined Jadabas classes and info from Natural or
a flat file
Jadabas proxy - an API library that contains all necessary
methods to encapsulate Adabas direct calls.
3
Generating Java classes
NATURAL DDM
EMPLOYEES

Java applet ‘Generate’ or
‘Genddm’ runs on the
client.




Generate
Natural - ‘Generate’ accesses
DDM on the server
Non-Natural - ‘Genddm’ uses
layout from SYSTRANS or a flat
file.
Fields can be selected
from the DDM.
Java source file output.
Java source
Employees.java
j
a
v
a
c
Java object
Employees.class
Generating Java classes
Web
application
Applet
DDM
Information
Jadabas
Jadabas
Generated
Class
Java
Runtime
Jadabas
Classes
Adabas
Development
Production
5
The generated Java class





Field character
encoding conversion
Little Endian/Big Endian
conversion.
IBM/VAX/IEEE floating
point format conversion
Only the non-blank
length of Alpha fields
are transferred.
Only the stored
occurrences of MU
fields are transferred.
Employees.class
Properties (derived from DDM)
public int ISN;
public String Personnel_id;
public String First_name;
public String Name;
public String Middle_name;
public String Mar_stat;
public String Sex;
:
Methods (same for all classes)
Find
Update
Read
Delete
Histogram
Hold
Store
Release
Jadabas Run-time
ADABAS.class




Contains the meat of
the generated class
methods
Provides most
ADABAS functionality
Makes good use of
multi-fetch
functionality
Contains support
routines e.g. format
conversion
Properties
private byte[] prefix = {0,0};
String command_code;
protected int commandId = getcid();
int fileNumber;
int response;
int isn;
… etc
Methods
Find
Histogram
Update
Hold
Open
EndTransaction
etc.
Read
Store
Delete
Release
Close
Jadabas Connectivity
 Client / Proxy / Net- Work
/ ADABAS communication
 multiple clients connect
to proxy and proxy
connects to ADABAS
 way of saving on
multiple clients connected
to Adabas
 via TCP/IP
 for Adabas MF and
Adabas on Open Systems
CLIENT
PROXY
CLIENT
ADABAS
Entire
Network
Example Java program
// This program lists all employees with surname “JONES”.
import com.softwareag.javabas.*;
import com.softwareag.XTS.*;
// note 1
public class etest
{ public static final void main(String args[])
{ DefaultDirectory dd = new DefaultDirectoy();
// note 2
XTS.setDirectory (dd);
dd.setLocalService(true);
try
{dd.add(“XTSaccess”, new XTSurl (“198”,”Wrdserv:8888”));}
catch (Exception ex) {}
Employees.setFNR(7,1);
// note 3
Employees x[]=
Employees.FindAll(Employees.NAME,ADABAS.EQ,"JONES"); // note 4
for(int i=0;i<x.length;i++)
System.out.println(x[i].Name+"\t"+
x[i].First_name+"\t\t"+
x[i].Address_line[0]); }}
// note 5
Notes
1. The import statement tells the compiler where to get class definitions for type checking.
2. The setLocalService method of DefaultDirectory indicates the connection address.
3. The setFNR method changes the DBID and/or FNR from the default.
4. The FindAll method returns an array of Employee objects, representing the result.
5. The results are displayed on the console.
Program Result
C:\SoftwareAG\Test>java etest
JONES
JONES
JONES
JONES
JONES
JONES
JONES
JONES
JONES
VIRGINIA
MARSHA
ROBERT
LILLY
EDWARD
MARTHA
LAUREL
KEVIN
GREGORY
C:\SoftwareAG\Test>
12300 VALLEY HIGH RO
1011 JEFF RYAN DR.
969 E. EL CAMINO REA
10626 BEACH MILL RD.
4922 STATELINE
78 S. YANK WAY
11119 WATERMAN'S DRI
73 HIGH STREET
33 FINGLETON CLOSE
The whole picture...
Web Browser
Internet
Net-Work
Net-Work
Proxy
Applet
OS390
Adabas
Web Server
11
The next release of Jadabas...

Jadabas v7121
 various
bug fixes
 ADASAF and ADAESI enhancements
 NC and NN field types supported
 more documentation

Later - support on UNIX platform (HP, Solaris, AIX)
12
Jadabas Benefits

Integrates existing enterprise data into new Java-based
applications

Less training effort : for Java programmers







they do not need to learn Adabas direct access syntax
can stay focused on Java programming tasks
Familiar syntax : for Natural programmers
High productivity : by automatic creation of the code
100% Pure Java : connects across platforms providing interoperability
High performance : due to early binding, multi-fetch, and compressed
record transfer
Flexibility : translation done by client enables mixed character encoding
in same file
13
Thank you!
14