Triggering on AS400 files


I would like some thoughts on retrieving data from as/400 files. I know that we can use the webMethods jdbc adapter to retrieve these files. We want our integration to trigger when a file appears in an as/400 library. The integration cannot be scheduled because the user wants control over when the file gets created, and processed by webMethods.

For those of you working on as/400 integrations, what different methods have you used to pull files off the as/400.

Any info is appreciated.



If the file is being created by an RPG program, you probably can consider this option. There is a mechanism to invoke a IS service from an AS400 RPG program. You should talk to a person who understands both RPG and Java, he should be able to help you. This is an option that we considered in the past (we did not end up using it).

The following link may be useful -

Uday, thanks for the information.

If anyone has any other thoughts please let me know.




We had trigger set on the AS400 side to trigger the event.
If they can’t create a row in AS400, I would suggest to write a RPG program to insert a row in a buffer table to be the trigger table.
Then you can have a trigger defined for that and retrieve the
real data. I think AS400 file means same thing as table in DB world.

Good lucks


The AS/400 has a file system called the “Integrated File System”. It makes AS/400 objects appear like files on a unix-like server. You could then access these object with a file adapter or perhaps with an FTP service. To read more about the IFS, go to [url=“IBM Documentation”][/url] then click on “File systems and management” in the navigation pane, then “Integrated file system”

Roger / Mike, thanks for the info!!

Roger: as you can tell, I’m not very AS/400 savy… I know there are as/400 libraries and the IFS. I like your idea about webMethods accessing the files on the IFS using the file “adapter” (services). Is it a big deal for webMethods I.S. running on wintel servers to get access to IFS files ? Do we need to map a drive, or is there a better way ?
Our thinking is that we could use webMethods file adapter services to poll for a “trigger” file on the as/400 IFS. The appearance of this file would trigger our integration. Once the integration is triggered, we would use another service to read our source file from the AS/400 using the JDBC adapter.

Feedback on accessing the AS/400 IFS from webMethods on a wintel platform would be appreciated. Should this be avoided ?

Any thoughts ?



From windows explorer, put this in the address bar:


your400 = name or IP address of your 400
yourLib = AS/400 library where your file resides
yourFile = AS/400 file your are trying to access
yourMember = member name within the file, usually the same as the file name

you may have issues converting ebcdic to ascii. It may require some configuration

again, the IBM documentation for this is pretty good

Correction on previous post…the system name starts with 2 backslashes


another think you might look for is looking in the system xref table with JDBC -

if it returns 0 rows, then your table isn’t there.

webMethods provide AS400 Adapter that allow triggering of a service when data is present in AS400 Data Queue. Then base on the data receive in the Data Queue, one could select data from UDB using JDBC Adapater or read file from IFS.

In order to initiate IS services from the AS400 we have used the following:

We have modified the AS400 programs that need to initiate a webMethods service to send an XML docuument via FTP to our webMethods server. We have defined a webMethods trigger which acts upon receipt of this signal and initiates the service associated with it. In doing this, you do not need to have a polling job on the AS400. The AS400 program creating the file would control the initiation of the webMethods service.

I would like to ask, what are the way to update information in the DB2 database in an AS400 environment. I understand how the JDBC adapter works which allows, updates, read and delete. But due to security policy within my client, a third party application such as webMethods is not allowed for direct update. We need to go through the application which does the direct update. This process will not break the security auditing process.

Please advise


As Terry pointed out earlier in this thread, webMethods has a global field adapter available for as/400 access to data queues or to directly call an as/400 program.

We plan on using the webMethods Broker client API (client60.jar) to publish a document (cdStartIntegration) from the AS/400 to our broker. We were pursuing using the FTP put of a trigger file to the Integration Server FTP port…but the client wasn’t too keen on this approach. So we decided to pursue using a Java client on the AS/400.
The Java client will publish a (generic) document (cdStartIntegration) and it will contain two fields (integrationToStart and integrationData). Each integration that we want to trigger “on demand” will have a trigger service subscribing to this document. It will also have a filter on the integrationToStart field. The integrationData field will be used to pass data (parms) into the flow service started by the trigger. Our plan is to pass xml-tagged data in this field. The flow service started by the trigger will then take the cdStartIntegration document as input, and the first thing it will do is use the webMethods built-in-services: xmlStringToXMLNode and then xmlNodeToDocument. This will allow a generic document to be used to pass different parms to different flow services.

So far it works pretty good.


Can you advise in more details about this AS400 Adapter? I have been seraching high low for more information on this AS400 Adapter, but in vain. Do we need to purchase this Adapter? Is this a webMethods standard adapter, or a third party adapter? Or could you direct me to a particular site for information on this adapter?


Sure William. We don’t use it ourselves, but others in wmusers have spoken of it. Go to webMethods advantage web site, and you will see a link at the bottom of the home page called “Global Field Adapters”. Click on it. It will show you all of the GFA’s available, including the AS/400 one. BTW, it is US$25k.


Thanks for the information. I think I need more information about the data queue matters. I am not too sure what the data queue meant, whether it is similar to the UNIX pipeline. But I believe I should be able to retrieve information from the IBM website.

Thanks again.


In one of my services i have source as X and target Y. i need to create a Xref table and then get the canonical id and native ids for the sources and targets after insert in the source table.
how do we create a Xref table and how does it work in fetching the native and canonical id from that created table?
Thanks and regards