Extract data from files on the AS/400
Here's a simple method to extract data from files on the AS/400 and make the results available on another platform.
Here's a simple method to extract data from files on the AS/400 and make the results available on another platform....
Continue Reading This Article
Enjoy this article as well as all of our content, including E-Guides, news, tips and more.
Create a DB2/400 view and FTP it. Since DB2/400 views are implemented as logical files and AS/400 logical files can be transferred using FTP. No need to write a program or run it. The data is always current and available. A view can join multiple files based on complex conditions.
CREATE VIEW library/viewname AS SELECT field1, .. ,fieldN etc ...
FROM library/filename
WHERE fieldX = conditionX
AND fieldY = conditionY etc ...
Example FTP Command ?
OPEN hostname
PUT library/viewname targetfilename
CLOSE