× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





Robert,

I have been trying to access both to read and alter a DataArea on the 400
using Domino as a web server.
I have created a form with a single field called "TEST" and a java agent as
the "WebQueryOpen" agent and then access this form with a browser writing to
"TEST" as the code progresses. It stops at the "dataArea.read()" statement
below. Here's the code:

import lotus.domino.*;
import com.ibm.as400.access.*;
public class dataAreaRead extends AgentBase
{
public void NotesMain()
{
try
{
Session session = getSession();
AgentContext ac = session.getAgentContext();
Document doc = ac.getDocumentContext();
doc.replaceItemValue("TEST", "A");
AS400 system = new AS400("10.21.8.40","QNOTES", "QNOTES");
doc.replaceItemValue("TEST", "B");
String daName = "CTLDTABK"; // name of the data area
doc.replaceItemValue("TEST", "C");
QSYSObjectPathName path = new QSYSObjectPathName("LIBRARY", daName,
"DTAARA");
// 'LIBRARY' is not the real name
doc.replaceItemValue("TEST", "D");
CharacterDataArea dataArea = new CharacterDataArea(system, path.getPath());
doc.replaceItemValue("TEST", "E");
doc.replaceItemValue("TEST",dataArea.getPath() );
// this prints the following path ="/QSYS.LIB/LIBRARY.LIB/CTLDTABK.DTAATA"
// which is where the object is located.
String daStr = dataArea.read(); //stops here.
doc.replaceItemValue("TEST", "F");
doc.replaceItemValue("TEST", daStr);
} catch(Exception e) {
}
}
}

I have restarted the server after placed in the Server INI file the
following line:
JavaUserClasses=/QIBM/ProdData/HTTP/Public/jt400;/QIBM/ProdData/HTTP/Public/
jt400/lib/db_classes.jar

This has been tested on 2 other fronts with some success using a PC with
Client Access installed:
1. From a Notes Client accessing the database on the server I changed
"replaceItemValues" with java print lines and are able to read the DataArea
in the Java Console.
2. Using a browser to access a local database then going to the 400 I can
read the DataArea.

I just doesn't work when going from Domino to the 400.

What am I missing?

Thanks.

Harley

-----Original Message-----
From: domino400-bounces+harley=hijklm.org@xxxxxxxxxxxx
[mailto:domino400-bounces+harley=hijklm.org@xxxxxxxxxxxx] On Behalf Of
Robert Laing
Sent: Friday, January 18, 2008 3:05 PM
To: Lotus Domino on the iSeries / AS400
Subject: Re: Domino accessing Data Area

This link: http://www-03.ibm.com/systems/i/software/toolbox/ provides
much information and sample code on accessing iSeries objects with Java.
Since Domino can run Java code, Domino can then access most iSeries
objects. I've worked with JTOpen and the Toolbox for Java some, if you
have specific questions, ask away...

Bob





From:
rob@xxxxxxxxx
To:
Lotus Domino on the iSeries / AS400 <domino400@xxxxxxxxxxxx>
Date:
01/18/2008 01:18 PM
Subject:
Re: Domino accessing Data Area



<snip>
Does this forum include coding issues such as accessing the data area on
the
AS400 with Domino Java?
"Harley Wallis" <harley@xxxxxxxxxx>
</snip>

Far as I'm concerned you can give it a shot.
First, I'm no Domino java coder so I'll leave that up to others. I'm more

of an administrator.
Second, Don't reply to start a new thread. It blows up the archives. See

where your thread is buried at:
http://archive.midrange.com/domino400/200801/threads.html
Third, If you're going to reply anyway to start a new thread, do not reply

WITH HISTORY for a new thread! Heck, I thought you were wondering if you
should thank Walter and I for providing a solution to your dilemma also.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.