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



David:

Interesting application.

IBM has a toolbox which you can use to get the information you need to
build the PCML. If you have tried doing this with RecordFormat in JTOpen
you'll know the some of the information that you need is just not there.

The toolbox is some form of

com.ibm.etools.iseries.toolbox_#.#.#

Steroid for JTOpen. Yumm.

In WDSCi 7 IBM actually made it easy to find. Create a new Java project,
go to the build path, choose the library tab, and select "iSeries
Utilities and Toolbox".

ISeriesHostFieldBasic has everything you need to build the PCML.

Searching the WDSCi 7 documentation for the name of that class takes you
right to the package Javadocs.

Here is a sample program to get instances of this class for an iSeries
database to get you started:

package iseriesfields;

import java.util.List;

import com.ibm.as400.access.AS400;
import com.ibm.etools.iseries.comm.ISeriesListFields;
import com.ibm.etools.iseries.comm.filters.ISeriesFieldFilterString;
import com.ibm.etools.iseries.comm.interfaces.ISeriesHostFieldBasic;

public class ISeriesListFieldsTest {

private static final String testFile = "YOURFILE";
private static final String testLib = "YOURLIB";
private static final String testRec = "*FIRST";

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
ISeriesListFields islf = new ISeriesListFields(new AS400());
ISeriesFieldFilterString isffs = new ISeriesFieldFilterString();
List fieldList = null;
ISeriesHostFieldBasic field = null;
isffs.setFile(testFile);
isffs.setLibrary(testLib);
isffs.setRecord(testRec);
try {
fieldList = islf.getFieldList(isffs);
} catch( Exception e) {
e.printStackTrace();
}
for( int i=0; i < fieldList.size(); i++ ) {
field = (ISeriesHostFieldBasic)fieldList.get(i);
System.out.println(field.getName() );
}

}
}










David Gibbs <david@xxxxxxxxxxxx>
06/28/2007 12:59 PM
Please respond to Java Programming on and around the iSeries / AS400

To: Java Programming on and around the iSeries / AS400
<java400-l@xxxxxxxxxxxx>
cc: (bcc: Bill Blalock/TUS/US/Certegy)
Subject: PCML structures based on database files?


Folks:
Does anyone know if there is a way to use database files to define PCML
structures?
I wrote a rather nice set of routines that will transfer data from a RPG
program to java, using a data queue ... the RPG program uses an
externally describe data structure (based on a database file) to send
the data to the queue.
The RPG program uses RFML to extract the data from the queue ... and the
RFML is constructed using the same database file that the RPG program
uses for it's data structure.
I would really like to be able to define PCML structures the same way
... so I can define a RPG data structure using an database file, and
have the PCML defined using the same database file.
Any ideas?
Thanks!
david

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.