× 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.



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("SERVERIP",
"QNOTES", "QNOTES"); // 270 IP
doc.replaceItemValue("TEST", "B");
String daName = "CTLDTABK"; // name of
the dataarea
doc.replaceItemValue("TEST", "C");
QSYSObjectPathName path = new
QSYSObjectPathName("LIBRARY", daName, "DTAARA");
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.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.